尝试使用React.js和webpack设置Jest时出现此错误。 Jest不知何故不允许我不定义就导入文件。我应该如何解决这个问题?
错误 ({“ Object。”:function(module,exports,require,__ dirname,__ filename,global,jest){。title {
SyntaxError:意外令牌。 从“ ../../redux/sample/sample.action”导入{sampleAction}; ->导入'./landing.styles.scss';
非常感谢您的进步
jest.config.js
SELECT u1.[Branch], u1.[Barcode]
FROM [MHO_Report].[dbo].[Updated_SQLSOLD] u1
LEFT JOIN [MHO_Report].[dbo].[Updated_SQLSOLD] u2
ON u1.[Branch] = u2.[Branch]
AND u1.[Barcode] = u2.[Barcode] -- this line is optional
AND u1.[Barcode] = 25122225 -- assuming [Barcode] is a numeric field,
-- no need for quotes
依赖项
module.exports = {
clearMocks: true,
collectCoverageFrom: ['src/modules/**/*.{js,jsx,mjs}'],
coverageDirectory: 'coverage',
moduleFileExtensions: ['js', 'json', 'jsx'],
setupFiles: ['<rootDir>/enzyme.config.js'],
testEnvironment: 'jsdom',
testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
testPathIgnorePatterns: ['\\\\node_modules\\\\'],
testURL: 'http://localhost',
transformIgnorePatterns: ['<rootDir>/node_modules/'],
verbose: false,
};