-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm-bindgen-test-runner: Added test features to the invocation runti…
…mes deno with_one_successful_test.
- Loading branch information
Showing
11 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
tests/wasm_bindgen_test_runner/__features__/invocation/runtimes/deno/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod with_one_successful_test; |
5 changes: 5 additions & 0 deletions
5
...bindgen_test_runner/__features__/invocation/runtimes/deno/with_one_successful_test/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod outputs_its_running_1_test_feature; | ||
mod outputs_no_error_feature; | ||
mod outputs_the_assembly_test_summary_feature; | ||
mod outputs_the_successful_test_summary_feature; | ||
mod returns_success_feature; |
12 changes: 12 additions & 0 deletions
12
..._/invocation/runtimes/deno/with_one_successful_test/outputs_its_running_1_test_feature.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use crate::__steps__::assembly::given_there_is_an_assembly_with_one_successful_test; | ||
use crate::__steps__::standard_output::then_the_standard_output_should_have; | ||
use crate::__steps__::wasm_bindgen_test_runner::when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
use crate::__steps__::Context; | ||
|
||
#[test] | ||
fn outputs_its_running_1_test_feature() { | ||
let mut context = Context::new(); | ||
given_there_is_an_assembly_with_one_successful_test(&mut context); | ||
when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno(&mut context); | ||
then_the_standard_output_should_have(context, "running 1 test"); | ||
} |
12 changes: 12 additions & 0 deletions
12
..._features__/invocation/runtimes/deno/with_one_successful_test/outputs_no_error_feature.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use crate::__steps__::assembly::given_there_is_an_assembly_with_one_successful_test; | ||
use crate::__steps__::standard_error::then_the_standard_error_should_be_empty; | ||
use crate::__steps__::wasm_bindgen_test_runner::when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
use crate::__steps__::Context; | ||
|
||
#[test] | ||
fn outputs_no_error_feature() { | ||
let mut context = Context::new(); | ||
given_there_is_an_assembly_with_one_successful_test(&mut context); | ||
when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno(&mut context); | ||
then_the_standard_error_should_be_empty(context); | ||
} |
15 changes: 15 additions & 0 deletions
15
...ation/runtimes/deno/with_one_successful_test/outputs_the_assembly_test_summary_feature.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use crate::__steps__::assembly::given_there_is_an_assembly_with_one_successful_test; | ||
use crate::__steps__::standard_output::then_the_standard_output_should_have; | ||
use crate::__steps__::wasm_bindgen_test_runner::when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
use crate::__steps__::Context; | ||
|
||
#[test] | ||
fn outputs_the_assembly_test_summary_feature() { | ||
let mut context = Context::new(); | ||
given_there_is_an_assembly_with_one_successful_test(&mut context); | ||
when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno(&mut context); | ||
then_the_standard_output_should_have( | ||
context, | ||
"test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out", | ||
); | ||
} |
15 changes: 15 additions & 0 deletions
15
...ion/runtimes/deno/with_one_successful_test/outputs_the_successful_test_summary_feature.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use crate::__steps__::assembly::given_there_is_an_assembly_with_one_successful_test; | ||
use crate::__steps__::standard_output::then_the_standard_output_should_have; | ||
use crate::__steps__::wasm_bindgen_test_runner::when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
use crate::__steps__::Context; | ||
|
||
#[test] | ||
fn outputs_the_successful_test_summary_feature() { | ||
let mut context = Context::new(); | ||
given_there_is_an_assembly_with_one_successful_test(&mut context); | ||
when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno(&mut context); | ||
then_the_standard_output_should_have( | ||
context, | ||
"test assembly_with_one_successful_test::pass ... ok", | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
...__features__/invocation/runtimes/deno/with_one_successful_test/returns_success_feature.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use crate::__steps__::assembly::given_there_is_an_assembly_with_one_successful_test; | ||
use crate::__steps__::success::then_success_should_have_been_returned; | ||
use crate::__steps__::wasm_bindgen_test_runner::when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
use crate::__steps__::Context; | ||
|
||
#[test] | ||
fn returns_success_feature() { | ||
let mut context = Context::new(); | ||
given_there_is_an_assembly_with_one_successful_test(&mut context); | ||
when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno(&mut context); | ||
then_success_should_have_been_returned(context); | ||
} |
1 change: 1 addition & 0 deletions
1
tests/wasm_bindgen_test_runner/__features__/invocation/runtimes/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
mod deno; | ||
mod node; |
3 changes: 3 additions & 0 deletions
3
tests/wasm_bindgen_test_runner/__steps__/wasm_bindgen_test_runner/deno/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mod when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno; | ||
|
||
pub use when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno::*; |
13 changes: 13 additions & 0 deletions
13
..._runner/deno/when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use crate::__steps__::{wasm_bindgen_test_runner::wasm_bindgen_test_runner_command, Context}; | ||
|
||
pub fn when_wasm_bindgen_test_runner_is_invoked_with_the_assembly_targeting_deno( | ||
context: &mut Context, | ||
) { | ||
let mut command = wasm_bindgen_test_runner_command(); | ||
|
||
command.env("WASM_BINDGEN_USE_DENO", "true"); | ||
|
||
command.arg(context.sandbox_mut().assembly()); | ||
|
||
context.output_set(command.output()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters