tcomb-form-native: Jest tests are broken: Error: Cannot find module './datepicker' from 'index.js'
Version
Tell us which versions you are using:
- tcomb-form-native v0.4.0
- react-native v0.22.2
Expected behaviour
Tests should pass as they used to!
Actual behaviour
Error: Cannot find module ‘./datepicker’ from ‘index.js’
Steps to reproduce
- git clone git@github.com:bartonhammond/snowflake.git
- npm3 install
- npm3 test
✓ it if disabled and not checked, it should display square-o and text
FAIL src/components/__tests__/LoginForm-test.js
Runtime Error
Error: Cannot find module './datepicker' from 'index.js'
at Loader._resolveNodeModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:431:11)
at Object.<anonymous> (/Users/barton/projects/MFV/snowflake/node_modules/tcomb-form-native/lib/templates/bootstrap/index.js:5:12)
at Object.<anonymous> (/Users/barton/projects/MFV/snowflake/node_modules/tcomb-form-native/index.js:3:15)
1 test suite failed, 74 tests passed (74 total in 11 test suites, run time 7.245s)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 23 (10 by maintainers)
The following seems to work w/ JEST testing!
Here is the full
package.json
wrt Jest setup:Would you like a PR w/ a note in the README?
@bartonhammond I’ve opened a SO question about this http://stackoverflow.com/questions/36479136/test-platform-specific-extension-code-for-react-native
Have you managed to test platform-specific code under
snowflake
?