Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-issue-236: fix TypeError when initialize a Worker in jsdome env… #238

Merged
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/tests-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
node-version: [14, 16]
node-version: [16]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
Expand All @@ -19,4 +19,4 @@ jobs:
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test:sandbox:ci --fail-fast
run: yarn test:sandbox:ci-with-ignore --fail-fast
18 changes: 9 additions & 9 deletions __tests__/05.spoon-contract-to-sandbox.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ test.afterEach.always(async t => {
test('using `withData` for contracts > 50kB fails', async t => {
const root = t.context.worker.rootAccount;

t.regex(
await captureError(async () => {
await root.importContract({
mainnetContract: REF_FINANCE_ACCOUNT,
withData: true,
blockId: 50_000_000,
});
}),
new RegExp(`State of contract ${REF_FINANCE_ACCOUNT} is too large to be viewed`),
const error_response = await captureError(async () => {
await root.importContract({
mainnetContract: REF_FINANCE_ACCOUNT,
withData: true,
blockId: 50_000_000,
});
});
t.assert(
error_response.includes('is larger than allowed') || error_response.includes('is too large to be viewed'),
);
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"test:testnet:ci": "yarn build && TESTNET_MASTER_ACCOUNT_ID='ro3evqruqecmi7q4uwux1651245117258' ava --config ./ava.testnet.config.cjs",
"test:sandbox": "yarn test:sandbox:ci --verbose",
"test:sandbox:ci": "yarn build && ava",
"test:sandbox:ci-with-ignore": "yarn build && ava __tests__/0* && cd examples/simple-project/ && ava && cd ../../packages/js && ava",
"test": "yarn test:sandbox && yarn test:testnet",
"prepare": "husky install",
"release": "yarn lerna publish",
Expand Down
2 changes: 1 addition & 1 deletion packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"callsites": "^4.0.0",
"fs-extra": "^10.0.0",
"js-sha256": "^0.9.0",
"near-api-js": "^v2.1.4",
"near-api-js": "^v3.0.3",
"near-sandbox": "^0.0.17",
"near-units": "^0.1.9",
"node-port-check": "^2.0.1",
Expand Down
Loading
Loading