Js sys once over (#550)

* js-sys: Return `f64` instead of `Number`

* js-sys: remove trailing whitespace

* js-sys: Ensure that all imported types derive Clone and Debug

* js-sys: Imported functions should always take JS object arguments by-ref
This commit is contained in:
Nick Fitzgerald
2018-07-25 14:33:44 -07:00
committed by Alex Crichton
parent 93933f033f
commit 61fc8d2567
18 changed files with 216 additions and 184 deletions

View File

@ -92,7 +92,7 @@ impl Context {
pub fn run(&self, tests: Vec<JsValue>) -> bool {
let this = JsValue::null();
let args = Array::new();
args.push(JsValue::from(self as *const Context as u32));
args.push(&JsValue::from(self as *const Context as u32));
let noun = if tests.len() == 1 { "test" } else { "tests" };
console_log!("running {} {}", tests.len(), noun);