-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix: do not crash component tests on stale cached files #37070
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
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
This comment has been minimized.
This comment has been minimized.
|
||
await test.step('add a "leftover" (no longer existing component and its test file) to the cache and run the test', async () => { | ||
|
||
metainfo.components.push({ |
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.
This should be an end to end test, and should test the entire flow of building the cache, deleting a component, then running the test and finding that it still works. Don't mutate the metainfo.json
manually.
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.
@agg23 updated
48f9248
to
f818161
Compare
This comment has been minimized.
This comment has been minimized.
componentRegistry.set(c.id, c); | ||
for (const c of oldComponents.values()) { | ||
// Only add old components if their source test file still exists | ||
if (fs.existsSync(c.filename)) |
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.
Does it have to be sync? If not, prefer fs.promises.stat
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.
@yury-s updated
705c7e8
to
5693a80
Compare
5693a80
to
37e3d37
Compare
Test results for "tests 1"11 flaky46621 passed, 801 skipped Merge workflow run. |
Added the requested changes |
A big quality of life improvement for component testers
Fixes #37069