Closed takurinton closed 2 years ago
Latest commit: ad325fd0d2e3522567c7023321b4414323458620
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
First, do an empty commit in the main branch to see if #935 is doing anything wrong.
Oops, no changes to the code, so it's a dry run!
Since it is controlled here, we will try to include some debugging code. https://github.com/preactjs/wmr/blob/main/.github/workflows/main.yml#L22-L27
I inserted dummy code and ran the test, but it failed with the same error as #935 . In other words, I thought there might not be any connection with #935. I can't be sure, though...
The place where it is falling down is also due to the fact that it is a demo app
test and there is no dist directory. This seems to be a problem with the original testing infrastructure.
However, we feel that it will take a lot of work to expose and solve the underlying problems. In fact, I feel that this foundation is not well maintained.
I am trying to fix a few things about my demo app test failing. Locally it fails because the .cache directory does not exist at my end, but in CI it fails because the dist directory does not exist. And while I can just ignore the .cache directory with error handling if it doesn’t exist, I can’t proceed to the next process if I can’t get the dist directory. Hmm...
Oops!! The test that should have failed passed... It was certainly my wish that the test would pass, but I did not wish for it to pass when it should not.😱
The logs I put in are also working properly.
console.log
../dist [
'.env',
'.env.development',
'.env.development.local',
'.env.local',
'dist',
'node_modules',
'package.json',
'public',
'src',
'tsconfig.json',
'wmr.config.ts'
]
at Object.<anonymous> (test/production.test.js:502:12)
console.log
dist [
'about', 'alias-outside',
'assets', 'chunks',
'class-fields', 'compat',
'env', 'error',
'files', 'foo',
'index.4baf50d8.js', 'index.html',
'json', 'lazy-and-late',
'meta-tags', 'pages'
]
at Object.<anonymous> (test/production.test.js:506:12)
console.log
here is befor serveStatic
at Object.<anonymous> (test/production.test.js:515:12)
console.log
here is after serveStatic
at Object.<anonymous> (test/production.test.js:517:12)
console.log
If this test(demo app) have made it this far, you should not fail. Perhaps.
at Object.<anonymous> (test/production.test.js:520:12)
Instead the lighthouse test is failing. Very unstable.
@rschristian Whether this is a fluke or the effect of the previous commit (although I just planted the log), I don't have the authority to re-run the test, so can I ask you to re-run the test instead?
@rschristian implemented it! Thank you! https://github.com/preactjs/wmr/pull/938
Closing as this can be resolved in #938
refs
935
936