You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using date-holidays in my angular project. Everything works fine but my unit tests all fail after importing it. It looks like date-holidays won't compile with commonjs module:
Uncaught TypeError: date_holidays_1.default is not a constructor
Here is my tsconig.spec
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs", <-- changing so something like "es2015" works fine (but breaks other things not related to date-holdays. I need to keep it as commonjs)
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
The text was updated successfully, but these errors were encountered:
I upgraded to Angular 7 and this issue has gone away. This version comes with some upgrades to some of the testing dependencies angular uses (Karma/Jasmine) which likely fixed itself. This can be closed.
I'm using date-holidays in my angular project. Everything works fine but my unit tests all fail after importing it. It looks like date-holidays won't compile with commonjs module:
Here is my tsconig.spec
The text was updated successfully, but these errors were encountered: