Socket
Book a DemoInstallSign in
Socket

detox-take-screenshot

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detox-take-screenshot

A tiny hack to enable screenshot taking inside detox tests

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

detox-take-screenshot

npm version Dependency Status devDependencies Status npm

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()
  })
})

Keywords

detox

FAQs

Package last updated on 02 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts