Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 1caae6f

Browse files
Blckbrry-PiNathanFlurry
authored andcommitted
feat(tokens): Add a modify_meta script.
1 parent cab6396 commit 1caae6f

File tree

2 files changed

+20
-1093
lines changed

2 files changed

+20
-1093
lines changed

modules/tokens/tests/meta.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { test, TestContext } from "../module.gen.ts";
2+
import {
3+
assertEquals,
4+
assertExists,
5+
} from "https://deno.land/std@0.217.0/assert/mod.ts";
6+
7+
const METADATA = { meta: "data", test: "data" };
8+
9+
test("get_and_check_meta", async (ctx: TestContext) => {
10+
const { token } = await ctx.modules.tokens.create({
11+
type: "test",
12+
meta: METADATA,
13+
});
14+
15+
const { tokens: [returnedToken] } = await ctx.modules.tokens.fetch({
16+
tokenIds: [token.id],
17+
});
18+
assertExists(returnedToken);
19+
assertEquals(returnedToken.meta, METADATA);
20+
});

0 commit comments

Comments
 (0)