Skip to content

Commit

Permalink
test(e2e): Fix types
Browse files Browse the repository at this point in the history
At least locally I got some type errors here, let's see...
  • Loading branch information
mydea committed Jul 11, 2023
1 parent 704b846 commit 83a8e42
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/e2e-tests/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ export interface RecipeTestResult extends RecipeInstance {
tests: TestResult[];
}

export type Env = Record<string, string | string>;
export type Env = Record<string, string | undefined>;
15 changes: 8 additions & 7 deletions packages/e2e-tests/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ interface SpawnAsync {
status: number | null;
}

export function spawnAsync(
cmd: string,
options?:
| childProcess.SpawnOptionsWithoutStdio
| childProcess.SpawnOptionsWithStdioTuple<childProcess.StdioPipe, childProcess.StdioPipe, childProcess.StdioPipe>,
input?: string,
): Promise<SpawnAsync> {
interface SpawnOptions {
timeout?: number;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
env?: any;
cwd?: string;
}

export function spawnAsync(cmd: string, options?: SpawnOptions, input?: string): Promise<SpawnAsync> {
const start = Date.now();

return new Promise<SpawnAsync>(resolve => {
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"fix": "run-s fix:eslint fix:prettier",
"fix:eslint": "eslint . --format stylish --fix",
"fix:prettier": "prettier --config ../../.prettierrc.json --write . ",
"lint": "run-s lint:prettier lint:eslint",
"lint": "run-s lint:prettier lint:eslint lint:ts",
"lint:eslint": "eslint . --format stylish",
"lint:prettier": "prettier --config ../../.prettierrc.json --check .",
"lint:ts": "tsc --noEmit",
"test:e2e": "run-s test:validate-configuration test:validate-test-app-setups test:run",
"test:run": "ts-node run.ts",
"test:validate-configuration": "ts-node validate-verdaccio-configuration.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "../../tsconfig.json",
"exclude": ["node_modules", "test-applications"],
"compilerOptions": {
"types": ["node"]
}
Expand Down

0 comments on commit 83a8e42

Please sign in to comment.