Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit ad06e0c

Browse files
committed
Make testing great again
1 parent 7ee5ec3 commit ad06e0c

26 files changed

Lines changed: 4011 additions & 6486 deletions

testing/__tests__/market.auction.ava.ts

Lines changed: 260 additions & 257 deletions
Large diffs are not rendered by default.

testing/__tests__/market.buynow.ava.ts

Lines changed: 241 additions & 239 deletions
Large diffs are not rendered by default.

testing/__tests__/market.core.ava.ts

Lines changed: 279 additions & 276 deletions
Large diffs are not rendered by default.

testing/__tests__/market.royalties.ava.ts

Lines changed: 209 additions & 208 deletions
Large diffs are not rendered by default.

testing/__tests__/market.splits.ava.ts

Lines changed: 193 additions & 191 deletions
Large diffs are not rendered by default.

testing/__tests__/misc.ava.ts

Lines changed: 197 additions & 210 deletions
Large diffs are not rendered by default.

testing/__tests__/nft.approvals.ava.ts

Lines changed: 784 additions & 889 deletions
Large diffs are not rendered by default.

testing/__tests__/nft.core.ava.ts

Lines changed: 351 additions & 355 deletions
Large diffs are not rendered by default.

testing/__tests__/nft.enumeration.ava.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
import { STORE_WORKSPACE, assertTokensAre, batchMint } from "./test-utils";
1+
import avaTest from "ava";
2+
import { assertTokensAre, batchMint } from "./utils/index.js";
3+
import { setup } from "./setup.js";
4+
5+
const test = setup(avaTest);
6+
7+
test("enumeration", async (test) => {
8+
const { alice, bob, store } = test.context.accounts;
29

3-
STORE_WORKSPACE.test("enumeration", async (test, { alice, bob, store }) => {
410
const failPromiseRejection = (msg: string) => (e: any) => {
511
test.log(`Promise rejected while ${msg}:`);
612
test.log(e);
@@ -136,7 +142,3 @@ STORE_WORKSPACE.test("enumeration", async (test, { alice, bob, store }) => {
136142
"`nft_tokens_for_owner({})` output is wrong after burning"
137143
);
138144
});
139-
140-
// TODO:
141-
// - [] test `nft_tokens_for_owner_set`, but only after syncing back wether it
142-
// is used e.g. in mintbase-js, otherwise make it private

testing/__tests__/nft.metadata.ava.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import { batchMint, failPromiseRejection, STORE_WORKSPACE } from "./test-utils";
1+
import avaTest from "ava";
2+
import { failPromiseRejection } from "./utils/index.js";
3+
import { setup } from "./setup.js";
24

3-
STORE_WORKSPACE.test("metadata", async (test, { alice, store }) => {
5+
const test = setup(avaTest);
6+
7+
test("metadata", async (test) => {
8+
const { alice, store } = test.context.accounts;
49
test.deepEqual(await store.view("nft_metadata"), {
510
base_uri: null,
611
icon: null,

0 commit comments

Comments
 (0)