Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Set up testing framework for the API #2

Open
jstavanja opened this issue Feb 15, 2019 · 1 comment
Open

Set up testing framework for the API #2

jstavanja opened this issue Feb 15, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jstavanja
Copy link
Owner

jstavanja commented Feb 15, 2019

Add Jest to the server application and set up a basic scaffolding for testing our API. We should use Jest as it is set up in the client Vue application as well.

We should also add a command, which runs both the API and client tests to use with CI.
The unit tests in the client are run with yarn test:unit or npm test:unit.

We can also add e2e tests to the client, as they are already set up. They are also run with yarn test:e2e or npm run test:e2e.

A basic Travis CI configuration that runs the tests would also be a great addition.

@jstavanja jstavanja added enhancement New feature or request good first issue Good for newcomers labels Feb 15, 2019
@jstavanja jstavanja changed the title Set up unit testing framework for the API Set up testing framework for the API Feb 16, 2019
@jstavanja
Copy link
Owner Author

Added jest to the Node.js server application, but we should now try and add meaningful tests which may require some refactoring of our controllers.

We should allow dependency injection for the Impulze and User models so we can later mock them in our tests and just ensure that they are being called. We should also be able to create temporary databases so we don't run tests on the development database in which we store random data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant