Skip to content

Commit

Permalink
upgrade workspaces version
Browse files Browse the repository at this point in the history
  • Loading branch information
idea404 committed Jul 28, 2022
1 parent 1517a79 commit 8db2761
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
tests:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
platform: [ubuntu-latest] # mac-os in development
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout branch
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde_json = { version = "1.0", features = ["arbitrary_precision"] }
tokio = { version = "1.18.1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
workspaces = "0.2.1"
workspaces = "0.4.0"
pkg-config = "0.3.1"

[[example]]
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/rs/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async fn main() -> anyhow::Result<()> {
let contract = worker.dev_deploy(&wasm).await?;

// create accounts
let owner = worker.root_account();
let owner = worker.root_account().unwrap();
let alice = owner
.create_subaccount(&worker, "alice")
.initial_balance(parse_near!("30 N"))
Expand Down
7 changes: 3 additions & 4 deletions integration-tests/ts/main.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ test.beforeEach(async (t) => {

// deploy contract
const root = worker.rootAccount;
const contract = await root.createAndDeploy(
root.getSubAccount("rust-counter").accountId,
const contract = await root.devDeploy(
"./res/status_message.wasm",
{ initialBalance: NEAR.parse("30 N").toJSON() }
);
Expand Down Expand Up @@ -42,14 +41,14 @@ test.afterEach(async (t) => {
});

test("set get message", async (t) => {
const { root, contract, alice, bob, charlie } = t.context.accounts;
const { contract, alice } = t.context.accounts;
await alice.call(contract, "set_status", { message: "hello" });
const aliceStatus = await contract.view("get_status", { account_id: alice });
t.is(aliceStatus, "hello");
});

test("get nonexistent message", async (t) => {
const { root, contract, alice, bob, charlie } = t.context.accounts;
const { root, contract } = t.context.accounts;
const message: null = await contract.view("get_status", {
account_id: root,
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"parcel-bundler": "^1.12.5",
"postcss": "^8.3.6",
"sass": "^1.37.0",
"near-workspaces": "^2.0.0",
"near-workspaces": "^3.1.0",
"ava": "^4.2.0",
"typescript": "^4.6.4",
"ts-node": "^10.7.0"
Expand Down
Binary file modified res/status_message.wasm
Binary file not shown.

0 comments on commit 8db2761

Please sign in to comment.