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

lookup: add jsdom #740

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

lookup: add jsdom #740

wants to merge 4 commits into from

Conversation

Zirro
Copy link
Contributor

@Zirro Zirro commented May 29, 2019

jsdom is a JavaScript implementation of the DOM and HTML standards, commonly used for testing and scraping websites while behaving much like a regular web browser.

It fulfills all the hard requirements of citgm (after the tests-in-tarball requirement was relaxed in #695) and several soft requirements given its widespread usage within testing frameworks. The code makes frequent use of less common APIs such as vm, and is currently covered by around ~4500 tests that have revealed unusual bugs in the past.

The tests usually take between 10-12 minutes to complete, so I've built on @SimenB's WIP to add the timeoutLength option in #728 with a few more changes in order for it to work.

@codecov-io
Copy link

codecov-io commented May 29, 2019

Codecov Report

Merging #740 into master will decrease coverage by 0.1%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #740      +/-   ##
==========================================
- Coverage   96.22%   96.11%   -0.11%     
==========================================
  Files          27       27              
  Lines         874      876       +2     
==========================================
+ Hits          841      842       +1     
- Misses         33       34       +1
Impacted Files Coverage Δ
lib/common-args.js 100% <ø> (ø) ⬆️
lib/timeout.js 100% <100%> (ø) ⬆️
lib/package-manager/test.js 98.52% <100%> (ø) ⬆️
lib/lookup.js 96.15% <50%> (-1.22%) ⬇️

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 0c03420...af35737. Read the comment docs.

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM with a green CI % comment.

This is indeed a great addition!

@@ -73,8 +73,7 @@ module.exports = function commonArgs(app) {
.option('timeout', {
alias: 'o',
type: 'number',
description: 'Set timeout for npm install',
default: 1000 * 60 * 10
Copy link
Member

Choose a reason for hiding this comment

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

Should the default not be kept / how come the removal is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the default is set at this point it overrides the module-specific timeout later on at https://github.com/nodejs/citgm/pull/740/files#diff-166959275b22802c268f62f152801cbcR9.

If --timeout is not provided, it falls back to kDefaultTimeout (which previously seems to have been redundant).

@Zirro
Copy link
Contributor Author

Zirro commented May 30, 2019

One thing I forgot to mention earlier is that some of the tests utilize a Python server to act as the 'backend'. Is Python available out of the box on all platforms?

Would you like me to skip AIX here due to #688, or would you rather resolve it later on by automatically skipping AIX for all packages where Yarn is used?

I also think I might need some help writing the tests for timeoutLength. It's not clear to me exactly where they belong within the testing structure.

@SimenB
Copy link
Member

SimenB commented May 9, 2020

@Zirro if you rebase a timeout option has now landed (#769)

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.

4 participants