Skip to content

Commit

Permalink
added jest-raw-loader to fix some issues with svg icon tests
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Jan 6, 2020
1 parent e98d72e commit acd909b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/test-apputils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"chai": "^4.2.0",
"jest": "^24.9.0",
"jest-junit": "^10.0.0",
"jest-raw-loader": "^1.0.1",
"react": "~16.9.0",
"simulate-event": "~1.4.0",
"ts-jest": "^24.2.0"
Expand Down
5 changes: 4 additions & 1 deletion testutils/src/jest-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ module.exports = function(name: string, baseDir: string) {
preset: 'ts-jest/presets/js-with-babel',
moduleNameMapper: {
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'\\.(gif|ttf|eot|svg)$': '@jupyterlab/testutils/lib/jest-file-mock.js'
'\\.(gif|ttf|eot)$': '@jupyterlab/testutils/lib/jest-file-mock.js'
},
transform: {
'\\.svg$': 'jest-raw-loader'
},
setupFilesAfterEnv: ['@jupyterlab/testutils/lib/jest-script.js'],
setupFiles: ['@jupyterlab/testutils/lib/jest-shim.js'],
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9471,6 +9471,11 @@ jest-pnp-resolver@^1.2.1:
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a"
integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==

jest-raw-loader@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/jest-raw-loader/-/jest-raw-loader-1.0.1.tgz#ce9f56d54650f157c4a7d16d224ba5d613bcd626"
integrity sha1-zp9W1UZQ8VfEp9FtIkul1hO81iY=

jest-regex-util@^24.3.0, jest-regex-util@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636"
Expand Down

0 comments on commit acd909b

Please sign in to comment.