Skip to content

Commit 2731ebc

Browse files
dompuiuLFDanLusnowystinger
authored
Fix eslint errors. (#2342)
* Fix eslint errors. * Remove dead code Co-authored-by: Daniel Lu <[email protected]> Co-authored-by: Robert Snow <[email protected]>
1 parent 70af5d4 commit 2731ebc

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

__mocks__/iconMock.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

jest.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let mocks = {};
1818
try {
1919
require.resolve('@react/react-spectrum/Button');
2020
} catch (err) {
21-
mocks['^@react\/.*'] = 'identity-obj-proxy';
21+
mocks['^@react/.*'] = 'identity-obj-proxy';
2222
}
2323

2424
module.exports = {
@@ -101,7 +101,6 @@ module.exports = {
101101
moduleNameMapper: {
102102
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
103103
'\\.(css|styl)$': 'identity-obj-proxy',
104-
'\\.\./Icon/.*$': '<rootDir>/__mocks__/iconMock.js',
105104
...mocks
106105
},
107106

@@ -172,13 +171,13 @@ module.exports = {
172171
// The glob patterns Jest uses to detect test files
173172
// see issue https://github.com/facebook/jest/issues/7108
174173
testMatch: [
175-
"**/packages/**/*.test.[tj]s?(x)"
174+
'**/packages/**/*.test.[tj]s?(x)'
176175
],
177176

178177
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
179178
testPathIgnorePatterns: [
180-
"/node_modules/",
181-
"\\.ssr\\.test\\.[tj]sx?$"
179+
'/node_modules/',
180+
'\\.ssr\\.test\\.[tj]sx?$'
182181
]
183182

184183
// The regexp pattern or array of patterns that Jest uses to detect test files

jest.ssr.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ module.exports = {
2121
// A map from regular expressions to module names that allow to stub out resources with a single module
2222
moduleNameMapper: {
2323
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
24-
'\\.(css|styl)$': 'identity-obj-proxy',
25-
'\\.\./Icon/.*$': '<rootDir>/__mocks__/iconMock.js'
24+
'\\.(css|styl)$': 'identity-obj-proxy'
2625
},
2726

2827
// Run tests from one or more projects
@@ -43,6 +42,6 @@ module.exports = {
4342

4443
// The glob patterns Jest uses to detect test files
4544
testMatch: [
46-
"**/packages/**/*.ssr.test.[tj]s?(x)"
45+
'**/packages/**/*.ssr.test.[tj]s?(x)'
4746
]
4847
};

0 commit comments

Comments
 (0)