update unit test mocks and restructure test dir structure

This commit is contained in:
John Mitchell
2018-11-02 13:44:13 -04:00
parent 90273247ac
commit 19dcf5ed59
30 changed files with 36 additions and 34 deletions

View File

@@ -3,11 +3,12 @@ module.exports = {
'src/**/*.{js,jsx}'
],
moduleNameMapper: {
'^[./a-zA-Z0-9$_-]+\\.svg$': '<rootDir>/__tests__/stubs/svgStub.js'
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|scss|less)$': '<rootDir>/__mocks__/styleMock.js'
},
setupTestFrameworkScriptFile: '<rootDir>/jest.setup.js',
testMatch: [
'<rootDir>/__tests__/tests/**/*.{js,jsx}'
'<rootDir>/__tests__/**/*.{js,jsx}'
],
testEnvironment: 'jsdom',
testURL: 'http://127.0.0.1:3001',