Commit graph

154 commits

Author SHA1 Message Date
Isiah Meadows
4a641092dc
Officially drop IE9-10 support, pull out our hacks (#2296)
- I also fixed a bunch of related comments
- I had to polyfill `requestAnimationFrame` for Node
- Drive-by: run `eslint . --fix`
- Drive-by: update transpiling info in CONTRIBUTING.md
- Drive-by: we aren't the only ones going semicolon-free
2018-11-27 18:04:15 -05:00
Robin (Robert) Thomas
b5219920ab Ospec: expose messages for passing tests, in addition to failing tests (#2227)
* ospec: all results, failing and passing, include .message and .context

Previously only failing tests had .message and .context.

* Updated docs

* Function was ugly

* Ospec verbose passing tests: put changelog update in right place
2018-11-21 15:47:10 -05:00
Robin (Robert) Thomas
0fd1bc9cae Add 'throws'/'notThrows' assertion to Ospec for error reporting (#2255)
* Ospec: added assertion that function does/doesnt throw error

* Ospec.throws passes npm test

* Ospec.throws: Address requested changes

* Ospec: message comparison support for .throws/.notthrows

Credit to @maranomynet, #2227
2018-11-21 15:46:34 -05:00
Rasmus Porsager
c3896b92e6 output mithril, stream and ospec esm versions on build - fixes #2112 (#2194)
* output mithril, stream and ospec esm versions on build

* Add esm bundles

* [request] Clearer error message for JSON deserialization failure (#2195)

* Bundled output for commit fd7cf8041e [skip ci]

* Fix #1714 conditionally halting stream (#2200)

* Fix #1714 conditionally halting stream

* Add note in changelog

* Do not include stream as named export in mithril.esm.js

* Rename mithril.min.esm.js to mithril.esm.min.js

* Add esm files to eslintignore

* Add named exports

* Add hyperscript `m` as named export

* Add builds with export changes

* checkout regular bundled files

* Change .esm.js to .mjs

* Update pkg module to point to .mjs

* Fix for export names to avoid collision

* Updated bundled files
2018-11-14 15:37:08 -05:00
Isiah Meadows
97b6125654 Fixing bugs introduced by the big next merge
- Update package-lock.json
- Remove (failing) dupe ospec suite

Git didn't *quite* do the right thing here, so I had to fix a few
things.
2018-10-25 14:35:05 -04:00
Isiah Meadows
2635070734 Merge branch 'next' 2018-10-25 14:23:33 -04:00
Isiah Meadows
1ecc30a064 Fix custom elements attribute application, improve key checking
- Fix custom elements attribute application to acknowledge that not all
  custom elements operate purely based on attributes. (Plus, those
  blasted things are verbose as heck when you're working with them in
  raw form. It's also not that uncommon for functionality to be exposed
  via property and *not* attribute.)
- Don't memoize the normalized value when we 1. only use it once in each
  branch, and 2. only use it for a few special cases.
- Centralize the "has property key" code, so it's easier to tune and
  read. I also inlined a couple functions while I was at it since they
  were small and only used once.
- Actually test for how attributes are applied to raw DOM elements vs
  when we choose to use keys. When I first developed the patch, it
  silently worked, when I should've been breaking things.
2018-09-20 15:08:49 -04:00
Isiah Meadows
f844cc8134 Add functionality for inspecting arbitrary past calls
This made it much easier to debug multiple calls while developing this
patch.
2018-09-20 15:08:49 -04:00
Pierre-Yves Gérardy
e46d03f467 [ospec] v3.0.1 2018-06-30 20:28:28 +02:00
Rasmus Porsager
ecfa59c016 Fix glob inclusion on npm install 2018-06-30 20:19:24 +02:00
Pierre-Yves Gérardy
f39081b2a5 [opec] v3.0.0 2018-06-23 22:11:54 +02:00
Pierre-Yves Gérardy
3f5cabc5c5 Chore: Normalize the way we use eslint-disable 2018-06-01 21:27:02 +02:00
Pierre-Yves Gérardy
9016091adf [ospec] docs and change log 2018-06-01 20:22:58 +02:00
Pierre-Yves Gérardy
14695c9cda [ospec] Allow more than one o.only() test 2018-06-01 20:22:58 +02:00
Pierre-Yves Gérardy
a23216b987 [ospec] record errors thrown in tests as failures 2018-06-01 20:22:58 +02:00
Pierre-Yves Gérardy
53597871b8 [ospec] don't allocate task for tests that will be skipped in o.only mode, fix stack overflow 2018-06-01 20:22:58 +02:00
Pierre-Yves Gérardy
24875832e9
[ospec] Document changes made to the result objects. 2018-05-29 23:02:23 +02:00
Pierre-Yves Gérardy
0484758837 [ospec] docs and change log tweaks 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
d05bc9be49 [ospec] make it clear the timeout parameter is deprecated. 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
4a4377e553 [ospec] Make the specTimeout tests hopefully less flaky 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
aa0f9eae98 [ospec] o.defaultTimeout => o.specTimeout, and documentation.
The timeout parameter is deprecated but will still work for now
2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
25975c5ce4 [ospec] Restore the assertion success on async test finalization in time 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
8ebf036b8c [ospec] Improve the done() call checker 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
33180370ea [ospec] Change the reserved test name token from '__' to '\x01' 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
0574d193a0 [ospec] better variable name 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
285d00742d [ospec] Detect incomplete assertions 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
21a6a857ef [ospec] update change log 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
ad83d617e1 [ospec] replace ES6 std lib call with ES5 equivalent 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
e342805bfb [ospec] Add o.defaultTimeout() 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
9c1f8d5f35 [ospec] cleanup in code and tests, better error messages 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
e473536866 [ospec] cleanup o.only 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
f6e23da56c [ospec] update change log 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
8d78d493a7 [ospec] tests for the done() callback 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
64680425e7 [ospec] Add o.timeout() to set a timeout for Promise-based async tests 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
b292f75bd8 [ospec] don't count succesful async test termination as a test success 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
89b665fbf6 [ospec] revamp async testing finalization 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
ff1a07df1b [ospec] give async timeouts a proper stack trace 2018-05-29 22:42:20 +02:00
Gilbert
0f498e0aec Fix stack trace edge case 2018-05-25 17:45:01 +02:00
Pierre-Yves Gérardy
64b1e47e66
Change log cleanup 2018-05-25 16:18:31 +02:00
Pierre-Yves Gérardy
2969b8323c ospec v2.1.0 2018-05-25 15:12:12 +02:00
Pierre-Yves Gérardy
562d680981 [ospec/bin] Back to ES5 (and complimentary cleanup), fix #2160 2018-05-24 18:57:04 +02:00
Pierre-Yves Gérardy
010d8daae9 [ospec] pinpoint the o.only() call site 2018-05-22 18:35:26 +02:00
Már Örlygsson
2794ceb76f [ospec] Make the default reporting nicer looking (#2147)
* feat(ospec): Add spacing before report results

...sometimes tested code emits console.log() messages
which then blend in with ospec's report

* feat(ospec): Reword and prettify the report messages

* feat(ospec): Make console.errors more compact, yet more readable

* docs(ospec): Update change-log.md

* fix(ospec): Fix grammar when number of assertions is 1

* feat(ospec): Make "all passed" message bright green

* refactor(ospec): define `cStyle()` helper for browser styling

* feat(ospec): Use en-dashes for the horizontal divider

* feat(ospec): Revert stacktrace coloring, make context bright red

...and add extra newline above each error - for readability
in commandline (node.js) mode

* feat(ospec): Improve the only-test-passed message

"1 assertion passed" --> "The 1 assertion passed"

* docs: Update LOC count
2018-05-22 18:19:54 +02:00
Pierre-Yves Gérardy
95fbdf9ea2
[ospec] change log: credit @zyrolasting 2018-05-09 21:11:52 +02:00
Pierre-Yves Gérardy
9df3e97cc3 [ospec] v2.0.0 2018-05-09 21:04:24 +02:00
Gilbert
91b08c6491 Add --require feature to ospec executable (#2144)
* Allow requires before running tests

This enables requiring modules like `esm` before any test files are loaded.

* Update ospec documentation

Also add documentation for `--require` option

* Update ospec change-log.md

* [opsec] move the change log item to v2.0

* [ospec] tweak the docs
2018-05-09 17:46:55 +02:00
Pierre-Yves Gérardy
43053c6088
[ospec] don't output colors when pipe or file redirection is used (#2143) 2018-05-09 07:58:47 +02:00
Pierre-Yves Gérardy
ca1bce9732
[ospec] Update change log to reflect #2141 2018-05-07 01:52:49 +02:00
Már Örlygsson
ceabe993a3 fix(ospec): Only run o.run() once (#2142) 2018-05-07 01:46:56 +02:00
Már Örlygsson
cfaa377c1e [ospec] feat: nicer binary with support for globs (#2141)
* feat(ospec): CLI support for file-patterns and an --ignore flag

The added dependency is only used by the node.js binary - which normally only ever installed via npm/yarn anyway.

This does not interfer with ospec proper being dependencyless.

* chore(mithril): Add glob dependency needed by the ospec binary

this is only needed while ospec is inlined in the
mithril repo. As soon as ospec is split away into a
standalone npm module, this will not be required anymore.

* refactor(ospec): Use 'match' events instead of callback

Performance should be similar, but the code looks
cleaner and easier to grok.

* Misc tweaks
2018-05-07 01:32:01 +02:00