Commit Graph

40 Commits

Author SHA1 Message Date
7ecf4aae87 cargo +nightly fmt --all
Rustfmt all the things!
2018-09-26 08:26:00 -07:00
f9cd329b14 js-sys: Add js_sys::try_iter for iterating over any JsValue
Fixes #776
2018-09-25 14:30:26 -07:00
042cfad5ce feat(extends): extend promise 2018-08-24 02:15:02 +02:00
7432f5ff5c Merge branch 'master' of git://github.com/rustwasm/wasm-bindgen 2018-08-20 21:55:42 +02:00
d4297ad2d3 Remove use_extern_macros features
This has now been stabilized!
2018-08-19 14:33:01 -07:00
b698eb5d6a Add more WebAssembly bindings 2018-08-15 23:45:28 +02:00
539e987cdb Merge pull request #685 from fitzgen/a-few-more-js-sys-things
A few more js sys things
2018-08-11 07:52:26 +02:00
36e15149c7 js-sys: Add bindings for TypeError 2018-08-10 13:45:39 -07:00
38ef5f9ffe js-sys: Add bindings for SyntaxError 2018-08-10 13:42:13 -07:00
a58c2584b3 js-sys: Add bindings to URIError 2018-08-10 13:37:34 -07:00
2a3d01c380 Merge pull request #683 from eminence/json
Add initial support and tests for JSON
2018-08-10 13:27:40 -07:00
dc028d38c8 js-sys: Add bindings to ReferenceError 2018-08-10 13:03:56 -07:00
879fd43edb js-sys: Add bindings to RangeError 2018-08-10 13:03:44 -07:00
23cb0ea656 Add initial support and tests for JSON 2018-08-09 20:54:13 -04:00
70406fe18a Add support and tests for EvalError 2018-08-09 19:26:00 -04:00
f5f541337c Create bindings for RegExp (#580)
* Create bindings for RegExp

* Address review comments

- Split the constructor into two: `new` and `new_regexp`. This way we
  can write RegExp::new("foo", "g") rather than
  RegExp::new(&JsValue::from("foo"), "g").

- The js_name for the setter for lastIndex should be `lastIndex` and
  not `set_lastIndex`. But fixing this causes a panic. Remove the
  method for now.
2018-07-29 16:13:42 -07:00
61fc8d2567 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
2018-07-25 16:33:44 -05:00
59c04e26d4 Port Reflect tests to wasm 2018-07-21 20:07:55 -07:00
906cd7adcc Remove usage of wasm_import_module feature
This is now stabilized! Also tweak usage of it to the stable version.
2018-07-21 19:00:40 -07:00
2e5cc810c8 Migrate tests for global functions to wasm 2018-07-20 17:45:00 -07:00
5f87ed4cef Port WebAssembly tests to wasm 2018-07-20 17:09:50 -07:00
9f7eea1e75 Port WeakSet tests to wasm 2018-07-20 17:07:00 -07:00
1d1df09e60 Port WeakMap tests to wasm 2018-07-20 17:01:26 -07:00
b667cafb63 Port TypedArray tests to wasm 2018-07-20 16:31:29 -07:00
df3530a9c2 Port Symbol and SetIterator tests to wasm 2018-07-20 16:19:10 -07:00
54abca7344 Port Set tests to wasm 2018-07-20 15:44:15 -07:00
ad86c52b02 Port Proxy tests to wasm 2018-07-20 15:35:15 -07:00
01ff04d85c Port Object tests to wasm 2018-07-20 15:23:56 -07:00
fb6041cf3b Port Number tests to wasm 2018-07-20 14:35:44 -07:00
627ddcb192 Port Math tests to wasm 2018-07-20 14:21:29 -07:00
230f923fdb Port MapIterator tests to wasm 2018-07-20 13:57:18 -07:00
2c9a606c3d Port Map tests to wasm 2018-07-20 13:46:22 -07:00
f3e34d854d Port JsString tests to wasm 2018-07-20 13:35:46 -07:00
d76f619298 Port Intl tests to wasm 2018-07-20 13:00:44 -07:00
067de51e57 Port Generator tests to wasm 2018-07-20 12:56:32 -07:00
75215134a5 Migrate Function tests to wasm 2018-07-20 12:43:07 -07:00
20e9267775 Port Error tests to wasm 2018-07-20 12:21:41 -07:00
601b138296 Port Date tests to wasm 2018-07-20 12:07:41 -07:00
efd6b2abac Migrate Array tests to wasm-bindgen-test 2018-07-20 11:48:57 -07:00
f8d336d711 Add a test harness to directly execute wasm tests (#524)
* Add a test harness to directly execute wasm tests

This commits adds a few new crates and infrastructure to enable comands like:

    cargo test --target wasm32-unknown-unknown

The intention here is to make it as low-friction as possible to write wasm tests
and also have them execute in a reasonable amount of time. Eventually this is
also hopefully enough support to do things like headless testing!

For now though this is defintely MVP status rather than fully fleshed out.
There's some more information at `crates/test/README.md` about how it works and
how to use it, but for now this is mainly intended to play around with locally
in this repository for our own tests.

* Port a numbe of `js-sys` tests to the new test framework

This commit ports a number of existing tests for the `js-sys` crate over to the
new test framework created in the previous commit, showing off how they can be
executed as well as drastictlly simplifying the tests themselves! This is
intended to be a proof of concept for now which we can refine over time. This
should also show off that it's possible to incrementally move over to the new
test framework.
2018-07-20 13:47:49 -05:00