You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
492 B

const detox = require('detox')
const config = require('../package.json').detox
const adapter = require('detox/runners/mocha/adapter')
const { reset } = require('./utils')
before(async () => {
await detox.init(config)
})
beforeEach(async function () {
try {
await reset()
} catch (e) {
// some tests cannot reset, it's ok.
}
await adapter.beforeEach(this)
})
afterEach(async function () {
await adapter.afterEach(this)
})
after(async () => {
await detox.cleanup()
})