Skip to content

Commit

Permalink
clean up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
radex committed Mar 24, 2021
1 parent 42d2373 commit 399443e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
16 changes: 8 additions & 8 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const getBlacklistRE = () => {
glob(`${path.resolve(__dirname, '..')}/dist/*`),
glob(`${path.resolve(__dirname, '..')}/dev/*`),
glob(`${path.resolve(__dirname, '..')}/example/*`),
// 'graceful-fs',
])
.toString()
.slice(1, -1)
Expand All @@ -22,18 +21,19 @@ const getBlacklistRE = () => {
const config = {
projectRoot: path.resolve(__dirname),
watchFolders: [
// path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'native'),
path.resolve(__dirname, 'node_modules', '@babel'),
],
resolver: {
extraNodeModules: {
fs: path.resolve(__dirname, 'src', 'fs-mock'),
'graceful-fs': path.resolve(__dirname, 'src', 'fs-mock'),
module: path.resolve(__dirname, 'src', 'fs-mock'),
assert: path.resolve(__dirname, 'src', 'fs-mock'),
stream: path.resolve(__dirname, 'src', 'fs-mock'),
constants: path.resolve(__dirname, 'src', 'fs-mock'),
// We need `expect` package for RN integration tests… but the damn thing expects to be in jest
// (Node) environment… so we have to mock a bunch of stuff for this to work
fs: path.resolve(__dirname, 'src/__tests__/emptyMock'),
'graceful-fs': path.resolve(__dirname, 'src/__tests__/emptyMock'),
module: path.resolve(__dirname, 'src/__tests__/emptyMock'),
assert: path.resolve(__dirname, 'src/__tests__/emptyMock'),
stream: path.resolve(__dirname, 'src/__tests__/emptyMock'),
constants: path.resolve(__dirname, 'src/__tests__/emptyMock'),
},
blacklistRE: getBlacklistRE(),
},
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/emptyMock/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Mock out stupid Node packages that expect (jest) requires
module.exports = {
read() {},
}
3 changes: 0 additions & 3 deletions src/fs-mock/index.js

This file was deleted.

0 comments on commit 399443e

Please sign in to comment.