Karma misses some polyfills
Closed this issue · 4 comments
Two different errors on two different machines: Reflect.defineMetadata is not a function
and Map is not defined
Chrome 48.0.2564 (Windows 10 0.0.0) ERROR: 'Potentially unhandled rejection [3] TypeError: Reflect.defineMetadata is not a function
at Object.define (http://localhost:9876/base/jspm_packages/npm/aurelia-metadata@1.0.0-beta.1.1.5/aurelia-metadata.js:34:15)
at http://localhost:9876/base/jspm_packages/npm/aurelia-dependency-injection@1.0.0-beta.1.1.4/aurelia-dependency-injection.js:227:33
at http://localhost:9876/base/src/common/widget-base.js:252:33
at execute (http://localhost:9876/base/src/common/widget-base.js:254:9)
at ensureEvaluated (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2981:26)
at ensureEvaluated (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2973:11)
at Object.execute (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:3099:13)
at doDynamicExecute (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:715:25)
at link (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:908:20)
at doLink (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:569:7)'
Chromium 37.0.2062 (Ubuntu 0.0.0) ERROR: 'Potentially unhandled rejection [3] ReferenceError: Map is not defined
at Object.<anonymous> (http://localhost:9876/base/jspm_packages/npm/aurelia-metadata@1.0.0-beta.1.1.5/aurelia-metadata.js:49:27)
at execute (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:3721:30)
at linkDynamicModule (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2921:32)
at linkDynamicModule (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2915:11)
at linkDynamicModule (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2915:11)
at linkDynamicModule (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2915:11)
at link (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:2764:11)
at Object.execute (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:3096:13)
at doDynamicExecute (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:715:25)
at link (http://localhost:9876/base/jspm_packages/system.src.js?6536115be64e0ff966e05546f7767676fa7c03d6:908:20)'
karma.conf.js: https://github.com/aurelia-ui-toolkits/aurelia-kendoui-bridge/blob/eb898f9bb3b6ee58235f81601c90783ba8a08802/karma.conf.js
repository: https://github.com/aurelia-ui-toolkits/aurelia-kendoui-bridge/
For the Map error: Perhaps aurelia-metadata is just missing the dependency to aurelia-polyfills and it needs to import it?
Where are you seeing this? I thought all of our own projects were fixed. If it's your own project, then you will need to install aurelia-polyfills as a dev dependency and then reference it from your tests. You can see one of our binding repo's test setup for an example.
@JeroenVinke see eg SpoonX/aurelia-orm#44 to update test setup
Thanks, it is my own project and it is even mentioned in the release blog post:
We've configured our unit tests to use our own polyfills (via a dev dependency).
Should be good then 👍