Repository navigation
test: property-test generated index and schedule data, now, file ids, and core options - #161
Open
botandbang wants to merge 1 commit into
Open
botandbang wants to merge 1 commit into
botandbang wants to merge 1 commit into
Conversation
… and core options
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.
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 across0.xlines, majors and Alpha releases,ltsasfalse,trueor any string,filesmixing 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 thatsecurity.alllists exactly the flagged releases. The second sorts the index newest first, as index.json is and as core relies on, and checkssecurity.allis in version order bounded bynewestandoldest, and thatsupport.lts.oldestis the line's oldest LTS release andnewestits 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 hassupportonly when it has astart, itsphases.currentis 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 whethernowis a day, aDateTimein another zone, or thatDateTimeas an ISO string with its offset. It drawsnowfrom the snapshot's phase start days too, where reading a moment in the wrong zone changes the phase.core/test/parseOptions.jsfor 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.parsefiles/test/parseFilename.test.jsfor ids parsefiles doesn't know, such as ones index.json adds later. It never throws, keeps the id, returns at least one file, and leavestypeandarchitectureas a known value orundefined.Each property fails when its expectation is broken (checked by flipping each assertion once), and they all run under the weekly
FC_NUM_RUNS=5000job with nothing new in CI.