nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Cannot run Karma Jasmine test even for HelloWorld

Open cupidchan opened this issue 4 years ago • 0 comments

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): ✔ Component nativescript has 8.0.1 version and is up to date. ns doctor shows all green check marks

Android Runtime: 4.1.3 iOS Runtime: 12.4 XCode Version: 12.4 Plugin(s): Describe the bug Cannot run ns test ios or ns test android even it's just the HelloWord template directly from NativeScript WITHOUT one line of code added.

To Reproduce

create a project call HelloWorld ns create HelloWorld 'cd HelloWorld' ns test init and pick Jasmine add the following steps to fix some known issues

  • npm install karma-webpack@next --save-dev
  • In karma.conf.js, add webpack to frameworks section frameworks: ['jasmine', 'webpack']
  • In tsconfig.json, add src/tests//*.ts in include section "include": ["src/tests//.ts", "src/**/.ios.ts", "src/**/*.android.ts"], 'ns test ios' or ns test android

Expected behavior Test should run and result display on the console

Sample project https://github.com/cupidchan/HelloWorld

Additional context

cupidchan avatar May 03 '21 21:05 cupidchan