Skip to content

Automate testing; add code coverage #66

@iaincollins

Description

@iaincollins

There isn't any formal testing and at this point it's a defect in the project and should be a priority.

This issue is something of a blocker for #226 (automating publication of new releases).

The focus should probably be on having end-to-end acceptances tests at first, as those have more value than unit tests. We don't need to test everything, but we do need some sort of smoketest. Puppeteer seems like the best candidate for this.

Options

  • Mocha + Chai
  • Jest + Enzyme (great for testing React and Node.js projects in the same repo)
  • Puppeteer

Scope

There is already a docker compose suite that spins up MySQL, Postgres and MongoDB instances.

  • I think it would be sensible to test all those databases with two OAuth providers plus the email sign in flow (even if the email flow has to be partly mocked).
  • We should also test the same flows with no database configured.
  • Ideally we would also test with a database and JWT enabled (but if the above two flows work, this is likely to work also).
  • We should also test the database schema for each of those databases; a snapshot test for those is probably sufficient, just so schema changes are flagged.

Feedback

As this is a topic that attracts a lot of bike-shedding I'm going to come out and say that we are really only looking for feedback from either existing contributors or from people interested in helping with authoring tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions