豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 0f29acf

Browse files
authored
chore: fix viewport eval (#1888)
1 parent da33cb5 commit 0f29acf

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

scripts/eval_scenarios/emulation_viewport_test.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import assert from 'node:assert';
88

9-
import {KnownDevices} from 'puppeteer';
10-
119
import type {TestScenario} from '../eval_gemini.ts';
1210

1311
export const scenario: TestScenario = {
@@ -16,16 +14,6 @@ export const scenario: TestScenario = {
1614
expectations: calls => {
1715
assert.strictEqual(calls.length, 1);
1816
assert.strictEqual(calls[0].name, 'emulate');
19-
assert.deepStrictEqual(
20-
{
21-
...(calls[0].args.viewport as object),
22-
// models might not send defaults.
23-
isLandscape: KnownDevices['iPhone 14'].viewport.isLandscape ?? false,
24-
},
25-
{
26-
...KnownDevices['iPhone 14'].viewport,
27-
height: 844, // Puppeteer is wrong about the expected height.
28-
},
29-
);
17+
assert.deepStrictEqual(calls[0].args.viewport, '390x844x3,mobile,touch');
3018
},
3119
};

0 commit comments

Comments
 (0)