wasm-bindgen/crates/js-sys/tests/wasm
Alex Crichton eee71de0ce
Support asynchronous tests (#600)
* Tweak the implementation of heap closures

This commit updates the implementation of the `Closure` type to internally store
an `Rc` and be suitable for dropping a `Closure` during the execution of the
closure. This is currently needed for promises but may be generally useful as
well!

* Support asynchronous tests

This commit adds support for executing tests asynchronously. This is modeled
by tests returning a `Future` instead of simply executing inline, and is
signified with `#[wasm_bindgen_test(async)]`.

Support for this is added through a new `wasm-bindgen-futures` crate which is a
binding between the `futures` crate and JS `Promise` objects.

Lots more details can be found in the details of the commit, but one of the end
results is that the `web-sys` tests are now entirely contained in the same test
suite and don't need `npm install` to be run to execute them!

* Review tweaks

* Add some bindings for `Function.call` to `js_sys`

Name them `call0`, `call1`, `call2`, ... for the number of arguments being
passed.

* Use oneshots channels with `JsFuture`

It did indeed clean up the implementation!
2018-08-01 15:52:24 -05:00
..
Array.rs Adds Array.prototype.splice() to js-sys (#571) 2018-07-27 10:07:21 -07:00
ArrayBuffer.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
ArrayIterator.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
Boolean.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
DataView.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
Date.rs Tweak js-sys tests to pass in Firefox 2018-07-25 16:55:11 -07:00
Error.rs Js sys use &str arguments (#555) 2018-07-25 18:50:30 -05:00
Function.js Migrate Function tests to wasm 2018-07-20 12:43:07 -07:00
Function.rs Add support for headless testing 2018-07-30 11:07:07 -07:00
Generator.js Port Generator tests to wasm 2018-07-20 12:56:32 -07:00
Generator.rs Js sys use &str arguments (#555) 2018-07-25 18:50:30 -05:00
global_fns.rs add unescape 2018-07-21 23:06:36 +02:00
Intl.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
JsString.rs Js sys use &str arguments (#555) 2018-07-25 18:50:30 -05:00
main.rs Create bindings for RegExp (#580) 2018-07-29 16:13:42 -07:00
Map.rs Port Map tests to wasm 2018-07-20 13:46:22 -07:00
MapIterator.rs js-sys: Unify all iterators under one generic iterator type 2018-07-26 13:48:52 -07:00
Math.rs Implement Math.min() and Math.max() bindings (#542) 2018-07-23 23:50:29 -05:00
Number.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
Object.js Port Object tests to wasm 2018-07-20 15:23:56 -07:00
Object.rs implements bindings for Object.is (#537) 2018-07-22 12:42:10 -05:00
Proxy.js Port Proxy tests to wasm 2018-07-20 15:35:15 -07:00
Proxy.rs Port Proxy tests to wasm 2018-07-20 15:35:15 -07:00
Reflect.js Port Reflect tests to wasm 2018-07-21 20:07:55 -07:00
Reflect.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
RegExp.rs Support asynchronous tests (#600) 2018-08-01 15:52:24 -05:00
Set.rs Port Set tests to wasm 2018-07-20 15:44:15 -07:00
SetIterator.rs js-sys: Unify all iterators under one generic iterator type 2018-07-26 13:48:52 -07:00
Symbol.js Port Symbol and SetIterator tests to wasm 2018-07-20 16:19:10 -07:00
Symbol.rs Js sys use &str arguments (#555) 2018-07-25 18:50:30 -05:00
TypedArray.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
WeakMap.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00
WeakSet.rs Port WeakSet tests to wasm 2018-07-20 17:07:00 -07:00
WebAssembly.rs Js sys once over (#550) 2018-07-25 16:33:44 -05:00