forked from cerc-io/laconic-sdk
More debug logs
This commit is contained in:
parent
f791ce828d
commit
bd128d090b
@ -22,13 +22,17 @@ const namingTests = () => {
|
||||
console.log('running parent beforeAll')
|
||||
|
||||
registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||
console.log('registry = new Registry')
|
||||
|
||||
// Create bond.
|
||||
bondId = await registry.getNextBondId(privateKey);
|
||||
console.log('bondId', bondId)
|
||||
await registry.createBond({ denom: 'aphoton', amount: '2000000000' }, privateKey, fee);
|
||||
console.log('done registry.createBond')
|
||||
|
||||
// Create watcher.
|
||||
watcher = await ensureUpdatedConfig(WATCHER_YML_PATH);
|
||||
console.log('done await ensureUpdatedConfig')
|
||||
const result = await registry.setRecord(
|
||||
{
|
||||
privateKey,
|
||||
@ -40,6 +44,7 @@ const namingTests = () => {
|
||||
)
|
||||
|
||||
watcherId = result.data.id;
|
||||
console.log('watcherId', watcherId)
|
||||
|
||||
console.log('done running parent beforeAll')
|
||||
});
|
||||
@ -49,6 +54,7 @@ const namingTests = () => {
|
||||
const authorityName = `laconic-${Date.now()}`;
|
||||
|
||||
await registry.reserveAuthority({ name: authorityName }, privateKey, fee);
|
||||
console.log('done Reserve authority')
|
||||
});
|
||||
|
||||
describe('With authority reserved', () => {
|
||||
@ -72,6 +78,7 @@ const namingTests = () => {
|
||||
expect(record.ownerAddress).not.toBe('');
|
||||
expect(record.ownerPublicKey).not.toBe('');
|
||||
expect(Number(record.height)).toBeGreaterThan(0);
|
||||
console.log('done Lookup authority')
|
||||
});
|
||||
|
||||
test('Lookup non existing authority', async () => {
|
||||
@ -80,11 +87,13 @@ const namingTests = () => {
|
||||
expect(record.ownerAddress).toBe('');
|
||||
expect(record.ownerPublicKey).toBe('');
|
||||
expect(Number(record.height)).toBe(0);
|
||||
console.log('done Lookup non existing authority')
|
||||
});
|
||||
|
||||
test('Reserve already reserved authority', async () => {
|
||||
await expect(registry.reserveAuthority({ name: authorityName }, privateKey, fee)).
|
||||
rejects.toThrow('Name already reserved.');
|
||||
console.log('done Reserve already reserved authority')
|
||||
});
|
||||
|
||||
test('Reserve sub-authority.', async () => {
|
||||
@ -96,6 +105,7 @@ const namingTests = () => {
|
||||
expect(record.ownerAddress).not.toBe('');
|
||||
expect(record.ownerPublicKey).not.toBe('');
|
||||
expect(Number(record.height)).toBeGreaterThan(0);
|
||||
console.log('done Reserve sub-authority')
|
||||
});
|
||||
|
||||
test('Reserve sub-authority with different owner.', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user