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

Add yarn flag to the anchor test command #267

Merged
merged 2 commits into from
May 9, 2021

Conversation

michaelhly
Copy link
Contributor

@michaelhly michaelhly commented May 8, 2021

Add option to run anchor test via yarn.

$ ../../anchor/cli/target/debug/anchor test --help
anchor-test 
Runs integration tests against a localnetwork

USAGE:
    anchor test [FLAGS] [file]

ARGS:
    <file>    

FLAGS:
    -h, --help                    Prints help information
        --skip-deploy             Use this flag if you want to run tests against previously deployed
                                  programs
        --skip-local-validator    Flag to skip starting a local validator, if the configured cluster
                                  url is a localnet
    -V, --version                 Prints version information
        --yarn                    Use this flag if you want to use yarn as your JavaScript package manager

Test:

$ ../../anchor/cli/target/debug/anchor test --yarn
BPF SDK: /Users/user/.local/share/solana/install/releases/1.6.6/solana-release/bin/sdk/bpf
Running: rustup toolchain list -v
Running: cargo +bpf build --target bpfel-unknown-unknown --release
    Finished release [optimized] target(s) in 0.76s

To deploy this program:
  $ solana program deploy /Users/user/Projects/monorepo/lockup/target/deploy/lockup.so
yarn run v1.22.10
$ /Users/user/Projects/monorepo/lockup/node_modules/.bin/mocha -t 1000000 tests/

  Lockup and Registry
    ✓ Sets up initial test state (353ms)
    ✓ Is initialized! (503ms)
    ✓ Deletes the default whitelisted addresses (495ms)
    ✓ Sets a new authority (1010ms)

...

@armaniferrante armaniferrante merged commit 425997a into coral-xyz:master May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants