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

Integrations tests #1295

Merged
merged 12 commits into from
Mar 18, 2021
Merged

Integrations tests #1295

merged 12 commits into from
Mar 18, 2021

Conversation

shogunpurple
Copy link
Member

Description

This PR contains unit tests for all the current external data source integrations. Due to the integration heavy nature - the actual database/datasource layers are heavily mocked with Jest. These tests cover the functionality within the integration classes themselves, making sure that the right values are passed through to the respective database clients.

Also included some bug fixes and consistency issues here - so that clients can expect a consistent API when interacting with SQL databases.

Screenshots

Coverage after integrations tests:

Screenshot 2021-03-16 at 19 35 09

@mike12345567
Copy link
Collaborator

mike12345567 commented Mar 16, 2021

LGTM! This is excellent! we'll be green across the board once the relationship tests are in too!

One thing I would say is that in the package.json in the jest.collectCoverageFrom you can exclude the test directory from coverage which stops it from showing up anyway in the coverage report. Can do "!src/integrations/tests/**/*" to exclude everything, whether its a spec file or a JS file of some sort (like a utility).

Love the use of the __mocks__ directory for these integrations, means if we want to build up any behavioural tests or something like that in the future for any specific database quite easy to setup mocked values and so on.

@shogunpurple shogunpurple merged commit 6555e79 into next Mar 18, 2021
@shogunpurple shogunpurple deleted the integrations-tests branch March 18, 2021 09:45
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.

None yet

2 participants