fix(plugins): finish channel lint cleanup

This commit is contained in:
Vincent Koc
2026-04-06 14:48:25 +01:00
parent c8298c5b0f
commit 4b2d528345
15 changed files with 42 additions and 28 deletions

View File

@@ -116,9 +116,13 @@ describe("CDP screenshot params", () => {
const setCalls = sentMessages.filter((m) => m.method === "Emulation.setDeviceMetricsOverride");
expect(setCalls.length).toBe(2);
const [firstSetCall, secondSetCall] = setCalls;
if (!firstSetCall || !secondSetCall) {
throw new Error("expected two viewport updates");
}
// Expand: uses saved DPR, mobile defaults to false
expect(setCalls[0]!.params).toMatchObject({
expect(firstSetCall.params).toMatchObject({
width: 1200,
height: 3000,
deviceScaleFactor: 2,
@@ -130,7 +134,7 @@ describe("CDP screenshot params", () => {
expect(clearCall).toBeDefined();
// Viewport drifted after clear → re-apply saved dimensions
expect(setCalls[1]!.params).toMatchObject({
expect(secondSetCall.params).toMatchObject({
width: 800,
height: 600,
deviceScaleFactor: 2,