Nx: Dropped support for Karma and Jasmine

Created on 9 Jul 2019  路  2Comments  路  Source: nrwl/nx

Expected Behavior

Creating a new Workspace, and then Angular app should allow selection of Karma as a test runner

Current Behavior

only Jest and Cypress is now available. Karma and Protractor have disappeared.

Failure Information (for bugs)

Why have you silently dropped support for Karma and Jasmine when Angular CLI still supports it as a first class citizen? (I've read your Jest doc)
I _totally_ agree with you that we should all go to Jest - and plan to go that way for all future projects. But, dropping support for existing projects silently is a bit troublesome. I'm trying to re-scaffold a new workspace @latest and drop in an old project, but I can't without involved configuration.
Is there a location/channel I can watch for breaking changes like this that I've missed? This change doesn't appear on Google search.

Steps to Reproduce

  1. npm init nx-workspace@latest myworkspace
  2. npm install --dev @nrwl/angular
  3. ng g @nrwl/angular:application myapp

Context

Please provide any relevant information about your setup:

  • version of Nx used @latest
  • version of Angular CLI used 8.0.3

Most helpful comment

The option is still there. We just removed the prompt.

You can pass it like this:

ng g @nrwl/angular:app myapp --unit-test-runner=karma

All 2 comments

The option is still there. We just removed the prompt.

You can pass it like this:

ng g @nrwl/angular:app myapp --unit-test-runner=karma

@vsavkin why does the schematic ignore the defaults specified in angular.json?

// angular.json
// ...
"schematics": {
    "@nrwl/schematics:component": {
      "styleext": "scss"
    },
    "@nrwl/schematics:library": {
      "unitTestRunner": "karma",
      "framework": "angular"
    },
    "@nrwl/schematics:application": {
      "unitTestRunner": "karma",
      "e2eTestRunner": "protractor"
    },
    "@nrwl/schematics:node-application": {
      "framework": "express"
    }
  }
}

ng g lib mylib uses jest, even though the config in angular.json sets the unitTestRunner to karma.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markphip picture markphip  路  3Comments

vimalraj-a picture vimalraj-a  路  3Comments

MichaelWarneke picture MichaelWarneke  路  3Comments

SWGeekPD picture SWGeekPD  路  3Comments

IonFoXx picture IonFoXx  路  3Comments