Skip to content

Commit

Permalink
fix-issue-236: fix TypeError when initialize a Worker in jsdome env b…
Browse files Browse the repository at this point in the history
…y upgrade dependency and update ci task,remove node14 job
  • Loading branch information
fospring committed Mar 5, 2024
1 parent cbe6dcb commit cea39b0
Show file tree
Hide file tree
Showing 6 changed files with 2,346 additions and 2,054 deletions.
2 changes: 1 addition & 1 deletion .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 Down
19 changes: 9 additions & 10 deletions __tests__/05.spoon-contract-to-sandbox.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +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,
});
});
const check = error_response.includes('is larger than allowed') || error_response.includes('is too large to be viewed');
t.assert(check);
});

test('if skipping `withData`, fetches only contract Wasm bytes', async t => {
Expand Down
2 changes: 1 addition & 1 deletion packages/js/dist/jsonrpc.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/js/dist/jsonrpc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

0 comments on commit cea39b0

Please sign in to comment.