Commit graph

67 commits

Author SHA1 Message Date
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
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
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
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
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
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
4818109c9a
Merge branch 'next' into iss-1798 2018-05-04 14:08:39 +02:00
Pierre-Yves Gérardy
d2e80f7345
A more general fix 2018-05-04 14:05:42 +02:00
Pierre-Yves Gérardy
769c854f82 Expose the reporter as o.report(results), have it return the number of errors 2017-11-30 23:25:31 +01:00
Pierre-Yves Gérardy
acd08c96dd Make the stack trace cleaner IE9 compatible (err.stack is null) 2017-11-30 23:00:26 +01:00
Pierre-Yves Gérardy
b84e09369e ospec: better stack trace filter, fix #2036 2017-11-30 16:10:14 +01:00
Pierre-Yves Gérardy
0873cb53cc Make the stack trace filter path-independent (auto-detection vs. hardcoded previously) 2017-11-30 00:27:08 +01:00
Pierre-Yves Gérardy
b38ba7c934 Pop report() off the stack (for better Flems output) 2017-11-29 22:15:45 +01:00
Pierre-Yves Gérardy
f06510bb62 Make ospec work natively in browser environments 2017-11-29 22:15:45 +01:00
Sage Gerard
78eeb2b365 feat(ospec): Allow custom reporters for CI reasons (#2019) (#2020) 2017-11-20 15:37:07 -08:00
Isiah Meadows
3c608f26b7
Merge pull request #1984 from RodericDay/newlines-in-error-messages
Handle newlines in error messages, fixes #1495
2017-10-28 20:20:34 -04:00
spacejack
0736f848cb Silence global-require rule in ospec, add ecma 2017 parser to eslintrc for async/await in test-ospec 2017-10-28 17:39:32 -04:00
Roderic Day
8fe7088398 Handle newlines in error messages, fixes #1495 2017-10-10 23:10:06 -04:00
Rasmus Porsager
406a08d836 Use util.inspect to log in node - fixes #1661 2017-09-01 14:02:58 +02:00
Stephan Hoyer
39be9134f9 Support err as first argument for done callbacks in async tests 2017-08-31 19:31:08 +02:00
Stephan Hoyer
b345e4f023 Support promise return in ospec 2017-08-31 19:31:08 +02:00
Pierre-Yves Gérardy
cbb3db7b88 Merge branch 'next' into ospec-named-suites 2017-07-06 22:12:39 +02:00
Jonah
277ac9e171 Fix issue #1798 2017-04-15 16:05:08 -04:00
Isiah Meadows
1cc5fa5ba7 "use strict" and other linty fixes 2017-03-03 18:24:38 -05:00
Pierre-Yves Gerardy
b70ba6709a [ospec] stricter valid context for test definitions and assertions 2017-02-13 19:39:32 +01:00
Pierre-Yves Gerardy
9b3e646303 [ospec] make o.only noisier 2017-02-11 23:02:06 +01:00
Pierre-Yves Gerardy
2c2ca73c22 [ospec] Add the possibility to name new test suites 2017-01-10 21:29:34 +01:00
Pierre-Yves Gerardy
bd519f3c23 [ospec] fix nextTickish() 2017-01-10 14:59:09 +01:00
Leo Horie
6c5a7e6e62 Merge branch 'rewrite' into next-tick 2017-01-10 08:18:50 -05:00
Pierre-Yves Gerardy
396a7ff4e4 [ospec] Simplify the dupe checker 2017-01-09 10:24:03 +01:00
Pierre-Yves Gerardy
a7ea060a64 [ospec] Add hasOwn shortcut 2017-01-09 10:16:53 +01:00
Pierre-Yves Gerardy
f13561e200 [ospec] Improve the dupe detection code 2017-01-08 21:20:43 +01:00
Leo Horie
9ad16858a5 #1520 ospec: report duplicate test names 2017-01-08 13:05:27 -05:00
Bryce Gibson
1dec7eb3f6 Use process.nextTick if available to reduce stack size. 2017-01-03 19:04:11 +11:00
Pierre-Yves Gerardy
df1e19b86c [ospec] Fix for objects with undefined properties 2017-01-01 16:13:11 +01:00
Pierre-Yves Gerardy
02545a8a98 [ospec] Fix array deepEquals corner cases 2017-01-01 15:52:54 +01:00
Leo Horie
b62663bdc1 ensure properties in arrays are tested #1497 2016-12-31 19:27:23 -05:00