Commit Graph

25 Commits

Author SHA1 Message Date
7ff90f1490 js: Return scalar types instead of Number objects
99% of the time we don't want to deal with opaque handles to `Number`
objects.
2018-07-05 13:02:40 -07:00
9d3b26341e Add binding for Date.prototype.getDate 2018-07-05 17:09:59 +02:00
efa4a2b8fa Speed up Travis by running Webpack in fewer tests (#381)
* Reorganize Travis configuration

* Add a `JOB` env var descriptor to all matrix entries. Not used anywhere but is
  useful when viewing the whole build on Travis's web interface.
* Reorganize where builds are located, moving slow builds first and fast ones
  last.
* Change checking the CLI builds from `cargo build` to `cargo check`
* Use YAML references to reduce some duplication

* Print some more timing statistics for each test

* Extract `Project` helper in tests to a module

This'll help make it a bit more extensible over time. At the same time the
methods are also slightly reorganized to read more clearly from top to bottom.

* Migrate all tests away from Webpack

Wepback can take a significant amount of time to execute and when it's
multiplied by hundreds of tests that adds up really quickly! After investigating
Node's `--experimental-modules` option it looks like it's suitable for our use
so this switches all tests to using JS files (moving away from TypeScript as
well) with `--experimental-modules` with Node.

Tests will be selectively re-enabled with webpack and node.js specific output
(that doesn't require `--experimental-modules`), coming in later commits.

* Restore the node test for node.js output

Ensures it's workable as-is

* Only generate typescript with webpack

* Only read wasm files for webpack

* Skip package.json/node_modules for now

* Only generate webpack config if needed

* Start a dedicated test module for typescript

Will hopefully verify the generated Typescript compiles OK.

* Remove unneeded `node` method

* Fixup some rebase conflicts

* Don't run asmjs example on travis

* Fixup generator tests

* Attempt to fix windows

* Comment windows fix

* More test fixes

* More exclusions

* More test fixes

* Relax eslint regex

Catch mjs modules as well

* Fix eslint

* Speed up travis on examples slightly
2018-07-04 22:37:09 -05:00
e912b9d2a2 Merge pull request #374 from Hywan/js_test_date_locale
test(js) Fix expectations regarding given locales
2018-07-04 22:25:05 +02:00
f5d4751c0b test(js) Check the types and lightly the data, but not that much.
Because NodeJS can have different i18n behaviors depending of the
version, let's keep things simple. In this case, we want to test the
types,
period. Cf. https://github.com/rustwasm/wasm-bindgen/pull/374#issuecomment-402447333
2018-07-04 16:47:51 +02:00
2694dd4dee Merge pull request #385 from toVersus/js_date
bindings for date.getDay/getFullYear
2018-07-04 14:56:22 +02:00
e95994fd19 bindings for Date.prototype.getFullYear() 2018-07-04 19:52:12 +09:00
3007e813ea bindings for Date.prototype.getDay() 2018-07-04 19:41:06 +09:00
54523d82ed test(js) Fix expectations regarding given locales. 2018-07-03 14:37:38 +02:00
df5fec22d9 fix(js) Use f64 instead of Number. 2018-07-03 14:26:00 +02:00
fe4c150431 Merge branch 'master' into js_date 2018-07-03 14:12:05 +02:00
9127a0419f rustfmt all the things 2018-06-27 22:42:34 -07:00
a4d47afda6 feat(js) Implement the Date.UTC binding. 2018-06-27 09:41:16 +02:00
e334c0c5af feat(js) Implement the Date.now binding. 2018-06-27 09:40:40 +02:00
ef27cb6392 Add date constructor 2018-06-26 16:55:40 +02:00
f9ae7f49ad Add date to date string
fix failing test case
2018-06-26 16:55:40 +02:00
dd3e8cc8b8 Add date to iso string 2018-06-26 16:55:40 +02:00
8f21393c6b Add date to json 2018-06-26 16:55:40 +02:00
be44ad8ad8 Add date to locale date string 2018-06-26 16:55:40 +02:00
4e05bc470f Add date to locale string 2018-06-26 16:55:40 +02:00
c0aba821d5 Add date to locale time string 2018-06-26 16:55:40 +02:00
ca17ef8d7c Add date to string 2018-06-26 16:55:40 +02:00
f30de17c2b Add date to time string 2018-06-26 16:55:39 +02:00
033ba3f3a7 Add date to utc string 2018-06-26 16:55:39 +02:00
cd189d53c4 Add date value of 2018-06-26 16:55:36 +02:00