-
Notifications
You must be signed in to change notification settings - Fork 964
test: trim redundant e2e tests, move pure logic to unit specs #10651
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
Open
davidfirst
wants to merge
62
commits into
master
Choose a base branch
from
e2e-cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
86ddb05
test(e2e): remove redundant add/config e2e tests, add determine-main-…
davidfirst 23f127b
test(e2e): trim diff e2e tests
davidfirst c9b3b48
test(e2e): fix mislabeled describe title in export e2e
davidfirst d064888
test(e2e): trim import e2e tests
davidfirst 8d4db88
test(e2e): trim init e2e tests
davidfirst d15dbd2
test(e2e): trim list e2e tests
davidfirst ec76886
test(e2e): trim pattern e2e tests
davidfirst 0b6f4b3
test(e2e): fix mislabeled lane describe titles in remove e2e
davidfirst 42014fb
test(e2e): trim search e2e tests
davidfirst 7b57c23
test(e2e): trim tag e2e tests
davidfirst 1bcf370
test(e2e): remove duplicated assertion in doctor-git-exec e2e
davidfirst 423aed7
test(e2e): remove empty describe with dead setup in id-with-wildcard e2e
davidfirst 1136124
test(e2e): remove skipped test in out-of-sync e2e
davidfirst aa40bd7
test(e2e): trim sort-components-output e2e tests
davidfirst 69a215c
test: exercise index tie-break in determine-main-file spec, use consu…
davidfirst 055654c
test(e2e): remove no-op assertion in binary-files e2e
davidfirst 68773ce
test(e2e): trim components-index e2e tests
davidfirst a344d15
test(e2e): trim dev-dependencies e2e tests
davidfirst 034bc3f
test(e2e): trim dynamic-namespaces e2e tests
davidfirst 1d9b4d5
test(e2e): trim merge e2e tests
davidfirst 4322609
test(e2e): remove permanently-skipped describes in peer-dependencies e2e
davidfirst e06ba16
Merge remote-tracking branch 'origin/master' into e2e-cleanup
davidfirst 9421d14
test(e2e): trim peer-dependency-component e2e tests
davidfirst 3409f91
chore: update pnpm-lock after master merge
davidfirst 4a8de13
test(e2e): remove dead skipped describes in workspace-config e2e
davidfirst 6fc6e13
test(e2e): remove subsumed source-map assertion in babel e2e
davidfirst 3af757b
test(e2e): merge duplicate error assertions in build-cmd e2e
davidfirst 8635fce
test(e2e): trim checkout-harmony e2e tests
davidfirst 008e3f8
test(e2e): clean duplicated and orphan comments in ci-sync-branch-own…
davidfirst 40b1e88
test(e2e): clean duplicated and orphan comments in ci-sync-convergenc…
davidfirst d7f15f7
test(e2e): remove orphan split-leftover comments in ci-sync-lane-cycl…
davidfirst 5a2aa87
test(e2e): fix comment placement and remove orphan comments in ci-syn…
davidfirst 21a6b5d
test(e2e): remove orphan trailing comment in ci-sync-scopes e2e
davidfirst eee24ee
test(e2e): trim ci-bitmap-auto-sync e2e tests
davidfirst a5f6652
test(e2e): fix stale file references in ci-sync-state comments
davidfirst 49c1e2b
test(e2e): trim compile e2e tests
davidfirst 579c060
Merge remote-tracking branch 'origin/master' into e2e-cleanup
davidfirst 8e823db
test(e2e): trim component-config e2e tests
davidfirst 4963504
test(e2e): remove unused chai plugins from corrupted-objects e2e
davidfirst 75a02cb
test(e2e): trim create e2e tests
davidfirst c63cc61
Merge remote-tracking branch 'origin/master' into e2e-cleanup
davidfirst 3e5d887
test(e2e): merge load/run assertion pairs in custom-aspects e2e
davidfirst 2a1b66d
test(e2e): trim custom-env-operations e2e tests, fix no-op assertion
davidfirst aa5919c
test(e2e): remove dead skip and duplicate after hook in custom-env e2e
davidfirst ad34d94
test(e2e): remove simple scenario subsumed by complex in deduplicatio…
davidfirst ad4258a
test(e2e): fix stale config re-read in dependencies-cmd e2e
davidfirst b6e33a1
test(e2e): remove deprecated-yarn dead skip in never-built-dependenci…
davidfirst b30529f
test(e2e): merge capsule package.json pair in optional-dependencies e2e
davidfirst 04b5fd5
test(e2e): trim dependency-resolver e2e tests
davidfirst 5d896dd
test(e2e): remove deprecated-yarn dead skips in deps-in-capsules e2e
davidfirst 86cc51e
test(e2e): dedupe flag-independent assertions in eject-harmony e2e
davidfirst 6634c31
test(e2e): remove 5-year-skipped resume-export suites and their stale…
davidfirst 5cc109e
test(e2e): remove placeholder skip in extensions-config-diff e2e
davidfirst b796a27
test(e2e): trim extensions-config e2e tests
davidfirst 25e3a81
Merge remote-tracking branch 'origin/master' into e2e-cleanup
davidfirst b014c4f
chore: update pnpm-lock after master merge
davidfirst 13e9dc4
test(e2e): trim import-harmony e2e tests
davidfirst 377240c
test(e2e): fix copy-pasted test name in imported-component-deps e2e
davidfirst a995654
test(e2e): remove deprecated yarn describe in install-and-compile e2e
davidfirst 05f8d3c
test(e2e): remove dead yarn and obsolete skipped tests in install e2e
davidfirst 72bcd9f
test(e2e): remove pattern-variation describe in internalize e2e
davidfirst 4ebf563
test(e2e): drop duplicate jest runs in jest e2e
davidfirst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,70 +157,6 @@ describe('bit import', function () { | |
| expect(componentFileLocation).to.be.a.file(); | ||
| }); | ||
| }); | ||
| describe('when the destination is an existing empty directory', () => { | ||
|
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
|
||
| before(() => { | ||
| helper.scopeHelper.reInitWorkspace(); | ||
| helper.scopeHelper.addRemoteScope(); | ||
| fs.ensureDirSync(path.join(helper.scopes.localPath, 'my-custom-location')); | ||
| helper.command.runCmd(`bit import ${helper.scopes.remote}/global/simple -p my-custom-location`); | ||
| }); | ||
| it('should write the component to the specified path', () => { | ||
| expect(componentFileLocation).to.be.a.file(); | ||
| }); | ||
| }); | ||
| describe('when the destination directory is not empty', () => { | ||
| let output; | ||
| let existingFile; | ||
| before(() => { | ||
| existingFile = path.join(helper.scopes.localPath, 'my-custom-location/my-file.js'); | ||
| helper.scopeHelper.reInitWorkspace(); | ||
| helper.scopeHelper.addRemoteScope(); | ||
| fs.ensureDirSync(path.join(helper.scopes.localPath, 'my-custom-location')); | ||
| fs.outputFileSync(existingFile, 'console.log()'); | ||
| output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/global/simple -p my-custom-location` | ||
| ); | ||
| }); | ||
| it('should not import the component', () => { | ||
| expect(componentFileLocation).to.not.be.a.path(); | ||
| }); | ||
| it('should not delete the existing file', () => { | ||
| expect(existingFile).to.be.a.file(); | ||
| }); | ||
| it('should throw an error', () => { | ||
| expect(output).to.have.string('unable to import'); | ||
| }); | ||
| it('should import successfully if the --override flag is used', () => { | ||
| helper.command.runCmd(`bit import ${helper.scopes.remote}/global/simple -p my-custom-location --override`); | ||
| expect(componentFileLocation).to.be.a.file(); | ||
| }); | ||
| }); | ||
| describe('when the destination is a file', () => { | ||
| let output; | ||
| before(() => { | ||
| helper.scopeHelper.reInitWorkspace(); | ||
| helper.scopeHelper.addRemoteScope(); | ||
| fs.outputFileSync(path.join(helper.scopes.localPath, 'my-custom-location'), 'console.log()'); | ||
| output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/global/simple -p my-custom-location` | ||
| ); | ||
| }); | ||
| it('should not import the component', () => { | ||
| expect(componentFileLocation).to.not.be.a.path(); | ||
| }); | ||
| it('should not delete the existing file', () => { | ||
| expect(path.join(helper.scopes.localPath, 'my-custom-location')).to.be.a.file(); | ||
| }); | ||
| it('should throw an error', () => { | ||
| expect(output).to.have.string('unable to import'); | ||
| }); | ||
| it('should throw an error also when the --override flag is used', () => { | ||
|
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
|
||
| output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/global/simple -p my-custom-location --override` | ||
| ); | ||
| expect(output).to.have.string('unable to import'); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
|
|
@@ -544,24 +480,12 @@ describe('bit import', function () { | |
| expect(output).to.have.string('--dependencies-depth'); | ||
| expect(output).to.have.string('--dependencies'); | ||
| }); | ||
| it('should error when --dependencies-depth is zero', () => { | ||
| it('should error when --dependencies-depth is not a positive integer', () => { | ||
| const output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/comp1 --dependencies --dependencies-depth 0` | ||
| ); | ||
|
davidfirst marked this conversation as resolved.
Comment on lines
+483
to
486
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Depth validation branch untested The renamed test claims to cover any non-positive-integer depth but still passes only 0, so it exercises the < 1 branch while the distinct Number.isInteger() rejection for abc and 1.5 now has no test. A regression that accepts nonnumeric or fractional depths would therefore pass this suite despite violating the command contract. Agent Prompt
|
||
| expect(output).to.have.string('positive integer'); | ||
| }); | ||
| it('should error when --dependencies-depth is a non-integer', () => { | ||
|
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
|
||
| const output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/comp1 --dependencies --dependencies-depth abc` | ||
| ); | ||
| expect(output).to.have.string('positive integer'); | ||
| }); | ||
| it('should error when --dependencies-depth is a fractional number', () => { | ||
| const output = helper.general.runWithTryCatch( | ||
| `bit import ${helper.scopes.remote}/comp1 --dependencies --dependencies-depth 1.5` | ||
| ); | ||
| expect(output).to.have.string('positive integer'); | ||
| }); | ||
| }); | ||
| }); | ||
| describe('external package manager mode', () => { | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
1. Invalid add ids untested
🐞 Bug⚙ MaintainabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools