Ensure sku-init
test does a thorough cleanup, run it separately to other tests
#962
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.
This fixes the same issue that #960 fixes, but now I have a better understanding of the problem, but still not an exact root cause. #960 will still be merged, but just as an update to pnpm v9.
Note
There are some hoisting changes in this PR, in addition to the fix. These were done as an attempt to fix the problem, but didn't actually do anything. I've left them in because they're still worth doing IMO.
The Problem
The
sku-init
test runs the sku CLI'sinit
command. As part ofsku init
, the newly-created app has its dependencies installed. In the past, this has barely modified the lockfile, only adding an entry for thesku-init
workspace package, and nothing else.For some reason, potentially related to peer dependencies, a second
@vanilla-extract/css
package is now being installed during thesku-init
test. This interferes with style loading in one of thebraid-design-system
tests, probably because thesku-init
test tends to run before thebraid-design-system
suite in CI.The result is
master
(and other branches) tests failing with this error.The Fix
The
sku-init
test file no longer runs alongside all the other tests in thetests
directory. Instead, it is run after all the other tests, so as not to affect them. Additionally, the test now runs apnpm install
after completion in order to undo any of the changes to the lockfile/node_modules
it makes. This doesn't matter on CI, but it allows all tests to be run locally without interfering with one another.