Skip to content

Commit 83a8e42

Browse files
committed
test(e2e): Fix types
At least locally I got some type errors here, let's see...
1 parent 704b846 commit 83a8e42

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

packages/e2e-tests/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export interface RecipeTestResult extends RecipeInstance {
4747
tests: TestResult[];
4848
}
4949

50-
export type Env = Record<string, string | string>;
50+
export type Env = Record<string, string | undefined>;

packages/e2e-tests/lib/utils.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ interface SpawnAsync {
1717
status: number | null;
1818
}
1919

20-
export function spawnAsync(
21-
cmd: string,
22-
options?:
23-
| childProcess.SpawnOptionsWithoutStdio
24-
| childProcess.SpawnOptionsWithStdioTuple<childProcess.StdioPipe, childProcess.StdioPipe, childProcess.StdioPipe>,
25-
input?: string,
26-
): Promise<SpawnAsync> {
20+
interface SpawnOptions {
21+
timeout?: number;
22+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
23+
env?: any;
24+
cwd?: string;
25+
}
26+
27+
export function spawnAsync(cmd: string, options?: SpawnOptions, input?: string): Promise<SpawnAsync> {
2728
const start = Date.now();
2829

2930
return new Promise<SpawnAsync>(resolve => {

packages/e2e-tests/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"fix": "run-s fix:eslint fix:prettier",
1111
"fix:eslint": "eslint . --format stylish --fix",
1212
"fix:prettier": "prettier --config ../../.prettierrc.json --write . ",
13-
"lint": "run-s lint:prettier lint:eslint",
13+
"lint": "run-s lint:prettier lint:eslint lint:ts",
1414
"lint:eslint": "eslint . --format stylish",
1515
"lint:prettier": "prettier --config ../../.prettierrc.json --check .",
16+
"lint:ts": "tsc --noEmit",
1617
"test:e2e": "run-s test:validate-configuration test:validate-test-app-setups test:run",
1718
"test:run": "ts-node run.ts",
1819
"test:validate-configuration": "ts-node validate-verdaccio-configuration.ts",

packages/e2e-tests/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3+
"exclude": ["node_modules", "test-applications"],
34
"compilerOptions": {
45
"types": ["node"]
56
}

0 commit comments

Comments
 (0)