Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/noldova.context.testing/src/api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,8 @@ export declare class TestFileTiming {
public readonly isOver: boolean;

/**
* True when the suite lists the file but its median is within the time an unlisted file may take, so the list should drop it.
* True when the suite lists the file but its median on this machine is within the time an unlisted file may take. A list measured on
* several machines drops the file only once it is stale on every one of them.
*/
public readonly isStale: boolean;

Expand Down
2 changes: 1 addition & 1 deletion src/noldova.context.testing/src/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class Resources {
}

public static fileTimingStale(file: string, median: string, budgetLimitMilliseconds: number): string {
return `Stale: ${file}, median ${median}, within the ${Math.round(budgetLimitMilliseconds)} ms an unlisted file may take; drop it from the list.`;
return `Stale: ${file}, median ${median}, within the ${Math.round(budgetLimitMilliseconds)} ms an unlisted file may take on this machine; the list drops it once it is stale on every machine the list was measured on.`;
}

public static fileTimingWithin(file: string, median: string, limitMilliseconds: number): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export class TestFileTimingTests {
const unlisted = new TestFileTiming("Sample/a.test.js", 900, 1200, 1200, false);

Assert.areEqual("true,false,false", [stale.isStale, slower.isStale, unlisted.isStale].join());
Assert.areEqual("Stale: Sample/fast.test.js, median 1200 ms, within the 1200 ms an unlisted file may take; drop it from the list.", stale.format());
Assert.areEqual("Stale: Sample/fast.test.js, median 1200 ms, within the 1200 ms an unlisted file may take on this machine; "
+ "the list drops it once it is stale on every machine the list was measured on.", stale.format());
Assert.areEqual("Within: Sample/slow.test.js, median 1201 ms, limit 3000 ms.", slower.format());
Assert.areEqual("Within: Sample/a.test.js, median 900 ms, limit 1200 ms.", unlisted.format());
}
Expand Down
Loading