diff --git a/packages/cli/src/commands/media-treatment.test.ts b/packages/cli/src/commands/media-treatment.test.ts
index 761543a30c..c7eb8d2ed9 100644
--- a/packages/cli/src/commands/media-treatment.test.ts
+++ b/packages/cli/src/commands/media-treatment.test.ts
@@ -222,6 +222,24 @@ describe("applyMediaTreatmentToHtml", () => {
expect(result.html).toContain("data-color-grading=");
});
+ it("says what media the file has when the selector matches none", () => {
+ expect(() => applyMediaTreatmentToHtml(VIDEO, { selector: "#prepared", grading: {} })).toThrow(
+ "Selector did not match: #prepared. Media in the file: video#hero.",
+ );
+ expect(() =>
+ applyMediaTreatmentToHtml(SEGMENTS, { selector: "#prepared", grading: {} }),
+ ).toThrow('video[src="a.mp4"], video[src="b.mp4"].');
+ });
+
+ it("says the file has no media yet when preparation added none", () => {
+ expect(() =>
+ applyMediaTreatmentToHtml("
", {
+ selector: "#prepared",
+ grading: {},
+ }),
+ ).toThrow("Selector did not match: #prepared. The file has no