mirror of https://github.com/lukechilds/ava.git
Sindre Sorhus
9 years ago
17 changed files with 35 additions and 41 deletions
@ -1,7 +1,7 @@ |
|||
import test from '../../'; |
|||
|
|||
test(t => { |
|||
var circular = ['a', 'b']; |
|||
const circular = ['a', 'b']; |
|||
circular.push(circular); |
|||
t.same([circular, 'c'], [circular, 'd']); |
|||
}); |
|||
|
@ -1,9 +1,9 @@ |
|||
const test = require('../../'); |
|||
import test from '../../'; |
|||
|
|||
test.cb('creates an unhandled rejection', t => { |
|||
Promise.reject(new Error(`You can't handle this!`)); |
|||
|
|||
setTimeout(function () { |
|||
setTimeout(() => { |
|||
t.end(); |
|||
}); |
|||
}); |
|||
|
@ -1,7 +1,7 @@ |
|||
const test = require('../../'); |
|||
import test from '../../'; |
|||
|
|||
test('throw an uncaught exception', t => { |
|||
test('throw an uncaught exception', () => { |
|||
setImmediate(() => { |
|||
throw function () {}; |
|||
throw () => {}; |
|||
}); |
|||
}); |
|||
|
@ -1,9 +1,9 @@ |
|||
const test = require('../../'); |
|||
import test from '../../'; |
|||
|
|||
function fooFn() {} |
|||
|
|||
test('throw an uncaught exception', t => { |
|||
test('throw an uncaught exception', () => { |
|||
setImmediate(() => { |
|||
throw fooFn |
|||
throw fooFn; |
|||
}); |
|||
}); |
|||
|
@ -1,7 +1,7 @@ |
|||
const test = require('../../'); |
|||
import test from '../../'; |
|||
|
|||
test('throw an uncaught exception', t => { |
|||
test('throw an uncaught exception', () => { |
|||
setImmediate(() => { |
|||
throw new Error(`Can't catch me!`) |
|||
throw new Error(`Can't catch me!`); |
|||
}); |
|||
}); |
|||
|
Loading…
Reference in new issue