NativeScript / nx

NativeScript for Nx.
Other
64 stars 17 forks source link

[FEATURE REQUEST] Option to include testing as part of creating new nativescript app #7

Closed mahmoudajawad closed 2 years ago

mahmoudajawad commented 3 years ago

Overview

The app generated by nx g @nativescript/nx:app does generate app, but doesn't include testing parts.

Details

Update template and options to create new app with testing framework enabled.

NathanWalker commented 2 years ago

The merged PR provides a test builder which can be used like everything else to invoke tests from root of workspace with standard semantics, can add this to the target/architect replacing app name with yours:

"test": {
      "executor": "@nativescript/nx:test",
      "outputs": ["coverage/apps/nativescript-mobile"],
      "options": {
        "coverage": false // applies to both platforms
      },
      "configurations": {
        "android": {}, // can turn coverage on per platform if desired as well here
        "ios": {}
      }
    },

Can be invoked with:

nx run nativescript-mobile:test:ios

We're updating to angular 13 and will add the test generator which would generate the test entry and setup to any apps specified via prompts next. This will also include a prompt to add tests during app generation.

mahmoudajawad commented 2 years ago

Amazing work as always from ending in nativescript!