This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
unit testing with webpack #895
Open
Description
I did update tns to version 5.4 and I tried to run the test with the project created by nativescript cli. However, karma did not work in the browser.
The following error appears: global is not defined.
I tried the commands:
npm i nativescript-dev-webpack@latest --save-dev
./node_modules/.bin/update-ns-webpack --deps --configs
Versions:
"karma": "4.1.0", "karma-chrome-launcher": "^2.2.0", "karma-jasmine": "2.0.1", "karma-nativescript-launcher": "0.4.0", "karma-webpack": "3.0.5", "nativescript-dev-typescript": "~0.9.0", "nativescript-dev-webpack": "^0.22.0"
In the webpack.config:
output: { pathinfo: false, path: dist, sourceMapFilename, libraryTarget: "commonjs2", filename: "[name].js", globalObject: "global", hashSalt }