(Attempt to) fix tests

This commit is contained in:
Pieter Vander Vennet 2025-06-03 21:37:15 +02:00
parent bad4a3514c
commit b964022091
3 changed files with 1912 additions and 177 deletions

View file

@ -26,11 +26,8 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
# This is the same as `npm run test`, but `vitest` doesn't want to run within npm :shrug:
export NODE_OPTIONS="--max-old-space-size=8192" export NODE_OPTIONS="--max-old-space-size=8192"
npm run clean:tests npm run test
npm run generate:doctests 2>&1 | grep -v "No doctests found in"
vitest --run test && npm run clean:tests
shell: bash shell: bash
- name: Build files - name: Build files

2082
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -975,7 +975,7 @@ changes // => [[36000,61200], ["10:00", "17:00"]]
* @param changeHourText * @param changeHourText
* @param maxDiff minimum required seconds between two items to be in the same group * @param maxDiff minimum required seconds between two items to be in the same group
* *
* OH.partitionOHForDistance([0, 15, 3615], ["start", "15s", "1h15s"]) // => [{changeHours: [0, 3615], changeTexts: ["start", "1h15s"]}, {changeHours: [15], changeTexts: ["15 seconds"]}] * OH.partitionOHForDistance([0, 15, 3615], ["start", "15s", "1h15s"]) // => [{changeHours: [0, 3615], changeTexts: ["start", "1h15s"]}, {changeHours: [15], changeTexts: ["15s"]}]
* *
*/ */
public static partitionOHForDistance(changeHours: number[], changeHourText: string[], maxDiff = 3600): { public static partitionOHForDistance(changeHours: number[], changeHourText: string[], maxDiff = 3600): {