mirror of https://github.com/lukechilds/this.git
dword-design
5 years ago
committed by
Luke Childs
4 changed files with 19 additions and 5 deletions
@ -0,0 +1,14 @@ |
|||||
|
import test from 'ava'; |
||||
|
|
||||
|
const cwd = process.cwd(); |
||||
|
const pkgPath = require.resolve('../'); |
||||
|
|
||||
|
test.afterEach.always(() => { |
||||
|
process.chdir(cwd); |
||||
|
delete require.cache[pkgPath]; |
||||
|
}); |
||||
|
|
||||
|
test.serial(`throws exceptions`, t => { |
||||
|
process.chdir('test/helpers/package-with-exception'); |
||||
|
t.throws(() => require(pkgPath)); |
||||
|
}); |
@ -0,0 +1 @@ |
|||||
|
throw new Error('error'); |
@ -0,0 +1 @@ |
|||||
|
{} |
Loading…
Reference in new issue