Motivation
The library no longer bundles a Temporal implementation — callers must provide one (see the temporal prop docs), and we recommend two polyfills:
These are independent implementations and can differ in edge-case behavior (parsing, toLocaleString/calendar handling, overflow, DST). To be confident the library works on both, every test should run against both — not just the reference implementation.
Current state
package/src/test-temporal.ts exports a temporalVariants matrix, but after the mini-shim removal it has a single entry (@js-temporal/polyfill).
- Only a few suites consume the matrix via
describe.each(temporalVariants): utils.test.ts, keyboard.test.ts.
- ~10 suites hardcode
@js-temporal/polyfill directly instead of using the matrix: calendar-provider.test.tsx, month-view.test.tsx, weeks-view.test.tsx, overflow.test.ts, compute-weeks-in-window.test.ts, resolve-first-week.test.ts, weeks-keyboard.test.ts, grid.perf.test.tsx, grid.event-perf.test.tsx.
temporal-polyfill (fullcalendar) is not a devDependency yet (only @js-temporal/polyfill is).
Proposed work
Acceptance criteria
vp run -r test executes the full date-dependent suite once per polyfill, and passes on both.
- Adding a third implementation later means only adding one entry to
temporalVariants.
- No test file imports a polyfill directly except
test-temporal.ts (and any intentionally-pinned perf suite).
Notes
Some assertions are format-sensitive (e.g. PlainYearMonth.toString(), toLocaleString output). Where the two polyfills format differently, prefer semantic assertions (compare via Temporal.X.compare, check fields) over exact-string matches, or branch on the variant where unavoidable.
Motivation
The library no longer bundles a
Temporalimplementation — callers must provide one (see thetemporalprop docs), and we recommend two polyfills:temporal-polyfill(fullcalendar)@js-temporal/polyfill(js-temporal)These are independent implementations and can differ in edge-case behavior (parsing,
toLocaleString/calendar handling, overflow, DST). To be confident the library works on both, every test should run against both — not just the reference implementation.Current state
package/src/test-temporal.tsexports atemporalVariantsmatrix, but after the mini-shim removal it has a single entry (@js-temporal/polyfill).describe.each(temporalVariants):utils.test.ts,keyboard.test.ts.@js-temporal/polyfilldirectly instead of using the matrix:calendar-provider.test.tsx,month-view.test.tsx,weeks-view.test.tsx,overflow.test.ts,compute-weeks-in-window.test.ts,resolve-first-week.test.ts,weeks-keyboard.test.ts,grid.perf.test.tsx,grid.event-perf.test.tsx.temporal-polyfill(fullcalendar) is not a devDependency yet (only@js-temporal/polyfillis).Proposed work
temporal-polyfill(fullcalendar) as a devDependency (via the pnpmcatalog).temporalVariants(package/src/test-temporal.ts), shaped as aTemporalNamespacelike the existing entry.TemporalfromtemporalVariantsand wrap its cases indescribe.each(temporalVariants)("… ($name)", ({ T }) => { … }), so each test executes once per polyfill. Replace the localtemporal/Temporalconstants accordingly.grid.perf.test.tsx,grid.event-perf.test.tsx) participate — run on both, or pin to one with a noted rationale (matrixing perf benchmarks may just double runtime without added signal).describe.each(temporalVariants)the default pattern for new date-dependent tests (note in CONTRIBUTING or a comment intest-temporal.ts).Acceptance criteria
vp run -r testexecutes the full date-dependent suite once per polyfill, and passes on both.temporalVariants.test-temporal.ts(and any intentionally-pinned perf suite).Notes
Some assertions are format-sensitive (e.g.
PlainYearMonth.toString(),toLocaleStringoutput). Where the two polyfills format differently, prefer semantic assertions (compare viaTemporal.X.compare, check fields) over exact-string matches, or branch on the variant where unavoidable.