This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Known issues with NPM modules
Floris Bernard edited this page Jul 13, 2016
·
18 revisions
- PhantomJS (which runs our unit tests) has very poor support for ES5. For example,
Array.find()
will fail.
workaround: include a polyfill in yourtest/index.ts
entry file.
- Libraries that use the
export =
syntax for exporting don't work in Typescript
workaround: add"allowSyntheticDefaultImports": true
to your tsconfig.json and import your libary using the syntaximport * as name from 'some-npm-module'
Sinon is not in our boilerplate by default but we will often include it for detecting function calls in unit tests.
- Sinon does not work well with webpack
workaround: use the sinon 2.0.0 prerelease
- karma-remap-istanbul (for source mapping in our test coverage report) fails on the first run with the following message:
WARN [reporter.remap-istanbul]: Could not find any specified files, exiting without doing anything.
When the output files are already there the error will disappear on the second run.
See: https://github.com/marcules/karma-remap-istanbul/issues/3