-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
resolveNoFileExtensions.test.ts.snap
43 lines (30 loc) · 1.13 KB
/
resolveNoFileExtensions.test.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`show error message when no js moduleFileExtensions 1`] = `
● Validation Error:
moduleFileExtensions must include 'js':
but instead received:
["jsx"]
Please change your configuration to include 'js'.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
`;
exports[`show error message with matching files 1`] = `
FAIL __tests__/test.js
● Test suite failed to run
Cannot find module './some-json-file' from 'index.js'
Require stack:
index.js
__tests__/test.js
However, Jest was able to find:
'./some-json-file.json'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring
6 | */
7 |
> 8 | module.exports = require('./some-json-file');
| ^
9 |
at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:307:11)
at Object.require (index.js:8:18)
at Object.require (__tests__/test.js:8:11)
`;