Skip to content

Commit

Permalink
fixes Linking error with react-native-router-flux
Browse files Browse the repository at this point in the history
  • Loading branch information
bdougie committed Jan 4, 2017
1 parent 1fc172a commit ff5666e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion vndr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"react-test-utils": "^0.0.1"
},
"jest": {
"preset": "react-native"
"preset": "react-native",
"testRegex": "./test/[^setup].*.js$",
"mocksPattern": "./test/mocks/.*.js$",
"transformIgnorePatterns": ["node_modules/(?!react-native|native-base|react-clone-referenced-element)"],
"setupFiles": [
"./test/setup.js"
]
}
}
2 changes: 1 addition & 1 deletion vndr/src/List.test.js → vndr/src/test/List.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import List from './List';
import List from '../List';
import { shallow } from 'enzyme';

const dummyVendor = {
Expand Down
9 changes: 9 additions & 0 deletions vndr/test/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
jest.mock('Linking', () => {
return {
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
openURL: jest.fn(),
canOpenURL: jest.fn(),
getInitialURL: jest.fn(),
}
})

0 comments on commit ff5666e

Please sign in to comment.