Skip to content

Commit

Permalink
ensure in-memory mongodb is setup once and only once per the whole ev… (
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa authored Dec 9, 2024
1 parent adf4581 commit 31d35be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ jobs:

- name: Run Unit Test
if: steps.check-scripts.outputs.skip != 'true' && steps.check-scripts.outputs.skip-test != 'true'
env:
MONGOMS_DOWNLOAD_DIR: ${{ runner.temp }}/mongodb
run: cd ${{ matrix.package }} && yarn test

lint-knip:
Expand Down
3 changes: 2 additions & 1 deletion packages/events/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ vi.mock('@events/service/config/config', () => ({
getEventsConfig: () => Promise.all([tennisClubMembershipEvent])
}))

beforeAll(() => Promise.all([setupMongoServer(), setupESServer()]), 100000)
const setup = Promise.all([setupMongoServer(), setupESServer()])
beforeAll(() => setup, 100000)
afterEach(() => Promise.all([resetMongoServer(), resetESServer()]))

0 comments on commit 31d35be

Please sign in to comment.