near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
42 stars 21 forks source link

rename runtime to container and createFrom to clone #150

Closed ailisp closed 2 years ago

ailisp commented 2 years ago

Serhii pointed out runtime extends WorkspaceContainer doesn't make sense. We make a decision to keep WorkspaceContainer, therefore TestnetRuntime -> TestnetContainer, SandboxRuntime -> SandboxContainer. Also the runtime.createFrom doesn't make sense. It's actually mean, "clone". AccountManager.createFrom(config) is good and we keep the name.

Also, rename account.createTransaction to batch to align with workspaces-rs.

ailisp commented 2 years ago

@volovyk-s Seems the cleanup as part of fork will cause race conditions in tests. Main branch also fails randomly. I tried to remove the cleanup to debug the actual failure reason, but once removed, tests are passing. Since you'll move cleanup to afterEach, let's see whether that solves the problem.