Skip to content

Commit

Permalink
chore: Update tests
Browse files Browse the repository at this point in the history
Add beforeEach and afterEach instead of before and after
Remove unused account import
  • Loading branch information
petarvujovic98 committed Sep 21, 2022
1 parent ee7e0f6 commit f56233c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/__tests__/test-bigint-serialization.ava.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Worker } from "near-workspaces";
import test from "ava";

test.before(async (t) => {
test.beforeEach(async (t) => {
// Init the worker and start a Sandbox server
const worker = await Worker.init();

Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/unordered-map.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test.afterEach.always(async (t) => {
});

test("UnorderedMap is empty by default", async (t) => {
const { root, unorderedMapContract } = t.context.accounts;
const { unorderedMapContract } = t.context.accounts;
const result = await unorderedMapContract.view("len", {});
t.is(result, 0);
});
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/unordered-set.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.afterEach.always(async (t) => {
});

test("UnorderedSet is empty by default", async (t) => {
const { root, unorderedSetContract } = t.context.accounts;
const { unorderedSetContract } = t.context.accounts;
const result = await unorderedSetContract.view("len", {});
t.is(result, 0);
t.is(await unorderedSetContract.view("isEmpty", {}), true);
Expand Down
2 changes: 1 addition & 1 deletion tests/__tests__/vector.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.afterEach.always(async (t) => {
});

test("Vector is empty by default", async (t) => {
const { root, vectorContract } = t.context.accounts;
const { vectorContract } = t.context.accounts;
let result = await vectorContract.view("len", {});
t.is(result, 0);
t.is(await vectorContract.view("isEmpty", {}), true);
Expand Down

0 comments on commit f56233c

Please sign in to comment.