Skip to content

Commit fca6a14

Browse files
committed
test: require evidence-only source badges
1 parent e720111 commit fca6a14

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

engine_v2/tests/stream-presentation.test.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ assert.match(presented.description, /🎞 HEVC/);
4646
assert.match(presented.description, /🔊 E-AC3 5\.1/);
4747
assert.match(presented.description, / 2h49/);
4848
assert.match(presented.description, /🔞 -12/);
49+
assert.match(presented.description, /Interstellar 2014/);
4950

5051
const tmdbFallback = presentStreamCandidate({
5152
name: "Cineby",
@@ -60,6 +61,7 @@ const tmdbFallback = presentStreamCandidate({
6061
assert.doesNotMatch(tmdbFallback.description ?? "", /Unknown/i);
6162
assert.match(tmdbFallback.description, / 2h17/);
6263
assert.match(tmdbFallback.description, /🔞 16\+/);
64+
assert.match(tmdbFallback.description, /Sinners 2025/);
6365

6466
const noInventedBluray = presentStreamCandidate({
6567
name: "FrenchStream",
@@ -68,7 +70,8 @@ const noInventedBluray = presentStreamCandidate({
6870
}, {}, { name: "FrenchStream" });
6971
assert.match(noInventedBluray.description, /1080P/);
7072
assert.doesNotMatch(noInventedBluray.description, /BLU-RAY/i);
71-
assert.equal(normalizeSourceType("1080p"), "1080P");
73+
assert.equal(normalizeSourceType("1080p"), null);
74+
assert.equal(normalizeSourceType("some provider label"), null);
7275

7376
const badges = buildBadges({ quality: "4K", language: "VFQ", codec: "H.264" });
7477
assert.deepEqual(badges, ["【4K】", "🌐 VFQ", "🎞 H.264"]);

0 commit comments

Comments
 (0)