Repository navigation
test: give each Tailwind render its own cache key, never the clock - #500
Open
YevheniiKotyrlo wants to merge 1 commit into
Open
YevheniiKotyrlo wants to merge 1 commit into
YevheniiKotyrlo wants to merge 1 commit into
Conversation
The harness passed Date.now() as Tailwind's base to keep renders from sharing its compiler cache, so two renders that start in the same millisecond shared it, and the second compiled against the first's stylesheet: a random Tailwind case failed in a full run and passed alone. A counter gives every render a base of its own.
YevheniiKotyrlo
marked this pull request as ready for review
October 16, 2026 23:01
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
src/__tests__/vendor/tailwind/_tailwind.tsxpassestailwind({ base: Date.now().toString() })so that renders do not share Tailwind's compiler cache. Two renders that start in the same millisecond get the same base, and the second compiles against the first's stylesheet, so its class renders no style. In a fullyarn testrun a random Tailwind case fails this way and passes alone: I hitLayout - Top Right Bottom Left › left-1,Sizing - Height › h-pxandLayout - Clear › clear-left, each rendering{ props: {} }.Solution
A counter gives every render a base of its own.
Tests
src/__tests__/vendor/tailwind/harness.test.tsxfreezesDate.now()and rendersleft-0, thenleft-1. Onmainthe second renders{ props: {} }; here each renders its own value.Verification
On Ubuntu with the workflow's steps - build, lint, typecheck,
yarn test,node --test node/__tests__/*.mjs, both library builds, the web export, the unstaged-changes checks and commitlint - everything passes.