Skip to content
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
Open
@HtaSophia

Description

@HtaSophia

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.

image

image

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions