unit testing for freshly created angular project is broken on android simulator
See original GitHub issueEnvironment
$ tns doctor
✔ Getting environment information
No issues were detected. ✔ Your ANDROID_HOME environment variable is set and points to correct directory. ✔ Your adb from the Android SDK is correctly installed. ✔ The Android SDK is installed. ✔ A compatible Android SDK for compilation is found. ✔ Javac is installed and is configured properly. ✔ The Java Development Kit (JDK) is installed and is configured properly. ✔ Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods are installed. ✔ CocoaPods update is not required. ✔ CocoaPods are configured properly. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python ‘six’ package is found. ✔ Xcode version 10.1.0 satisfies minimum required version 9. ✔ Getting NativeScript components versions information… ✔ Component nativescript has 5.1.0 version and is up to date. ✔ Component tns-core-modules has 5.1.0 version and is up to date. ✔ Component tns-android has 5.1.0 version and is up to date. ✔ Component tns-ios has 5.1.0 version and is up to date.
karma.conf.js contains // list of files / patterns to load in the browser files: [ ‘src/tests/**/*.js’ ],
android simulator: Nexus_S_API_28
Describe the bug unit testing for freshly created angular project is broken on android
To Reproduce run commands
$ tns create demo-mocha-tests-ng --ng
$ tns test init
select mocha
$ tns test android
after running test application run is failed
$ tns run android
see screenshot above
app can be run only after command
$ tns platform clean android
Expected behavior example test should run on android
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (3 by maintainers)
Thank you. When I added suggested line to
App_Resources/Android/src/main/AndroidManifest.xml
I was able to run example test but when I created a simple typescript test:the run fails
I see two issues reported above:
tns run
after tns test requireplatform clean
Issue #1 is fixed in
nativescript-unit-test-runner@0.4.1
andnativescript@next
(will be shipped in 5.2.0).Issue #2 is duplicate of https://github.com/NativeScript/nativescript-cli/issues/3146#issuecomment-457686993