@mands/nx-playwright
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "@mands/nx-playwright", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ "use strict"; | ||
const schema_json_1 = tslib_1.__importDefault(require("./schema.json")); | ||
function getFlags({ debug, headed, passWithNoTests, browser, testProject, reporter, timeout, grep, grepInvert, }) { | ||
function getFlags({ debug, headed, passWithNoTests, browser, testProject, reporter, timeout, grep, grepInvert, updateSnapshots, }) { | ||
const headedOption = headed === true ? '--headed' : ''; | ||
@@ -18,2 +18,3 @@ const passWithNoTestsOption = passWithNoTests === true ? '--pass-with-no-tests' : ''; | ||
const debugOption = debug !== undefined && debug ? '--debug' : ''; | ||
const updateSnapshotsOption = updateSnapshots !== undefined && updateSnapshots ? '--update-snapshots' : ''; | ||
return [ | ||
@@ -29,2 +30,3 @@ headedOption, | ||
debugOption, | ||
updateSnapshotsOption, | ||
]; | ||
@@ -31,0 +33,0 @@ } |
@@ -109,2 +109,9 @@ import { exec } from 'child_process'; | ||
], | ||
[ | ||
'--update-snapshots', | ||
{ | ||
updateSnapshots: true, | ||
e2eFolder: 'folder', | ||
}, | ||
], | ||
])(`runs playwright with options: %s`, async (expected, options) => { | ||
@@ -111,0 +118,0 @@ execMock.mockImplementation((_command, _options, callback) => { |
@@ -22,2 +22,3 @@ import type { PackageRunner } from '../../types'; | ||
debug?: boolean; | ||
updateSnapshots?: boolean; | ||
} |
@@ -51,4 +51,8 @@ { | ||
"description": "whether to open the Playwright inspector" | ||
}, | ||
"updateSnapshots": { | ||
"type": "boolean", | ||
"description": "whether to update snapshots with actual results instead of comparing them" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
50373
962