Skip to content

Commit 3b05a73

Browse files
test: prove a supplied printer is not re-asked for through the loader
1 parent d275611 commit 3b05a73

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎test/unitCases/SourceProcessor.unittest.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,14 @@ describe("SourceProcessor", () => {
6666

6767
it("stays out of a processor that was handed its printer", () => {
6868
const printer = () => "";
69-
const processor = new GenericSourceProcessor(() => {}, printer);
69+
let loads = 0;
70+
const processor = new GenericSourceProcessor(() => {}, printer, () => {
71+
loads++;
72+
return () => "";
73+
});
7074
processor.process("x", { mode: "minify" });
7175
expect(processor._printer).toBe(printer);
76+
expect(loads).toBe(0);
7277
});
7378
});
7479

0 commit comments

Comments
 (0)