Skip to content

test: property-test generated index and schedule data, now, file ids, and core options - #161

Open
botandbang wants to merge 1 commit into
mainfrom
bnb/property-test-inputs
Open

botandbang wants to merge 1 commit into
mainfrom
bnb/property-test-inputs

Conversation

@botandbang

Copy link
Copy Markdown
Contributor

Closes #153. The cases its properties found that change core's behavior (an unreadable version, an unreadable now, a version listed twice) are fixed in their own PR, which closes #154. Everything here passes on main.

Added:

  • core/test/generated-index.js. Two properties over a generated index.json: unique versions across 0.x lines, majors and Alpha releases, lts as false, true or any string, files mixing real ids with arbitrary strings or missing, and entries in any order. The first checks every entry comes out as a release under its own line with its date, LTS, security, Alpha flag and files, and that security.all lists exactly the flagged releases. The second sorts the index newest first, as index.json is and as core relies on, and checks security.all is in version order bounded by newest and oldest, and that support.lts.oldest is the line's oldest LTS release and newest its newest when the line's newest release is LTS.
  • core/test/generated-schedule.js. Two properties. The first generates schedule.json lines with phases missing, out of order, written with times and offsets, or unreadable strings, and checks a line has support only when it has a start, its phases.current is the latest phase whose date has passed, and its dates and codename are the schedule's. The second checks one moment gives the same phases whether now is a day, a DateTime in another zone, or that DateTime as an ISO string with its offset. It draws now from the snapshot's phase start days too, where reading a moment in the wrong zone changes the phase.
  • A property in core/test/parseOptions.js for core's own options parser, which only had examples. Each option given is kept and the rest get their defaults, with an empty string counting as unset.
  • A property in parsefiles/test/parseFilename.test.js for ids parsefiles doesn't know, such as ones index.json adds later. It never throws, keeps the id, returns at least one file, and leaves type and architecture as a known value or undefined.

Each property fails when its expectation is broken (checked by flipping each assertion once), and they all run under the weekly FC_NUM_RUNS=5000 job with nothing new in CI.

@botandbang
botandbang requested a review from bnb as a code owner November 14, 2026 23:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core throws a TypeError when index.json has a version semver can't read property-test index.json and schedule.json handling

1 participant