Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NorbertBodziony committed Feb 28, 2021
1 parent fbd1e4e commit c0fa7f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ _examples: &examples
before_install:
- nvm install $NODE_VERSION
- npm install -g mocha
- npm install -g ts-mocha
- npm install -g @project-serum/anchor
- npm install -g @project-serum/serum
- npm install -g @project-serum/common
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ incremented for features.

* ts: Allow preloading instructions for state rpc transactions ([cf9c84](https://github.com/project-serum/anchor/commit/cf9c847e4144989b5bc1936149d171e90204777b)).
* cli: Specify programs to embed into local validator genesis via Anchor.toml while testing.
* cli: Adds support for tests with Typescript ([#94](https://github.com/project-serum/anchor/pull/94)).

## Fixes

Expand Down
14 changes: 6 additions & 8 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,8 @@ fn test(skip_deploy: bool) -> Result<()> {
let ts_config_exist = Path::new("tsconfig.json").exists();

// Run the tests.
let exit;
if ts_config_exist {
exit = std::process::Command::new("ts-mocha")
let exit = match ts_config_exist {
true => std::process::Command::new("ts-mocha")
.arg("-p")
.arg("./tsconfig.json")
.arg("-t")
Expand All @@ -631,17 +630,16 @@ fn test(skip_deploy: bool) -> Result<()> {
.env("ANCHOR_PROVIDER_URL", cfg.cluster.url())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;
} else {
exit = std::process::Command::new("mocha")
.output()?,
false => std::process::Command::new("mocha")
.arg("-t")
.arg("1000000")
.arg("tests/")
.env("ANCHOR_PROVIDER_URL", cfg.cluster.url())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;
}
.output()?,
};

if !exit.status.success() {
if let Some(mut validator_handle) = validator_handle {
Expand Down

0 comments on commit c0fa7f5

Please sign in to comment.