-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A simple Jest preset that configures module mapping and produces human-readable styles (i.e., not converted to numeric form). Fix #928 Fix #963
- Loading branch information
Showing
7 changed files
with
35 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"moduleNameMapper": { | ||
"^react-native$": "<rootDir>/node_modules/react-native-web/dist/cjs" | ||
}, | ||
"setupFiles": [ | ||
"<rootDir>/node_modules/react-native-web/jest/setup.js" | ||
], | ||
"testEnvironment": "jsdom" | ||
} |
299 changes: 0 additions & 299 deletions
299
packages/react-native-web/jest/__tests__/__snapshots__/serializer-test.js.snap
This file was deleted.
Oops, something went wrong.
92 changes: 0 additions & 92 deletions
92
packages/react-native-web/jest/__tests__/serializer-test.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint-env jasmine, jest */ | ||
|
||
'use strict'; | ||
|
||
global.__DEV__ = true; | ||
|
||
const mockEmptyObject = {}; | ||
|
||
// Make sure snapshots contain the original style objects | ||
jest.mock('../dist/cjs/modules/ReactNativePropRegistry', () => ({ | ||
register: id => id, | ||
getByID: () => mockEmptyObject | ||
})); | ||
|
||
jest.mock('../dist/modules/ReactNativePropRegistry', () => ({ | ||
register: id => id, | ||
getByID: () => mockEmptyObject | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters