Skip to content

Commit

Permalink
fix type checking errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ykaiboussiSO committed Dec 16, 2024
1 parent 0d283b5 commit 5bf902b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 53 deletions.
2 changes: 1 addition & 1 deletion cmd/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"scripts": {
"generate:prisma": "yarn prisma db pull && yarn prisma generate",
"pretest": "ts-node/esm src/helpers/init.ts",
"pretest": "tsc src/helpers/init.ts",
"test:e2e": "env-cmd -e dev cucumber-js --config=src/cucumber.json --tags '@e2e'",
"test:failed": "env-cmd -e dev cucumber-js -p rerun --config=src/cucumber.json @rerun.txt"
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/e2e/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class User {
if (this.password == '') {
uniquePassword = faker.lorem.word({ length: { min: 5, max: 10 }})
} else {
uniquePassword = this.password
uniquePassword = this.password as string
}

const now = new Date();
Expand Down
43 changes: 0 additions & 43 deletions cmd/e2e/src/cucumber.js

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/e2e/src/helpers/hashpassword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { hash, argon2id } from 'argon2';
* Returns a string suitable for use as the 'digest' of an auth_secrets record in the postgres db
* Matches the same algorithm used by the BHE API when creating or updating auth_secrets
*/
const hashPassword = async (password) => {
const hashPassword = async (password: string) => {
const hashedPassword = await hash(password, {
type: argon2id,
timeCost: 3,
Expand Down
6 changes: 3 additions & 3 deletions cmd/e2e/src/support/FixtureManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export interface IFixture {
}
// FixtureManager manages the state of the browser and page for each scenario
export default class FixtureManager implements IFixture {
browser: Browser;
context: BrowserContext;
browser!: Browser;
context!: BrowserContext;
pageManager: PageManager;
page: Page;
page!: Page;

constructor() {
this.pageManager = new PageManager();
Expand Down
2 changes: 1 addition & 1 deletion cmd/e2e/src/support/pageManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BrowserContext, Page } from "@playwright/test";

export default class PageManager {
currentPage: Page;
currentPage!: Page;

get Page(): Page {
return this.currentPage;
Expand Down
4 changes: 2 additions & 2 deletions cmd/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"compilerOptions": {
"module": "ESNext",
"typeRoots": [
"./node_modules/@types",
"src/helpers/types"
],
"moduleResolution": "nodenext",
"resolveJsonModule": true
"strict": true,
"noUncheckedIndexedAccess": true
}
}
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5783,7 +5783,6 @@ __metadata:
playwright: 1.49.0
prisma: 5.22.0
reflect-metadata: ^0.2.2
ts-node: ^10.9.2
typescript: 5.6.3
languageName: unknown
linkType: soft
Expand Down

0 comments on commit 5bf902b

Please sign in to comment.