-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix(schematics): migrate spec to skipTest to be in line with Angular CLI #2253
Conversation
cc: @timdeschryver |
Preview docs changes for 866ecc2 at https://previews.ngrx.io/pr2253-866ecc2/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found another usage of spec at schematics-core/testing/create-workspace
const defaultModuleOptions = {
name: 'foo',
spec: true,
module: undefined,
flat: false,
};
I think this const
isn't used, so you can remove the whole declaration. After that you'll have to run npm run copy:schematics
.
Could you also update the docs please? If you search on --spec
in the ngrx.io
folder, you will find all occurrences.
Thanks for looking into it I will update the PR soon with your findings. |
So I changed as I believe the correct things now and made updates to the docs. Hope that these are the correct changes. |
Okay, I don't exactly know why the bazel tests are failing. Is it because of my changes? |
@@ -16,7 +16,7 @@ export default function(options: FeatureOptions): Rule { | |||
name: options.name, | |||
path: options.path, | |||
project: options.project, | |||
spec: false, | |||
skipTest: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for now, but could we introduce a skipTest
flag for the feature
schematic @brandonroberts ?
By default, we create spec files for every schematic, but not for this schematic.
@Jefiozie I don't think it's because of the changes, let me re-trigger the CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you revert the changes made in docs/*
please, these are the docs for v4-6 - and are working with previous versions of Angular. Thus, here it will remain spec
.
Reverted the |
@Jefiozie could you also add a breaking change note to the PR please, you can find a template in CONTRIBUTING.MD |
I added the breaking changes request. |
@Jefiozie will you resolve the merge conflicts? Thanks! |
I did the merge on my tablet I see that there are problems. Will fix this later this week. |
@brandonroberts, I merged all the latest changes into my branch. At first I thought the failing tests where because of my changes however I believe that it is because of recent changes in the master branch around #2301. Could you o maybe @alex-okrushko verify this? (would love to know this for sure 😄 ) |
I also noticed the failing build, should be resolved if #2313 is merged. |
Thanks @timdeschryver |
@brandonroberts i think it's good to merge now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jefiozie can you rebase please (in order to keep the CI happy)?
Closes: ngrx#2242 BREAKING CHANGES: To be inline with the Angular CLI, we migrated the `--spec` to `--skipTest`. By default skipTest is false, this way you will always be provided with `*.spec.ts files` BEFORE: ```sh ng generate action User --spec ``` AFTER: ```sh ng generate action User ```
@timdeschryver, I believe it should be correct now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jefiozie
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
You need to use the
spec
option for generating test files.Closes #2242
What is the new behavior?
We are now inline with the Angular CLI
skipTest
option.Does this PR introduce a breaking change?
Other information