Rename test Context in JS

This will hopefully help avoid symbol collisions with other projects
that have a struct named `Context`
This commit is contained in:
Alex Crichton
2019-02-20 09:23:00 -08:00
parent de85d99acd
commit 7fbe0210dc
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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,