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

Use async FS in tests #1437

Merged
merged 5 commits into from May 27, 2018
Merged

Use async FS in tests #1437

merged 5 commits into from May 27, 2018

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented May 25, 2018

This PR refactors the tests to use async FS instead of sync FS, to be more inline with the code of parcel.

Also cleans up rimraf and ncp being copied and promisified in every test that used it.

This would also be usefull to port the tests to use virtual fs in the future for better test stability and performance (when using memfs), as the workers need to share the same fs as the master process, which can only occur asynchronously... (ipc)

@codecov-io
Copy link

Codecov Report

Merging #1437 into master will increase coverage by 3.89%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1437      +/-   ##
==========================================
+ Coverage   86.81%   90.71%   +3.89%     
==========================================
  Files          80       80              
  Lines        4369     6029    +1660     
==========================================
+ Hits         3793     5469    +1676     
+ Misses        576      560      -16
Impacted Files Coverage Δ
src/assets/WebManifestAsset.js 59.18% <0%> (-19.39%) ⬇️
src/Logger.js 83.06% <0%> (-12.73%) ⬇️
src/packagers/CSSPackager.js 87.87% <0%> (-12.13%) ⬇️
src/utils/getRootDir.js 86.11% <0%> (-8.34%) ⬇️
src/HMRServer.js 85% <0%> (-6.67%) ⬇️
src/Bundle.js 93.05% <0%> (-6.2%) ⬇️
src/packagers/JSPackager.js 82.74% <0%> (-5.83%) ⬇️
src/Pipeline.js 93.06% <0%> (-4.89%) ⬇️
src/utils/bundleReport.js 67.04% <0%> (-4.75%) ⬇️
src/FSCache.js 93.22% <0%> (-3.45%) ⬇️
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 304eb5f...7a2009c. Read the comment docs.

@devongovett devongovett merged commit 181a63f into master May 27, 2018
@devongovett devongovett deleted the improvement/async-test-fs branch May 27, 2018 17:51
devongovett pushed a commit that referenced this pull request Oct 15, 2018
devongovett pushed a commit that referenced this pull request Oct 15, 2018
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

3 participants