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

test(plugin-browser): convert type tests to jest #948

Merged
merged 4 commits into from
Aug 19, 2020

Conversation

djskinner
Copy link
Contributor

Converts the type tests being run by tsc to basic jest integration tests that aim to replicate the type checking of the previous tests.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Jul 22, 2020

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 39.62 kB 12.23 kB
After 39.62 kB 12.23 kB
± No change No change

Generated by 🚫 dangerJS against bb08784

@bengourley
Copy link
Contributor

This looks good in terms of testing all the things the previous set up did.

My only concern is it now appears to make network requests, unless I'm missing some mocking or configuration somewhere?

If this is the case then I think it should be updated to either point to an endpoint on the local server or to mock/stub out the network calls made by the delivery layer, whichever is most straightforward to implement and least confusing for future travellers.

@djskinner
Copy link
Contributor Author

My only concern is it now appears to make network requests

I've gone with mocking XHR which allows us to make assertions too. It makes for a fairly decent (if minimal) set of integration tests.

@djskinner djskinner marked this pull request as ready for review August 18, 2020 08:15
Base automatically changed from convert-tests-to-jest to next August 19, 2020 11:08
@djskinner djskinner requested a review from a team as a code owner August 19, 2020 12:53
@djskinner djskinner merged commit 2d048e1 into next Aug 19, 2020
@djskinner djskinner deleted the convert-tests-to-jest-2 branch August 19, 2020 14:12
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.

3 participants