Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

fix: aspect and jest tests #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ dev-account.env

# ignore contract build files
build/release
out
.idea
2 changes: 1 addition & 1 deletion asconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"extends": "near-sdk-as/asconfig.json",
"options": {
"measure": true,
"binaryFile": "./build/release/contract.wasm"
"binaryFile": "./out/main.wasm"
}
}
6 changes: 3 additions & 3 deletions assembly/__tests__/token.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Context, u128 } from "near-sdk-as";
import { VMContext as Context, u128 } from "near-sdk-as";
import { init, totalSupply, balanceOf, transfer, approve, transferFrom } from "..";

let alice = 'alice';
Expand All @@ -7,7 +7,7 @@ let eve = 'eve.near';

describe('Token', function() {
beforeAll(() => {

});

describe('with alice as initial owner', () => {
Expand All @@ -16,7 +16,7 @@ describe('Token', function() {
Context.setAccount_balance(u128.fromString("1000000"));
init(alice);
});

it("intially has " + totalSupply() + " tokens", () => {
expect(balanceOf(alice).toString()).toBe('1000000');
});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.0.1",
"scripts": {
"build": "asb --verbose",
"dev:deploy:contract": "near dev-deploy --wasmFile=\"./build/release/contract.wasm\"",
"dev:deploy:contract": "near dev-deploy --wasmFile=\"./out/main.wasm\"",
"deploy:contract": "near deploy",
"deploy": "yarn build && yarn deploy:contract && yarn deploy:pages",
"prestart": "yarn build && yarn deploy:contract",
Expand All @@ -29,6 +29,7 @@
},
"jest": {
"testEnvironment": "near-cli/test_environment",
"testRunner" : "jasmine2",
"testPathIgnorePatterns": [
"<rootDir>/assembly/",
"<rootDir>/node_modules/"
Expand Down