-
-
Notifications
You must be signed in to change notification settings - Fork 70
Description
I'm submitting a bug report
- Library Version:
1.6.2 / 2.0.0
Please tell us about your environment:
-
Operating System:
OSX -
Node Version:
6.11.4 -
NPM Version:
3.10.10 -
JSPM OR Webpack AND Version
webpack 3.8.1 -
Browser:
Jest -
Language:
TypeScript 2.6.1
Setup:
I'm using a slighly changed version of the Aurelia Skeleton for Webpack and Typescript.
There I have tests, which mock i18n => https://github.com/w3tecch/aurelia-typescript-boilerplate/blob/feature/dependency-update/test/unit/app.spec.ts#L50
I have now upgraded to the latest dependencies regarding Aurelia and everything from building to running the app in the browser (even e2e test) work fine.
Sadly the jest unit tests are broken with the following errror:
ReferenceError: Element is not defined
at Object.<anonymous> (node_modules/aurelia-i18n/dist/commonjs/t.js:59:24)
at Object.<anonymous> (node_modules/aurelia-i18n/dist/commonjs/aurelia-i18n.js:34:10)
at Object.<anonymous> (src/app.spec.ts:2:16)
This error disappears when I remove aurelia-i18n.
There is no difference in using version 1.6.2 or 2.0.0. So I think it has something to do with the other Aurelia dependencies, which are the lastest as of today.
The tests in aurelia-i18n repository are using aurelia-pal-browser. On the other hand the Aurelia-CLI and the Aurelia Skeleton are using the aurelia-pal-nodejs and so do I. Maybe this makes some difference regarding this issue.
If you like to reproduce checkout this branch, yarn install and run npm test:
https://github.com/w3tecch/aurelia-typescript-boilerplate/tree/feature/dependency-update
Thanks for any advise / help