test(player): pin the stop URL's ids, the beacon's settle, the kept point's edges
The stop-URL contract passed with the two ids swapped and read the backend from the working directory; nothing called a real beacon's onSettled or its library pass-through; the kept-point rule was held by its constants only.
This commit is contained in:
@@ -154,6 +154,18 @@ describe("keptPosition (the server's rule)", () => {
|
||||
expect(keptPosition(2995, 3000)).toBe(0);
|
||||
expect(keptPosition(120, 0)).toBe(120); // an unknown length cannot be "near the end"
|
||||
});
|
||||
|
||||
// The edges themselves, one second either side: a `>=` that became `>` on one side only moves a
|
||||
// rule both sides must apply alike, and the constants alone (resume.contract.test.ts) would not see
|
||||
// it. backend/tests/test_library_progress.py holds the server to the same rows.
|
||||
it.each([
|
||||
[4, 3000, 0],
|
||||
[5, 3000, 5],
|
||||
[2990, 3000, 2990],
|
||||
[2991, 3000, 0],
|
||||
])("at %s s of %s keeps %s", (position, duration, kept) => {
|
||||
expect(keptPosition(position, duration)).toBe(kept);
|
||||
});
|
||||
});
|
||||
|
||||
describe("a shared link's point", () => {
|
||||
|
||||
Reference in New Issue
Block a user