Skip to content

Commit

Permalink
feat(component-testing): implement mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
DudaGod committed Nov 19, 2024
1 parent 2012c98 commit 3e46d29
Show file tree
Hide file tree
Showing 19 changed files with 1,556 additions and 53 deletions.
106 changes: 106 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@jspm/core": "2.0.1",
"@types/debug": "4.1.12",
"@types/yallist": "4.0.4",
"@vitest/spy": "2.1.4",
"@wdio/globals": "8.39.0",
"@wdio/protocols": "8.38.0",
"@wdio/types": "8.39.0",
Expand All @@ -81,6 +82,7 @@
"mocha": "10.2.0",
"plugins-loader": "1.3.4",
"png-validator": "1.1.0",
"recast": "0.23.6",
"resolve.exports": "2.0.2",
"sharp": "0.32.6",
"sizzle": "2.3.6",
Expand All @@ -90,6 +92,7 @@
"strftime": "0.10.2",
"strip-ansi": "6.0.1",
"temp": "0.8.3",
"tinyspy": "3.0.2",
"urijs": "1.19.11",
"url-join": "4.0.1",
"vite": "5.1.6",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "expect-webdriverio";
import { GlobalHelper } from "./types";
export { Testplane as default } from "./testplane";
export { Key } from "webdriverio";
export * from "./mock";

export type {
WdioBrowser,
Expand Down
10 changes: 10 additions & 0 deletions src/mock/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export * from "./vitest-spy";

// TODO: use from browser code when migrate to esm
type MockFactory = (originalImport?: unknown) => unknown;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function mock(_moduleName: string, _factory?: MockFactory): void {}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function unmock(_moduleName: string): void {}
Loading

0 comments on commit 3e46d29

Please sign in to comment.