Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update test setup of e2e and integration #1651

Merged
merged 9 commits into from
Oct 15, 2024

Conversation

jannisvisser
Copy link
Contributor

Describe your changes

Resolves #1600 .

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added tests wherever relevant
  • I have made sure that all automated checks pass before requesting a review

Notes for the reviewer

  1. Any helpful instructions or clarifications...

@jannisvisser jannisvisser marked this pull request as draft October 14, 2024 08:26
@jannisvisser jannisvisser changed the title chore: e2e test use own helper setup chore: update test setup of e2e and integration Oct 14, 2024
@jannisvisser jannisvisser marked this pull request as ready for review October 14, 2024 11:16
Copy link
Member

@gulfaraz gulfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add scripts for test:integration and test:e2e to the root package.json.

The tests pass,

> [email protected] test
> node --expose-gc ./node_modules/jest/bin/jest.js --config=jest.api.config.js --runInBand --detectOpenHandles --logHeapUsage

ts-jest[versions] (WARN) Version 4.9.5 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
 PASS  email/drought/email-uga-drought.test.ts (7.758s, 149 MB heap size)
  Should send an email for uga drought
    ✓ triggered in january (6768ms)

 PASS  email/floods/email-uga-floods.test.ts (32.35s, 146 MB heap size)
  Should send an email for uga floods
    ✓ trigger (8132ms)
    ✓ warning (7830ms)
    ✓ warning-to-trigger (8027ms)
    ✓ no-trigger (8221ms)

 PASS  email/floods/email-ssd-floods.test.ts (15.51s, 155 MB heap size)
  Should send an email for ssd floods
    ✓ trigger (7473ms)
    ✓ no-trigger (7930ms)

 PASS  email/flash-flood/email-mwi-flash-flood.test.ts (18.009s, 146 MB heap size)
  Should send an email for mwi flash flood
    ✓ trigger (9385ms)
    ✓ no-trigger (8484ms)

 PASS  email/malaria/email-eth-malaria.test.ts (18.972s, 156 MB heap size)
  Should send an email for eth malaria
    ✓ trigger (9674ms)
    ✓ no-trigger (9177ms)

 PASS  email/dengue/email-phl-dengue.test.ts (19.79s, 146 MB heap size)
  Should send an email for phl dengue
    ✓ trigger (9644ms)
    ✓ no-trigger (10025ms)

 PASS  email/typhoon/email-phl-typhoon.test.ts (12.815s, 150 MB heap size)
  Should send an email for phl typhoon
    ✓ trigger (12666ms)

Test Suites: 7 passed, 7 total
Tests:       14 passed, 14 total
Snapshots:   0 total
Time:        125.531s
Ran all test suites.

tests/integration/email/drought/email-uga-drought.test.ts Outdated Show resolved Hide resolved
tests/integration/package.json Show resolved Hide resolved
tests/integration/package.json Show resolved Hide resolved
@jannisvisser jannisvisser merged commit 28a92be into master Oct 15, 2024
8 checks passed
@jannisvisser jannisvisser deleted the chore.e2e-testing-setup branch October 15, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] e2e test should use API to reset the database
2 participants