Skip to content

Commit

Permalink
Merge pull request #171 from near/sandbox-upgrade
Browse files Browse the repository at this point in the history
sandbox 0.0.10
  • Loading branch information
volovyks authored Jun 17, 2022
2 parents d7c4f78 + 9d2673d commit ba865c4
Show file tree
Hide file tree
Showing 8 changed files with 1,565 additions and 3,813 deletions.
2 changes: 1 addition & 1 deletion __tests__/02.patch-state.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (getNetworkFromEnv() === 'sandbox') {
const worker = await Worker.init();
const root = worker.rootAccount;
const contract = await root.createAndDeploy(
'status-message',
root.getSubAccount('status-message').accountId,
'__tests__/build/debug/status_message.wasm',
);
const ali = await root.createSubAccount('ali');
Expand Down
17 changes: 10 additions & 7 deletions __tests__/05.spoon-contract-to-sandbox.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ test('integrate own FT with Ref.Finance', async t => {
const root = t.context.worker.rootAccount;

const [ft, refFinance, wNEAR] = await Promise.all([
root.createAndDeploy('ft', '__tests__/build/debug/fungible_token.wasm', {
method: 'new_default_meta',
args: {
owner_id: root,
total_supply: NEAR.parse('1,000,000,000 N'),
},
}),
root.createAndDeploy(
root.getSubAccount('ft').accountId,
'__tests__/build/debug/fungible_token.wasm',
{
method: 'new_default_meta',
args: {
owner_id: root,
total_supply: NEAR.parse('1,000,000,000 N'),
},
}),
createRef(root),
createWNEAR(root),
]);
Expand Down
6 changes: 3 additions & 3 deletions examples/simple-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ This is the simplest project setup example with workspaces-js. You can copy it a

## Usage
```
npm i
npm run test
yarn
yarn test
```

## Setup your project
Expand All @@ -16,4 +16,4 @@ Assume you have written your smart contract. Setup and write workspaces-js test
2. Install the `near-workspaces` and `ava` with `npm` or `yarn`.
3. Copy the ava.config.cjs to you project root directory.
4. Write test, place in `__tests__/`, end with `.ava.js`. You can refer to `__tests__/test-status-message.ava.js` as an example.
5. We're done! Run test with `npm run test` and continue adding more tests!
5. We're done! Run test with `yarn test` and continue adding more tests!
Loading

0 comments on commit ba865c4

Please sign in to comment.