mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[change] introduce Jest preset
A simple Jest preset that configures module mapping and produces human-readable styles (i.e., not converted to numeric form). Fix #928 Fix #963
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
import Enzyme from 'enzyme';
|
||||
import createSerializer from '../../packages/react-native-web/jest/createSerializer';
|
||||
import { StyleSheet } from '../../packages/react-native-web/src';
|
||||
|
||||
const serializer = createSerializer(StyleSheet);
|
||||
import serializer from './serializer';
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
// TODO: move off legacy serializer
|
||||
expect.addSnapshotSerializer(serializer);
|
||||
|
||||
Reference in New Issue
Block a user