mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-11-01 14:14:11 +01:00
13 lines
246 B
JavaScript
13 lines
246 B
JavaScript
|
/**
|
||
|
* Hook for mocha tests in node
|
||
|
* Initialises chai and chai-as-promised as global variables
|
||
|
*/
|
||
|
|
||
|
export const mochaHooks = {
|
||
|
async beforeEach() {
|
||
|
if (typeof chai === 'undefined') {
|
||
|
global.chai = await import('chai')
|
||
|
}
|
||
|
},
|
||
|
}
|