Skip to content

Commit f72fead

Browse files
author
Kent C. Dodds
committed
moduleDirectories example
1 parent a103c9b commit f72fead

11 files changed

+5
-1
lines changed

src/calculator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import styles from './calculator.module.css'
88
// splitting in this example because it's something you have to
99
// handle with Jest and many people will want to know :).
1010
const CalculatorDisplay = loadable({
11-
loader: () => import('./calculator-display').then(mod => mod.default),
11+
loader: () => import('calculator-display').then(mod => mod.default),
1212
loading: () => <div style={{height: 120}}>Loading display...</div>,
1313
})
1414

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/jest-common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const path = require('path')
55
module.exports = {
66
rootDir: path.join(__dirname, '..'),
77
moduleFileExtensions: ['js', 'json', 'jsx', 'node', 'css'],
8+
moduleDirectories: ['node_modules', path.join(__dirname, 'src'), 'shared'],
89
moduleNameMapper: {
910
// module must come first
1011
'\\.module\\.css$': 'identity-obj-proxy',

0 commit comments

Comments
 (0)