Tim Oxley
403a28c8ce
Support use of t.end as callback, closes #180
* Binds all Test.prototype methods to current test.
* Checks for truthy error as first argument to Test.prototype.end.
9 years ago
Sindre Sorhus
6b628846c3
minor style tweaks
9 years ago
Jonathan Haines
05bee73b52
Close #165 PR: Support Observable. Fixes #84
9 years ago
James Talmage
15bd79402c
extend exit delay on AppVeyor
add small delay on exit from babel
(cherry picked from commit 11961f7)
if AVA is not required in a test, throw an error instead of process.exit
only extend timeout if env.AVA_APPVEYOR is set, so we only slow down
in our tests.
9 years ago
James Talmage
c5d02f1f3c
report uncaught exceptions
9 years ago
James Talmage
862edb8526
report unhandled promise rejections
9 years ago
Sindre Sorhus
78a6c56e3d
tweaks
9 years ago
James Talmage
a3308d2297
Handle empty results from test files. Fix #198
9 years ago
James Talmage
d6fed1c7c4
regression: logger throws on files with both passing and failing tests.
log.errors() cycles through all the results from a file (passing and failing)
and prints out a summary of the failing tests and the assertion errors.
It was misidentfying all results as errors, and then throwing
when result.error turned out to be an empty object ({}).
I think the result object can be improved such that
result.error === false when there were no errors.
But that is for another PR.
9 years ago
James Talmage
732b4c231b
fork.js: Reject child-process completion promise with an error.
It is generally recommended to reject Promises with an error.
This becomes especially true with the move to `async/await`,
as `Promise.reject(1)` essentially becomes `throw 1` in that context.
Not doing so was causing a weird bug on Node 0.10.
9 years ago
vdemedes
41fd96f907
add test.skip()
9 years ago
vdemedes
ac832d1a2e
event data improvements
9 years ago
vdemedes
55d3613bed
display only failed hooks
9 years ago
James Talmage
6a8f0e7a7c
Close #169 PR: Fix Windows onExit failure..
9 years ago
James Talmage
0dad4552cb
test() should throw if no callback is provided. Fixes #172
9 years ago
Vsevolod Strukchinsky
1396fb880e
use co-with-promise instead of git url in package.json
9 years ago
Vsevolod Strukchinsky
04c687bc6d
Check for SIGTERM exit code
9 years ago
Vsevolod Strukchinsky
de0955b0e1
add ava modules to test module paths
Closes #144
9 years ago
Kazato Sugimoto
18619fcc6d
Use local babel in babel-plugin-espower
Fix the issue that babel-plugin-espower resolves a different Babel version
9 years ago
vdemedes
1d01665f70
wait for fork to exit and then return results
9 years ago
vdemedes
c81fb629e6
kill forked processes after tests are done
9 years ago
James Talmage
4d907aa8fa
move `kill()` function to promise from result
9 years ago
Sam Verschueren
10dccb9dd3
Close #124 PR: Refactor promises in throws method.
9 years ago
Sam Verschueren
257c4148a3
Close #125 PR: Add string support to throws.
9 years ago
Sam Verschueren
a6eb96dbb4
Throws returns the promise
9 years ago
James Talmage
7087a08dda
forcibly kill every forked subprocess.
Killing the parent process skips execution of `end` listeners
on remaining forked child processes.
This interferes with `nyc` if processes are kept running after
test completion.
Refrence: https://github.com/bcoe/nyc/issues/52
9 years ago
Vsevolod Strukchinsky
1d5ef4c5f6
Close #103 PR: Replace babel require hook with transformFileSync.
9 years ago
vdemedes
bb1304c5be
don't display test title, if there's only one anonymous test
9 years ago
Sindre Sorhus
5fd57c1807
improve context sharing for beforeEach/afterEach
re https://github.com/sindresorhus/ava/pull/106#issuecomment-150966370
9 years ago
Sindre Sorhus
aa594ed99b
use `has-flag` module
9 years ago
vdemedes
a76ced6279
shared context between tests and beforeEach/afterEach hooks
9 years ago
Sindre Sorhus
6ae46ce004
code style tweaks
9 years ago
Sindre Sorhus
52b0ccb33c
use the test file path in the Babel whitelist instead of a pattern
since we're only using this once per file now
http://babeljs.io/docs/usage/options/#options
9 years ago
vdemedes
3cf17e2049
add serial mode
9 years ago
vdemedes
468fae6e98
set process.cwd() to a test's directory
9 years ago
vdemedes
c84c48a8c3
support running the test file only via cli
9 years ago
Kazato Sugimoto
c96622d6d8
Close #46 PR: Less API using power-assert.
9 years ago
vdemedes
593a6f9c99
fix throws behavior to avoid false-positives and support regex
9 years ago
vdemedes
da58c623fc
ensure that hooks run only around tests, fix #89
9 years ago
vdemedes
eb54eb658b
add fail-fast mode
9 years ago
Sindre Sorhus
98a7402ba3
work around Babel giving anonymous functions a name
9 years ago
vdemedes
aaa00b9025
add support to t.plan() + promises
9 years ago
vdemedes
d14c6e37fa
handle promises in throws()
9 years ago
vdemedes
f6d3521e4a
add beforeEach/afterEach hooks
9 years ago
vdemedes
e9b3e5019d
prefix test title with test location
9 years ago
Sindre Sorhus
328ca3d243
use strict deep assert checking - fixes #68
9 years ago
vdemedes
4c6e2afc1c
wait for pending tests
9 years ago
vdemedes
0da796f2a8
use asyncToGenerator transform
9 years ago
vdemedes
a0de27799c
blacklist regenerator to not transpile generator functions
9 years ago
vdemedes
1a16b1b6b9
use co() for running generator functions
9 years ago