Skip to content

Commit 7863c29

Browse files
committed
fix(jest): avoid aurelia-bindings v1+v2 conflict
This is a similar fix to jest as #906 to webpack. Thank @ariovistus to point this out at https://discourse.aurelia.io/t/jest-cannot-find-module/2217/3
1 parent 43e9280 commit 7863c29

File tree

1 file changed

+8
-0
lines changed
  • lib/commands/new/buildsystems/general/unit-test-runners

1 file changed

+8
-0
lines changed

lib/commands/new/buildsystems/general/unit-test-runners/jest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ module.exports = function(project) {
2727
);
2828

2929
project.package.jest = {
30+
moduleNameMapper: {
31+
// avoid aurelia-bindings v1+v2 conflict
32+
'^aurelia-binding$': '<rootDir>/node_modules/aurelia-binding'
33+
},
3034
modulePaths: [
3135
'<rootDir>/src',
3236
'<rootDir>/node_modules'
@@ -65,6 +69,10 @@ module.exports = function(project) {
6569
);
6670

6771
project.package.jest = {
72+
moduleNameMapper: {
73+
// avoid aurelia-bindings v1+v2 conflict
74+
'^aurelia-binding$': '<rootDir>/node_modules/aurelia-binding'
75+
},
6876
modulePaths: [
6977
'<rootDir>/src',
7078
'<rootDir>/node_modules'

0 commit comments

Comments
 (0)