James Talmage
c78c46fa85
Hide test internals. Fixes #252 .
Fixes #252 .
9 years ago
James Talmage
717030813a
test.async -> test.cb
9 years ago
James Talmage
f8168153c7
Breaking: t.plan() will not auto-end tests.
AVA will no longer automatically end tests when you reach the plan limit.
Users must explicitly call t.end().
It is now an error to return an async object (promise/observable) from
a legacy `test.async` test.
Reference:
https://github.com/sindresorhus/ava/issues/244#issuecomment-159348943
9 years ago
Sindre Sorhus
fa70351c3f
minor code style tweaks
9 years ago
James Talmage
387c30a056
Breaking: t.end requires test be declared async
Accessing `t.end` now throws an error unless the test is first
declared async via `test.async([title], fn)`
Reference:
https://github.com/sindresorhus/ava/issues/244
(cherry picked from commit 28b1641)
Initial implementation of #244 - require explicit test.async
9 years ago
James Talmage
b88c2baf39
Guard against clock manipulation by fake timer libraries. Fixes #128 .
9 years ago
James Talmage
d874ec9642
Close #243 PR: Make runner methods chainable.
9 years ago
James Talmage
eb9b339029
Close #259 PR: print the first assertion failure of each test, instead of the last. Fixes #121 , #220 . Fixes #121 , Fixes #220
9 years ago
James Talmage
f0109e29ba
context should not exist on before/after tests.
(cherry picked from commit f298d72)
9 years ago
Sindre Sorhus
0caf0cf7b2
modulify all the things
9 years ago
vdemedes
eb951fdc26
Close #240 PR: Clean up lib/test.js.
9 years ago
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
Sindre Sorhus
78a6c56e3d
tweaks
9 years ago
vdemedes
55d3613bed
display only failed hooks
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
Sam Verschueren
a6eb96dbb4
Throws returns the promise
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
vdemedes
a76ced6279
shared context between tests and beforeEach/afterEach hooks
9 years ago
Sindre Sorhus
6ae46ce004
code style tweaks
9 years ago
Kazato Sugimoto
c96622d6d8
Close #46 PR: Less API using power-assert.
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
4c6e2afc1c
wait for pending tests
9 years ago
vdemedes
1a16b1b6b9
use co() for running generator functions
9 years ago
vdemedes
879018bfc6
Close #57 PR: Add support for generator and async functions. Fixes #37 , Fixes #45
9 years ago
Joakim Carlstein
c87cbfd338
Don't overwrite an already existing assertError
9 years ago
Sindre Sorhus
ff5eebba5d
move assertions into AVA core
I realize this isn't very me like, but it will enable us to iterate faster and customize them for AVA's needs. We can consider moving it out again post-1.0.0. Also, a tiny assertion lib isn't very useful standalone anyways. If people are to use something that doesn't come with the testing framework they usually want something more powerful like Chai.
9 years ago
Vsevolod Strukchinsky
72af017093
remove EventEmitter from Test
9 years ago
Sindre Sorhus
5662d9fc8c
drop incorrect skip test implementation
can add it back correctly when #9 is resolved
9 years ago
Mahdi Dibaiee
b370dd5d59
Show only useful lines of stack trace - fixes #22
Closes #29
9 years ago
vdemedes
fa3ca81c0f
Promisification
Close #39 PR
Fixes #38
9 years ago
vdemedes
65dd453c50
add setImmediate() shim via set-immediate-shim module
9 years ago
vdemedes
a8d7c73eea
Close #30 PR: Output test execution time. Fixes #14
9 years ago
Sindre Sorhus
35b7e5bde2
support running `ava` without arguments
9 years ago
Sindre Sorhus
f3c12c1e4c
add XO
9 years ago
Sindre Sorhus
06f91fcaf6
control the error output again
10 years ago
Sindre Sorhus
b93d9198e1
pass along the fn to the plan!==count assertion
10 years ago
Sindre Sorhus
b4c5714226
rewrite assert counter
10 years ago
Sindre Sorhus
cdc9272f63
fix handling of plan() not matching assertions
10 years ago
Sindre Sorhus
083c7d14f6
fix assertion counting
10 years ago
Sindre Sorhus
1c8e89dd32
revert part of 74d0d16c5a
10 years ago
Kevin Martensson
894674ef6c
Tweaks
10 years ago
Kevin Martensson
edcc883aa3
Use `claim` as assertion library
Fixes #16 .
10 years ago
Kevin Martensson
d9bdebe398
Tweaks
10 years ago
Kevin Martensson
2b52e5a69b
Wrap `assert` instead of manually creating errors
Fixes #13 .
10 years ago
Sindre Sorhus
694b26871a
ensure there's an error before calling `err.toString`
10 years ago