Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data path "" must NOT have additional properties(skipTests). Angular 12.0.0 #20811

Closed
1 task done
inidaname opened this issue May 16, 2021 · 5 comments · Fixed by #20842
Closed
1 task done

Data path "" must NOT have additional properties(skipTests). Angular 12.0.0 #20811

inidaname opened this issue May 16, 2021 · 5 comments · Fixed by #20842
Milestone

Comments

@inidaname
Copy link
Contributor

inidaname commented May 16, 2021

🐞 Bug report

Command (mark with an x)

  • generate

Is this a regression?

Yes, the previous version in which this bug was not present was: 11 ....

Description

A clear and concise description of the problem...

I initiated a new angular project in which I had --skip-tests flag for the application on running the module generate command I got this error

🔬 Minimal Reproduction

generate new project ng new appName --skip-tests
generate new module ng generate module shared

🔥 Exception or Error

Schematic input does not validate against the Schema: {"skipTests":true,"name":"shared","project":"search"}
Errors:

  Data path "" must NOT have additional properties(skipTests).

🌍 Your Environment

    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.0.0
Node: 14.15.1
Package Manager: npm 6.14.8
OS: linux x64

Angular: 12.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.0
@angular-devkit/build-angular   12.0.0
@angular-devkit/core            12.0.0
@angular-devkit/schematics      12.0.0
@schematics/angular             12.0.0
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

@inidaname
Copy link
Contributor Author

Checked and identified that cli set the module schematics on angular.json to skipTests: true this will always pass error as module initial does not produce any test files, will be happy to send in a PR to fix this.

on line 28 of my angular.json

        "@schematics/angular:module": {
          "skipTests": true
        },

@alan-agius4
Copy link
Collaborator

A PR is welcome.

@patil2097
Copy link

Hi @alan-agius4 , I am new to this project. I would love to contribute. Can you guide me a little on how I can close this issue ?

@alan-agius4
Copy link
Collaborator

alan-agius4 commented May 18, 2021

@patil2097, the fix should be pretty straight forward. You need to remove the linked line

You can read our contribution guidelines here: https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-a-pull-request-pr

Patil2099 added a commit to Patil2099/angular-cli that referenced this issue May 19, 2021
Patil2099 added a commit to Patil2099/angular-cli that referenced this issue May 19, 2021
alan-agius4 pushed a commit that referenced this issue May 19, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants