mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-05 08:15:41 -08:00
Make every URL the console page uses page-relative, guarded by a source test
AI Assisted
This commit is contained in:
1 parent
4ced32be5c
commit
1d007737b1
47 files changed
+401
-202
No files matched your search
@@ -497,7 +497,7 @@ test("music: a song plays from its file, fades in toward its level, says when it
|
||||
withSongs(async () => {
|
||||
const [name] = TRAILS_TRACKS;
|
||||
assert.equal(music(name, 1, 1, { restart: true }), "playing");
|
||||
const el = FakeAudio.made.find((a) => a.src === `/${trailsSfx.songs[name]}`);
|
||||
const el = FakeAudio.made.find((a) => a.src === trailsSfx.songs[name]);
|
||||
assert.ok(el, "an element for the song's file");
|
||||
assert.ok(!el.paused && el.plays === 1, "it plays");
|
||||
for (let i = 0; i < 20; i++) {
|
||||
@@ -520,7 +520,7 @@ test("music: a song no longer asked for fades out and pauses where it was, and a
|
||||
withSongs(async () => {
|
||||
const [first, second] = TRAILS_TRACKS;
|
||||
music(first, 1, 0.5);
|
||||
const el = FakeAudio.made.findLast((a) => a.src === `/${trailsSfx.songs[first]}`);
|
||||
const el = FakeAudio.made.findLast((a) => a.src === trailsSfx.songs[first]);
|
||||
const loads = el.loads;
|
||||
await sleep(800);
|
||||
assert.ok(el.paused, "paused once it stops being asked for");
|
||||
@@ -544,7 +544,7 @@ test("music: a song plays nothing while Play sounds is off, at a volume of 0, or
|
||||
assert.equal(music(name, 1, 0), undefined);
|
||||
globalThis.Audio = undefined;
|
||||
assert.equal(music(name, 1, 1), undefined);
|
||||
assert.ok(FakeAudio.made.filter((a) => a.src === `/${trailsSfx.songs[name]}`).every((a) => a.paused), "nothing plays");
|
||||
assert.ok(FakeAudio.made.filter((a) => a.src === trailsSfx.songs[name]).every((a) => a.paused), "nothing plays");
|
||||
}));
|
||||
|
||||
test("music: every Sunset Drive road has a song, and every song is a real track", () => {
|
||||
|
||||
Reference in new issue
Block a user