Skip to content

Commit

Permalink
test(e2e): fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc committed Aug 2, 2024
1 parent bdfe6b1 commit edaecec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig<AuthUsersOptions>({
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : '50%',
/* Opt out of parallel tests */
workers: 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand All @@ -29,7 +29,7 @@ export default defineConfig<AuthUsersOptions>({
trace: 'on-first-retry',

video: {
mode: 'retain-on-failure',
mode: 'on-first-retry',
size: { width: 1280, height: 720 },
},
},
Expand Down
10 changes: 8 additions & 2 deletions tests/game-server-simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,14 @@ export class GameServerSimulator {
}

async close() {
return new Promise<void>(resolve => {
this.socket.close(resolve)
return new Promise<void>((resolve, reject) => {
this.server.close(err => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}

Expand Down

0 comments on commit edaecec

Please sign in to comment.