fix tests after rebase and deps update
This commit is contained in:
parent
1fb063276d
commit
d5cd634684
11 changed files with 158 additions and 185 deletions
9
__mocks__/fs-extra.ts
Normal file
9
__mocks__/fs-extra.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { vi } from 'vitest'
|
||||
import fs from './fs'
|
||||
|
||||
export default {
|
||||
...fs,
|
||||
ensureDirSync: vi.fn(),
|
||||
readFileSync: vi.fn(),
|
||||
createFile: vi.fn()
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { vi } from 'vitest'
|
||||
|
||||
const fs = {} as any
|
||||
fs.createWriteStream = vi.fn()
|
||||
fs.writeFileSync = vi.fn()
|
||||
fs.existsSync = vi.fn(() => true)
|
||||
fs.accessSync = vi.fn(() => true)
|
||||
|
|
|
|||
240
package-lock.json
generated
240
package-lock.json
generated
|
|
@ -7,39 +7,38 @@
|
|||
"name": "webdriverio-monorepo",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@cucumber/cucumber": "^8.3.1",
|
||||
"@cucumber/cucumber": "^8.5.0",
|
||||
"@octokit/rest": "^19.0.3",
|
||||
"@tsconfig/node16": "^1.0.3",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/cheerio": "^0.22.31",
|
||||
"@types/eslint": "^8.4.3",
|
||||
"@types/eslint": "^8.4.5",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/lodash.clonedeep": "^4.5.7",
|
||||
"@types/lodash.isobject": "^3.0.7",
|
||||
"@types/lodash.isplainobject": "^4.0.7",
|
||||
"@types/lodash.merge": "^4.6.7",
|
||||
"@types/lodash.zip": "^4.2.7",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^18.0.6",
|
||||
"@types/split2": "^3.2.1",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"@typescript-eslint/utils": "^5.29.0",
|
||||
"aws-sdk": "^2.1162.0",
|
||||
"c8": "^7.11.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"@typescript-eslint/utils": "^5.30.7",
|
||||
"aws-sdk": "^2.1178.0",
|
||||
"c8": "^7.12.0",
|
||||
"camelcase": "^7.0.0",
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
"copyfiles": "^2.4.1",
|
||||
"del": "^6.1.1",
|
||||
"depcheck": "^1.4.3",
|
||||
"ejs": "^3.1.8",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-plugin-unicorn": "^43.0.1",
|
||||
"eslint-plugin-wdio": "^7.19.4",
|
||||
"eslint": "^8.20.0",
|
||||
"eslint-plugin-unicorn": "^43.0.2",
|
||||
"eslint-plugin-wdio": "^7.20.6",
|
||||
"husky": "^8.0.1",
|
||||
"inquirer": "^9.0.0",
|
||||
"inquirer": "^9.0.2",
|
||||
"jsdom": "^20.0.0",
|
||||
"lerna": "^5.1.6",
|
||||
"lerna": "^5.1.8",
|
||||
"lerna-changelog": "^2.2.0",
|
||||
"markdox": "^0.1.10",
|
||||
"mime-types": "^2.1.35",
|
||||
|
|
@ -49,10 +48,10 @@
|
|||
"rimraf": "^3.0.2",
|
||||
"shelljs": "^0.8.5",
|
||||
"tempy": "^3.0.0",
|
||||
"ts-node": "^10.8.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4",
|
||||
"url-join": "^5.0.0",
|
||||
"vitest": "^0.16.0"
|
||||
"vitest": "^0.18.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
|
@ -2062,9 +2061,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@npmcli/arborist/node_modules/make-fetch-happen": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz",
|
||||
"integrity": "sha512-0ASJbG12Au6+N5I84W+8FhGS6iM8MyzvZady+zaQAu+6IOaESFzCLLD0AR1sAFF3Jufi8bxm586ABN6hWd3k7g==",
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.0.tgz",
|
||||
"integrity": "sha512-OnEfCLofQVJ5zgKwGk55GaqosqKjaR6khQlJY3dBAA+hM25Bc5CmX5rKUfVut+rYA3uidA7zb7AvcglU87rPRg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"agentkeepalive": "^4.2.1",
|
||||
|
|
@ -2463,12 +2462,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.1.tgz",
|
||||
"integrity": "sha512-u0+4nEVCPL5dsXibKR9qNJU2T0NBnVhmvlPxNjPzt7wp2QfFAbI+dyxIltSP7NOm6KWkXyYG9YLsUKi8D6uohw==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.2.tgz",
|
||||
"integrity": "sha512-sAfSKtLHNq0UQ2iFuI41I6m5SK6bnKFRJ5kUjDRVbmQXiRVi4aQiIcgG4cM7bt+bhSiWL4HwnTxDkWFlKeKClA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@octokit/types": "6.40.0",
|
||||
"@octokit/types": "^6.40.0",
|
||||
"deprecation": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
|
|
@ -3332,9 +3331,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/aws-sdk": {
|
||||
"version": "2.1177.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1177.0.tgz",
|
||||
"integrity": "sha512-0Ui7hBofMom6F9N4em357NzsUt0pXDLuuUS1Ojf7Vu7S/LjVjB5zwmY7L4H5wuf5KDOjSmNX8/zG6QfGGc5X/w==",
|
||||
"version": "2.1178.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1178.0.tgz",
|
||||
"integrity": "sha512-ZsFuVbTp9aakAIZ7lTJspuCzSw5VRIDF0bUmSZmE2tc/X/haTu/TrMeWgwPjyLkQtdhfjChCyI71V+ADqFkjsA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"buffer": "4.9.2",
|
||||
|
|
@ -3611,9 +3610,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/c8": {
|
||||
"version": "7.11.3",
|
||||
"resolved": "https://registry.npmjs.org/c8/-/c8-7.11.3.tgz",
|
||||
"integrity": "sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==",
|
||||
"version": "7.12.0",
|
||||
"resolved": "https://registry.npmjs.org/c8/-/c8-7.12.0.tgz",
|
||||
"integrity": "sha512-CtgQrHOkyxr5koX1wEUmN/5cfDa2ckbHRA4Gy5LAL0zaCFtVWJS5++n+w4/sr2GWGerBxgTjpKeDclk/Qk6W/A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@bcoe/v8-coverage": "^0.2.3",
|
||||
|
|
@ -4838,28 +4837,6 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/del": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz",
|
||||
"integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"globby": "^11.0.1",
|
||||
"graceful-fs": "^4.2.4",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-path-cwd": "^2.2.0",
|
||||
"is-path-inside": "^3.0.2",
|
||||
"p-map": "^4.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"slash": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
|
|
@ -7261,9 +7238,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/inquirer": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.1.tgz",
|
||||
"integrity": "sha512-NO601wvGO4Zm25ctJUhuglRBShQKJSGKGQlgbeyjs3cvXqq4Ud1jhwR36zf3pTC9mmfH3uHJHb/sL3/YJPqMzw==",
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.2.tgz",
|
||||
"integrity": "sha512-AqmDHmz3bIe573OiM4svTZzajBzff1xpuzYAimW8gjzW5ncuPllWB8t/GKl+NSuKRJaKyIF2bU2RCx8H1dwqyQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-escapes": "^5.0.0",
|
||||
|
|
@ -7669,15 +7646,6 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-path-cwd": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
||||
"integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/is-path-inside": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
|
||||
|
|
@ -10183,9 +10151,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/pacote/node_modules/make-fetch-happen": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz",
|
||||
"integrity": "sha512-0ASJbG12Au6+N5I84W+8FhGS6iM8MyzvZady+zaQAu+6IOaESFzCLLD0AR1sAFF3Jufi8bxm586ABN6hWd3k7g==",
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.0.tgz",
|
||||
"integrity": "sha512-OnEfCLofQVJ5zgKwGk55GaqosqKjaR6khQlJY3dBAA+hM25Bc5CmX5rKUfVut+rYA3uidA7zb7AvcglU87rPRg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"agentkeepalive": "^4.2.1",
|
||||
|
|
@ -12393,9 +12361,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tinyspy": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-0.3.3.tgz",
|
||||
"integrity": "sha512-gRiUR8fuhUf0W9lzojPf1N1euJYA30ISebSfgca8z76FOvXtVXqd5ojEIaKLWbDQhAaC3ibxZIjqbyi4ybjcTw==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.0.tgz",
|
||||
"integrity": "sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
|
|
@ -12911,21 +12879,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "2.9.14",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.14.tgz",
|
||||
"integrity": "sha512-P/UCjSpSMcE54r4mPak55hWAZPlyfS369svib/gpmz8/01L822lMPOJ/RYW6tLCe1RPvMvOsJ17erf55bKp4Hw==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.2.tgz",
|
||||
"integrity": "sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.14.27",
|
||||
"postcss": "^8.4.13",
|
||||
"resolve": "^1.22.0",
|
||||
"rollup": "^2.59.0"
|
||||
"esbuild": "^0.14.47",
|
||||
"postcss": "^8.4.14",
|
||||
"resolve": "^1.22.1",
|
||||
"rollup": "^2.75.6"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.2.0"
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
|
|
@ -12933,7 +12901,8 @@
|
|||
"peerDependencies": {
|
||||
"less": "*",
|
||||
"sass": "*",
|
||||
"stylus": "*"
|
||||
"stylus": "*",
|
||||
"terser": "^5.4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"less": {
|
||||
|
|
@ -12944,13 +12913,16 @@
|
|||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vitest": {
|
||||
"version": "0.16.0",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-0.16.0.tgz",
|
||||
"integrity": "sha512-Ntp6jrM8wf2NMtamMBLkRBBdeqHkgAH/WMh5Xryts1j2ft2D8QZQbiSVFkSl4WmEQzcPP0YM069g/Ga1vtnEtg==",
|
||||
"version": "0.18.1",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-0.18.1.tgz",
|
||||
"integrity": "sha512-4F/1K/Vn4AvJwe7i2YblR02PT5vMKcw9KN4unDq2KD0YcSxX0B/6D6Qu9PJaXwVuxXMFTQ5ovd4+CQaW3bwofA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/chai": "^4.3.1",
|
||||
|
|
@ -12958,10 +12930,10 @@
|
|||
"@types/node": "*",
|
||||
"chai": "^4.3.6",
|
||||
"debug": "^4.3.4",
|
||||
"local-pkg": "^0.4.1",
|
||||
"tinypool": "^0.2.1",
|
||||
"tinyspy": "^0.3.3",
|
||||
"vite": "^2.9.12"
|
||||
"local-pkg": "^0.4.2",
|
||||
"tinypool": "^0.2.4",
|
||||
"tinyspy": "^1.0.0",
|
||||
"vite": "^2.9.12 || ^3.0.0-0"
|
||||
},
|
||||
"bin": {
|
||||
"vitest": "vitest.mjs"
|
||||
|
|
@ -12973,12 +12945,16 @@
|
|||
"url": "https://github.com/sponsors/antfu"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@edge-runtime/vm": "*",
|
||||
"@vitest/ui": "*",
|
||||
"c8": "*",
|
||||
"happy-dom": "*",
|
||||
"jsdom": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@edge-runtime/vm": {
|
||||
"optional": true
|
||||
},
|
||||
"@vitest/ui": {
|
||||
"optional": true
|
||||
},
|
||||
|
|
@ -15180,9 +15156,9 @@
|
|||
}
|
||||
},
|
||||
"make-fetch-happen": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz",
|
||||
"integrity": "sha512-0ASJbG12Au6+N5I84W+8FhGS6iM8MyzvZady+zaQAu+6IOaESFzCLLD0AR1sAFF3Jufi8bxm586ABN6hWd3k7g==",
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.0.tgz",
|
||||
"integrity": "sha512-OnEfCLofQVJ5zgKwGk55GaqosqKjaR6khQlJY3dBAA+hM25Bc5CmX5rKUfVut+rYA3uidA7zb7AvcglU87rPRg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"agentkeepalive": "^4.2.1",
|
||||
|
|
@ -15500,12 +15476,12 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.1.tgz",
|
||||
"integrity": "sha512-u0+4nEVCPL5dsXibKR9qNJU2T0NBnVhmvlPxNjPzt7wp2QfFAbI+dyxIltSP7NOm6KWkXyYG9YLsUKi8D6uohw==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.2.tgz",
|
||||
"integrity": "sha512-sAfSKtLHNq0UQ2iFuI41I6m5SK6bnKFRJ5kUjDRVbmQXiRVi4aQiIcgG4cM7bt+bhSiWL4HwnTxDkWFlKeKClA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@octokit/types": "6.40.0",
|
||||
"@octokit/types": "^6.40.0",
|
||||
"deprecation": "^2.3.1"
|
||||
}
|
||||
},
|
||||
|
|
@ -16186,9 +16162,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"aws-sdk": {
|
||||
"version": "2.1177.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1177.0.tgz",
|
||||
"integrity": "sha512-0Ui7hBofMom6F9N4em357NzsUt0pXDLuuUS1Ojf7Vu7S/LjVjB5zwmY7L4H5wuf5KDOjSmNX8/zG6QfGGc5X/w==",
|
||||
"version": "2.1178.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1178.0.tgz",
|
||||
"integrity": "sha512-ZsFuVbTp9aakAIZ7lTJspuCzSw5VRIDF0bUmSZmE2tc/X/haTu/TrMeWgwPjyLkQtdhfjChCyI71V+ADqFkjsA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer": "4.9.2",
|
||||
|
|
@ -16393,9 +16369,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"c8": {
|
||||
"version": "7.11.3",
|
||||
"resolved": "https://registry.npmjs.org/c8/-/c8-7.11.3.tgz",
|
||||
"integrity": "sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==",
|
||||
"version": "7.12.0",
|
||||
"resolved": "https://registry.npmjs.org/c8/-/c8-7.12.0.tgz",
|
||||
"integrity": "sha512-CtgQrHOkyxr5koX1wEUmN/5cfDa2ckbHRA4Gy5LAL0zaCFtVWJS5++n+w4/sr2GWGerBxgTjpKeDclk/Qk6W/A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@bcoe/v8-coverage": "^0.2.3",
|
||||
|
|
@ -17368,22 +17344,6 @@
|
|||
"object-keys": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"del": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz",
|
||||
"integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"globby": "^11.0.1",
|
||||
"graceful-fs": "^4.2.4",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-path-cwd": "^2.2.0",
|
||||
"is-path-inside": "^3.0.2",
|
||||
"p-map": "^4.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"slash": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
|
|
@ -19115,9 +19075,9 @@
|
|||
}
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.1.tgz",
|
||||
"integrity": "sha512-NO601wvGO4Zm25ctJUhuglRBShQKJSGKGQlgbeyjs3cvXqq4Ud1jhwR36zf3pTC9mmfH3uHJHb/sL3/YJPqMzw==",
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.0.2.tgz",
|
||||
"integrity": "sha512-AqmDHmz3bIe573OiM4svTZzajBzff1xpuzYAimW8gjzW5ncuPllWB8t/GKl+NSuKRJaKyIF2bU2RCx8H1dwqyQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "^5.0.0",
|
||||
|
|
@ -19398,12 +19358,6 @@
|
|||
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
|
||||
"dev": true
|
||||
},
|
||||
"is-path-cwd": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
||||
"integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-path-inside": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
|
||||
|
|
@ -21359,9 +21313,9 @@
|
|||
}
|
||||
},
|
||||
"make-fetch-happen": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz",
|
||||
"integrity": "sha512-0ASJbG12Au6+N5I84W+8FhGS6iM8MyzvZady+zaQAu+6IOaESFzCLLD0AR1sAFF3Jufi8bxm586ABN6hWd3k7g==",
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.0.tgz",
|
||||
"integrity": "sha512-OnEfCLofQVJ5zgKwGk55GaqosqKjaR6khQlJY3dBAA+hM25Bc5CmX5rKUfVut+rYA3uidA7zb7AvcglU87rPRg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"agentkeepalive": "^4.2.1",
|
||||
|
|
@ -23031,9 +22985,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"tinyspy": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-0.3.3.tgz",
|
||||
"integrity": "sha512-gRiUR8fuhUf0W9lzojPf1N1euJYA30ISebSfgca8z76FOvXtVXqd5ojEIaKLWbDQhAaC3ibxZIjqbyi4ybjcTw==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.0.tgz",
|
||||
"integrity": "sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw==",
|
||||
"dev": true
|
||||
},
|
||||
"tmp": {
|
||||
|
|
@ -23442,22 +23396,22 @@
|
|||
}
|
||||
},
|
||||
"vite": {
|
||||
"version": "2.9.14",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.14.tgz",
|
||||
"integrity": "sha512-P/UCjSpSMcE54r4mPak55hWAZPlyfS369svib/gpmz8/01L822lMPOJ/RYW6tLCe1RPvMvOsJ17erf55bKp4Hw==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.2.tgz",
|
||||
"integrity": "sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild": "^0.14.27",
|
||||
"esbuild": "^0.14.47",
|
||||
"fsevents": "~2.3.2",
|
||||
"postcss": "^8.4.13",
|
||||
"resolve": "^1.22.0",
|
||||
"rollup": "^2.59.0"
|
||||
"postcss": "^8.4.14",
|
||||
"resolve": "^1.22.1",
|
||||
"rollup": "^2.75.6"
|
||||
}
|
||||
},
|
||||
"vitest": {
|
||||
"version": "0.16.0",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-0.16.0.tgz",
|
||||
"integrity": "sha512-Ntp6jrM8wf2NMtamMBLkRBBdeqHkgAH/WMh5Xryts1j2ft2D8QZQbiSVFkSl4WmEQzcPP0YM069g/Ga1vtnEtg==",
|
||||
"version": "0.18.1",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-0.18.1.tgz",
|
||||
"integrity": "sha512-4F/1K/Vn4AvJwe7i2YblR02PT5vMKcw9KN4unDq2KD0YcSxX0B/6D6Qu9PJaXwVuxXMFTQ5ovd4+CQaW3bwofA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/chai": "^4.3.1",
|
||||
|
|
@ -23465,10 +23419,10 @@
|
|||
"@types/node": "*",
|
||||
"chai": "^4.3.6",
|
||||
"debug": "^4.3.4",
|
||||
"local-pkg": "^0.4.1",
|
||||
"tinypool": "^0.2.1",
|
||||
"tinyspy": "^0.3.3",
|
||||
"vite": "^2.9.12"
|
||||
"local-pkg": "^0.4.2",
|
||||
"tinypool": "^0.2.4",
|
||||
"tinyspy": "^1.0.0",
|
||||
"vite": "^2.9.12 || ^3.0.0-0"
|
||||
}
|
||||
},
|
||||
"w3c-hr-time": {
|
||||
|
|
|
|||
31
package.json
31
package.json
|
|
@ -60,39 +60,38 @@
|
|||
"postinstall:vulnerabilities": "node ./.husky/postinstall.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cucumber/cucumber": "^8.3.1",
|
||||
"@cucumber/cucumber": "^8.5.0",
|
||||
"@octokit/rest": "^19.0.3",
|
||||
"@tsconfig/node16": "^1.0.3",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/cheerio": "^0.22.31",
|
||||
"@types/eslint": "^8.4.3",
|
||||
"@types/eslint": "^8.4.5",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/lodash.clonedeep": "^4.5.7",
|
||||
"@types/lodash.isobject": "^3.0.7",
|
||||
"@types/lodash.isplainobject": "^4.0.7",
|
||||
"@types/lodash.merge": "^4.6.7",
|
||||
"@types/lodash.zip": "^4.2.7",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^18.0.6",
|
||||
"@types/split2": "^3.2.1",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"@typescript-eslint/utils": "^5.29.0",
|
||||
"aws-sdk": "^2.1162.0",
|
||||
"c8": "^7.11.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"@typescript-eslint/utils": "^5.30.7",
|
||||
"aws-sdk": "^2.1178.0",
|
||||
"c8": "^7.12.0",
|
||||
"camelcase": "^7.0.0",
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
"copyfiles": "^2.4.1",
|
||||
"del": "^6.1.1",
|
||||
"depcheck": "^1.4.3",
|
||||
"ejs": "^3.1.8",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-plugin-unicorn": "^43.0.1",
|
||||
"eslint-plugin-wdio": "^7.19.4",
|
||||
"eslint": "^8.20.0",
|
||||
"eslint-plugin-unicorn": "^43.0.2",
|
||||
"eslint-plugin-wdio": "^7.20.6",
|
||||
"husky": "^8.0.1",
|
||||
"inquirer": "^9.0.0",
|
||||
"inquirer": "^9.0.2",
|
||||
"jsdom": "^20.0.0",
|
||||
"lerna": "^5.1.6",
|
||||
"lerna": "^5.1.8",
|
||||
"lerna-changelog": "^2.2.0",
|
||||
"markdox": "^0.1.10",
|
||||
"mime-types": "^2.1.35",
|
||||
|
|
@ -102,9 +101,9 @@
|
|||
"rimraf": "^3.0.2",
|
||||
"shelljs": "^0.8.5",
|
||||
"tempy": "^3.0.0",
|
||||
"ts-node": "^10.8.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4",
|
||||
"url-join": "^5.0.0",
|
||||
"vitest": "^0.16.0"
|
||||
"vitest": "^0.18.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import del from 'del'
|
||||
import rimraf from 'rimraf'
|
||||
import { load } from 'cheerio'
|
||||
|
||||
export function getResults (resultsDir: any) {
|
||||
|
|
@ -19,5 +19,5 @@ export function getResultFiles (resultsDir: any, patterns: any) {
|
|||
}
|
||||
|
||||
export function clean (resultsDir: any) {
|
||||
return del(resultsDir, { force: true })
|
||||
return rimraf.sync(resultsDir)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -690,10 +690,8 @@ describe('launcher', () => {
|
|||
expect(launcher.configParser.getCapabilities).toBeCalledTimes(2)
|
||||
expect(launcher.configParser.getConfig).toBeCalledTimes(1)
|
||||
expect(launcher.runner!.initialise).toBeCalledTimes(1)
|
||||
// @ts-expect-error
|
||||
expect(config.onPrepare[0]).toBeCalledTimes(1)
|
||||
expect(launcher.runMode).toBeCalledTimes(1)
|
||||
// @ts-expect-error
|
||||
expect(config.onPrepare[0]).toBeCalledTimes(1)
|
||||
expect(launcher.interface!.finalise).toBeCalledTimes(1)
|
||||
})
|
||||
|
|
@ -713,7 +711,6 @@ describe('launcher', () => {
|
|||
})
|
||||
|
||||
it('should shutdown runner on error', async () => {
|
||||
// @ts-expect-error
|
||||
delete logger.waitForBuffer
|
||||
|
||||
let error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, it, expect, afterEach, beforeEach, test } from 'vitest'
|
||||
import path from 'node:path'
|
||||
import * as childProcess from 'node:child_process'
|
||||
import fs from 'fs-extra'
|
||||
import ejs from 'ejs'
|
||||
import readDir from 'recursive-readdir'
|
||||
|
|
@ -343,7 +344,7 @@ describe('addServiceDeps', () => {
|
|||
it('should not add appium if globally installed', () => {
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line no-import-assign, @typescript-eslint/no-unused-vars
|
||||
execSyncRes = '1.13.0'
|
||||
childProcess.execSyncRes = '1.13.0'
|
||||
const packages: any = []
|
||||
addServiceDeps([{ package: '@wdio/appium-service', short: 'appium' }], packages)
|
||||
expect(packages).toEqual([])
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from '../utils.js'
|
||||
import { SUPPORTED_HOOKS, SUPPORTED_FILE_EXTENSIONS, DEFAULT_CONFIGS } from '../constants.js'
|
||||
|
||||
import type { PathService } from '../types'
|
||||
import type { PathService, ModuleImportService } from '../types'
|
||||
|
||||
const log = logger('@wdio/config:ConfigParser')
|
||||
const MERGE_OPTIONS = { clone: false }
|
||||
|
|
@ -35,7 +35,7 @@ export default class ConfigParser {
|
|||
|
||||
constructor(
|
||||
private _pathService: PathService = new FileSystemPathService(),
|
||||
private _moduleRequireService: ModuleRequireService = new RequireLibrary()
|
||||
private _moduleRequireService: ModuleImportService = new RequireLibrary()
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default class StaticServerLauncher implements Services.ServiceInstance {
|
|||
|
||||
if (outputDir) {
|
||||
const file = join(outputDir, DEFAULT_LOG_NAME)
|
||||
fs.createFileSync(file)
|
||||
await fs.createFile(file)
|
||||
const stream = fs.createWriteStream(file)
|
||||
this._server.use(morgan('tiny', { stream }))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ test('should stream logs to log dir', async () => {
|
|||
filename = filename.split('/').join('\\')
|
||||
}
|
||||
|
||||
expect(fs.createFileSync).toBeCalledWith(filename)
|
||||
expect(fs.createFile).toBeCalledWith(filename)
|
||||
expect(fs.createWriteStream).toBeCalledWith(filename)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import path from 'node:path'
|
||||
import { EventEmitter } from 'node:events'
|
||||
|
||||
import { describe, it, expect, vi } from 'vitest'
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
||||
import logger from '@wdio/logger'
|
||||
import type Protocols from '@wdio/protocols'
|
||||
import type { Options } from '@wdio/types'
|
||||
|
|
@ -218,7 +218,7 @@ describe('command wrapper result log', () => {
|
|||
title: 'truncate long string value',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: 'f'.repeat(65),
|
||||
log: 'f'.repeat(65)
|
||||
log: 'f'.repeat(61) + '...'
|
||||
}, {
|
||||
title: 'truncate long string value',
|
||||
command: {
|
||||
|
|
@ -256,7 +256,7 @@ describe('command wrapper result log', () => {
|
|||
title: 'do nothing to values with length less then 65',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: 'f'.repeat(64),
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}, {
|
||||
title: 'not truncate long string value',
|
||||
command: {
|
||||
|
|
@ -267,40 +267,44 @@ describe('command wrapper result log', () => {
|
|||
}
|
||||
},
|
||||
value: 'f'.repeat(66),
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}, {
|
||||
title: 'do nothing to non string value: array',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: [],
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}, {
|
||||
title: 'do nothing to non string value: object',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: {},
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}, {
|
||||
title: 'do nothing to non string value: number',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: 3,
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}, {
|
||||
title: 'do nothing to non string value: boolean',
|
||||
command: { ...takeScreenshotCmd },
|
||||
value: false,
|
||||
get log() { return this.value }
|
||||
get log () { return this.value }
|
||||
}]
|
||||
|
||||
logger.clearLogger = jest.fn()
|
||||
const clearLoggerSpy = jest.spyOn(logger, 'clearLogger')
|
||||
logger.clearLogger = vi.fn()
|
||||
const clearLoggerSpy = vi.spyOn(logger, 'clearLogger')
|
||||
|
||||
beforeEach(() => {
|
||||
delete process.env.WDIO_WORKER_ID
|
||||
jest.clearAllMocks()
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
for (const scenario of scenarios) {
|
||||
it(`should ${scenario.title} for ${scenario.command.endpoint.command}`, async () => {
|
||||
const resultFunction = await getRequestCallback(scenario.command.method, scenario.command.path, scenario.command.endpoint) as unknown as mockResponse
|
||||
const resultFunction = await getRequestCallback(
|
||||
scenario.command.method,
|
||||
scenario.command.path,
|
||||
scenario.command.endpoint
|
||||
) as unknown as mockResponse
|
||||
|
||||
resultFunction({ value: scenario.value })
|
||||
expect(vi.mocked(log.info).mock.calls[0][1]).toBe(scenario.log)
|
||||
|
|
@ -308,16 +312,24 @@ describe('command wrapper result log', () => {
|
|||
})
|
||||
}
|
||||
|
||||
it('should be no result in log if there is value in response', () => {
|
||||
it('should be no result in log if there is value in response', async () => {
|
||||
process.env.WDIO_WORKER_ID = '0-0'
|
||||
const resultFunction = getRequestCallback(deleteSessionCmd.method, takeScreenshotCmd.path, takeScreenshotCmd.endpoint) as unknown as mockResponse
|
||||
const resultFunction = await getRequestCallback(
|
||||
deleteSessionCmd.method,
|
||||
takeScreenshotCmd.path,
|
||||
takeScreenshotCmd.endpoint
|
||||
) as unknown as mockResponse
|
||||
resultFunction({})
|
||||
expect(vi.mocked(log.info).mock.calls).toHaveLength(0)
|
||||
expect(clearLoggerSpy).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should call clearLogger on deleteSession cmd', () => {
|
||||
const resultFunction = getRequestCallback(deleteSessionCmd.method, deleteSessionCmd.path, deleteSessionCmd.endpoint) as unknown as mockResponse
|
||||
it('should call clearLogger on deleteSession cmd', async () => {
|
||||
const resultFunction = await getRequestCallback(
|
||||
deleteSessionCmd.method,
|
||||
deleteSessionCmd.path,
|
||||
deleteSessionCmd.endpoint
|
||||
) as unknown as mockResponse
|
||||
resultFunction({})
|
||||
expect(vi.mocked(log.info).mock.calls).toHaveLength(0)
|
||||
expect(clearLoggerSpy).toHaveBeenCalledTimes(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue