expect-webdriverio 4.11.1 → 4.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/snapshot.js +3 -3
- package/package.json +1 -1
- package/types/expect-webdriverio.d.ts +2 -3
package/lib/snapshot.js
CHANGED
|
@@ -22,7 +22,7 @@ class WebdriverIOSnapshotEnvironment extends NodeSnapshotEnvironment {
|
|
|
22
22
|
}
|
|
23
23
|
async resolvePath(filepath) {
|
|
24
24
|
if (__classPrivateFieldGet(this, _WebdriverIOSnapshotEnvironment_resolveSnapshotPath, "f")) {
|
|
25
|
-
return
|
|
25
|
+
return __classPrivateFieldGet(this, _WebdriverIOSnapshotEnvironment_resolveSnapshotPath, "f").call(this, filepath, '.snap');
|
|
26
26
|
}
|
|
27
27
|
return super.resolvePath(filepath);
|
|
28
28
|
}
|
|
@@ -60,10 +60,10 @@ export class SnapshotService {
|
|
|
60
60
|
get results() {
|
|
61
61
|
return __classPrivateFieldGet(this, _SnapshotService_snapshotResults, "f");
|
|
62
62
|
}
|
|
63
|
-
beforeTest(test) {
|
|
63
|
+
async beforeTest(test) {
|
|
64
64
|
__classPrivateFieldSet(this, _SnapshotService_currentFilePath, test.file, "f");
|
|
65
65
|
__classPrivateFieldSet(this, _SnapshotService_currentTestName, `${test.parent} > ${test.title}`, "f");
|
|
66
|
-
__classPrivateFieldGet(this, _SnapshotService_snapshotClient, "f").startCurrentRun(test.file, test.fullTitle, __classPrivateFieldGet(this, _SnapshotService_options, "f"));
|
|
66
|
+
await __classPrivateFieldGet(this, _SnapshotService_snapshotClient, "f").startCurrentRun(test.file, test.fullTitle, __classPrivateFieldGet(this, _SnapshotService_options, "f"));
|
|
67
67
|
}
|
|
68
68
|
async after() {
|
|
69
69
|
const result = await __classPrivateFieldGet(this, _SnapshotService_snapshotClient, "f").finishCurrentRun();
|
package/package.json
CHANGED
|
@@ -3,10 +3,9 @@ declare namespace ExpectWebdriverIO {
|
|
|
3
3
|
function setOptions(options: DefaultOptions): void
|
|
4
4
|
function getConfig(): any
|
|
5
5
|
|
|
6
|
-
type ResolveSnapshotPathFunction = (path: string, extension: string) => string
|
|
7
6
|
interface SnapshotServiceArgs {
|
|
8
|
-
updateState?: SnapshotUpdateState
|
|
9
|
-
resolveSnapshotPath?:
|
|
7
|
+
updateState?: import('@vitest/snapshot').SnapshotUpdateState
|
|
8
|
+
resolveSnapshotPath?: (path: string, extension: string) => string
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
class SnapshotService {
|