Repository navigation
test: add property-based tests with fast-check - #126
Merged
Merged
Conversation
- translate: reject names inherited from Object.prototype and return a copy - ranges: fall back to the other lts range for lts/active's bounds when one is empty - parsefiles: list only the id's own directory for win-*-exe, and parse osx-x86-tar - core, fetchindex: throw with the URL and status on a non-OK response - ci: use --workspaces, since npm 12 rejects -ws
- core: release keys, security lists, LTS bounds, and phases only moving forward - ranges: filtering never changes a range, no unrequested keys, lts/active is lts/latest then lts/maintenance - parsefiles, translate, opt: real ids parse into file names, non-terms reject, options keep their defaults - add fast-check to ranges, parsefiles, translate, and opt, and declare @nodevu/aliases in translate
# Conflicts: # parsefiles/test/parseFilename.test.js # translate/test/translate.test.js
bnb
approved these changes
Oct 29, 2026
Draft
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.
Adds fast-check property tests where a rule should always hold.
core (
test/properties.js): over dates from 2009 to 2026 against the index and schedule snapshot, every release's key and line match its semver,security.allis ordered newest first and matches the releases flagged as security, LTS newest is never older than oldest, and each line's phase only moves forward in time.ranges (
test/properties.test.js): any filter gives the same ranges as'all'for the keys it asks for, unrequested ranges never appear, newest and oldest match the ends ofversions,lts/activeislts/latestfollowed bylts/maintenanceand always has LTS bounds, every version is also inall, and Alpha releases never are.parsefiles, translate, opt: every file id in the snapshot parses into real file names with a type and architecture; anything that isn't a package support term rejects, and each term maps only to
@nodevu/aliases;opt()uses each option it's given and keeps the default for the rest.fast-checkis added as a devDependency of ranges, parsefiles, translate and opt, and translate now declares@nodevu/aliases, which its tests import.