We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9e9d2e commit 0c12e21Copy full SHA for 0c12e21
1 file changed
src/index.js
@@ -7,6 +7,7 @@ import { screenshot } from './microlink.js'
7
8
const DEFAULT_THRESHOLD = 0.001
9
const DEFAULT_PIXEL_THRESHOLD = 0.1
10
+const DEFAULT_VIEWPORT = { width: 1280, height: 800 }
11
const DEFAULT_ROUTES = ['/']
12
13
const noop = () => {}
@@ -145,7 +146,7 @@ export const run = async ({
145
146
if (!Array.isArray(routes) || routes.length === 0)
147
throw new Error('routes must be a non-empty array')
148
- const mql = { apiKey, ...mqlOpts }
149
+ const mql = { viewport: DEFAULT_VIEWPORT, apiKey, ...mqlOpts }
150
const resolvedThreshold = await resolveThreshold({ flag: threshold, cwd })
151
log(
152
`threshold resolved: ${resolvedThreshold} (pixel-threshold: ${pixelThreshold})`
0 commit comments