detox-take-screenshot
v0.0.6
Published
A tiny hack to enable screenshot taking inside detox tests
Downloads
177
Readme
detox-take-screenshot
Takes screenshot and returns a temporary file. It is meant to be used with screenshot comparison tools like jest-screenshot or jest-image-snapshot.
Getting started
$ npm i detox-take-screenshot -D
Example
import jestExpect from 'expect'
import screenshot from 'detox-take-screenshot'
describe('Test', () => {
// ...
it('test case', async () => {
await jestExpect(await screenshot()).toMatchImageSnapshot()
})
})