vulcanize / chiba-clonk-client

TypeScript client for chiba-clonk
0 stars 0 forks source link

Implement methods and tests for associate/dissociate bonds and records #4

Closed nikugogoi closed 2 years ago

nikugogoi commented 2 years ago

Part of https://github.com/vulcanize/dxns/issues/11

Test output:

$ yarn test
yarn run v1.22.18
$ jest --runInBand --verbose
 PASS  src/naming.test.ts (115.656 s)
  Naming
    ✓ Reserve authority. (5020 ms)
    ✓ Lookup authority. (9 ms)
    ✓ Lookup non existing authority (5 ms)
    ✓ Reserve already reserved authority (5096 ms)
    ✓ Reserve sub-authority. (4954 ms)
    ✓ Reserve sub-authority with different owner. (15037 ms)
    ✓ Set name for unbonded authority (5010 ms)
    ✓ Set authority bond (5020 ms)
    ✓ Set name (5055 ms)
    ✓ Lookup name (9 ms)
    ✓ Resolve name (9 ms)
    ✓ Lookup name with history (10003 ms)
    ✓ Set name without reserving authority (5023 ms)
    ✓ Set name for non-owned authority (15065 ms)
    ✓ Lookup non existing name (3 ms)
    ✓ Resolve non existing name (2 ms)
    ✓ Delete name (5023 ms)
    ✓ Delete already deleted name (5011 ms)
    ✓ Delete name for non-owned authority. (20083 ms)

 PASS  src/auction.test.ts
  ✓ skipping auction tests

 PASS  src/nameservice-expiry.test.ts
  ✓ skipping nameservice expiry tests

 PASS  src/sdk.test.ts
  Querying
    ✓ Endpoint and chain ID. (1 ms)
    ✓ List records. (5 ms)
    ✓ Query records by reference. (5 ms)
    ✓ Query records by attributes. (2 ms)
    ✓ Query records by id. (2 ms)
    ✓ Query records passing refs true. (3 ms)
    ○ skipped Get status.

 PASS  src/util.test.ts (10.015 s)
  Util
    ✓ Generate content id. (7 ms)

 PASS  src/bond.test.ts (60.3 s)
  Bonds
    ✓ Create bond. (4397 ms)
    ✓ Get bond by ID. (6 ms)
    ✓ Query bonds. (4 ms)
    ✓ Query bonds by owner. (6 ms)
    ✓ Refill bond. (5019 ms)
    ✓ Withdraw bond. (4994 ms)
    ✓ Cancel bond. (5015 ms)
    ✓ Associate/Dissociate bond. (20081 ms)
    ✓ Reassociate/Dissociate records. (20144 ms)

 PASS  src/index.test.ts (5.003 s)
  Registry
    ✓ Get account info. (44 ms)
    ✓ Get account balance. (4367 ms)

Test Suites: 7 passed, 7 total
Tests:       1 skipped, 39 passed, 40 total
Snapshots:   0 total
Time:        196.08 s
Ran all test suites.
Done in 196.75s.
nikugogoi commented 2 years ago

SDK Test output

$ yarn test
yarn run v1.22.18
$ jest --runInBand --verbose
 PASS  src/sdk.test.ts (11.613 s)
  Querying
    ✓ Endpoint and chain ID. (3 ms)
    ✓ Get status. (5 ms)
    ✓ List records. (3 ms)
    ✓ Query records by reference. (3 ms)
    ✓ Query records by attributes. (3 ms)
    ✓ Query records by id. (3 ms)
    ✓ Query records passing refs true. (5 ms)