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

Rename test Context in JS #1280

Merged
merged 1 commit into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/cli/src/bin/wasm-bindgen-test-runner/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn execute(
const support = require("./{0}");
const wasm = require("./{0}_bg");

cx = new support.Context();
cx = new support.WasmBindgenTestContext();
handlers.on_console_debug = support.__wbgtest_console_debug;
handlers.on_console_log = support.__wbgtest_console_log;
handlers.on_console_info = support.__wbgtest_console_info;
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/bin/wasm-bindgen-test-runner/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn spawn(
let mut js_to_execute = format!(
r#"
import {{
Context,
WasmBindgenTestContext as Context,
__wbgtest_console_debug,
__wbgtest_console_log,
__wbgtest_console_info,
Expand Down
4 changes: 2 additions & 2 deletions crates/test/src/rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub mod node;
///
/// The node.js entry script instantiates a `Context` here which is used to
/// drive test execution.
#[wasm_bindgen]
#[wasm_bindgen(js_name = WasmBindgenTestContext)]
pub struct Context {
state: Rc<State>,
}
Expand Down Expand Up @@ -199,7 +199,7 @@ pub fn log(args: &fmt::Arguments) {
js_console_log(&args.to_string());
}

#[wasm_bindgen]
#[wasm_bindgen(js_class = WasmBindgenTestContext)]
impl Context {
/// Creates a new context ready to run tests.
///
Expand Down