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

add testing environment #604

Merged
merged 20 commits into from
Oct 29, 2020
Merged

add testing environment #604

merged 20 commits into from
Oct 29, 2020

Conversation

sgratzl
Copy link
Member

@sgratzl sgratzl commented Oct 29, 2020

Prerequisites:

  • Unless it is a hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

Summary

usage -> see README section

@netlify
Copy link

netlify bot commented Oct 29, 2020

Preview link ready!

Built with commit 1cd9d3d

https://deploy-preview-604--cmu-delphi-covidcast.netlify.app

@dlaliberte
Copy link
Contributor

I reviewed the jest and cypress web sites and docs, and it all looks good to me. The main question I would have is whether they work well with Svelte, given it's particular design characteristics.

@sgratzl
Copy link
Member Author

sgratzl commented Oct 29, 2020

for cypress it doesn't make a difference since it is working with the website. for Jest, I use https://testing-library.com/docs/svelte-testing-library/intro which should deal with Svelte characteristics

@sgratzl sgratzl requested a review from tildechris October 29, 2020 15:16
@sgratzl sgratzl self-assigned this Oct 29, 2020
Copy link
Contributor

@tildechris tildechris left a comment

Choose a reason for hiding this comment

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

The testing framework here LGTM, but there's a lot to review.

I think I understand the test hooks and writing tests, but I do not understand the changes around msa.csv.js and friends. Can you summarize?

@sgratzl
Copy link
Member Author

sgratzl commented Oct 29, 2020

I think I understand the test hooks and writing tests, but I do not understand the changes around msa.csv.js and friends. Can you summarize?

importing non JavaScript files (like CSV) in JavaScript files usually requires a bundler like webpack or rollup with a custom loader. However, now we also have Jest in the loop which compiles the test code and thus also needs to handle to those kind of imports files. To avoid a more complicated test setup, I wrapped the CSV files to JavaScript modules, similar to what the current raw-loader of webpack was doing before.

Copy link
Contributor

@tildechris tildechris left a comment

Choose a reason for hiding this comment

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

That sounds reasonable. LGTM, thanks for the work here.

@sgratzl sgratzl merged commit bcb61d7 into dev Oct 29, 2020
@sgratzl sgratzl deleted the sgratzl/testing branch October 29, 2020 20:10
@melange396 melange396 mentioned this pull request Oct 2, 2024
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