lookup: add jsdom
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 https://github.com/nodejs/citgm/pull/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 https://github.com/nodejs/citgm/pull/728 with a few more changes in order for it to work.
Codecov Report
Merging #740 into master will decrease coverage by
0.1%. The diff coverage is75%.
@@ 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% <ø> (ø) |
:arrow_up: |
| lib/timeout.js | 100% <100%> (ø) |
:arrow_up: |
| lib/package-manager/test.js | 98.52% <100%> (ø) |
:arrow_up: |
| lib/lookup.js | 96.15% <50%> (-1.22%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 0c03420...af35737. Read the comment docs.
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 https://github.com/nodejs/citgm/issues/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.
@Zirro if you rebase a timeout option has now landed (#769)