Repository navigation
test: fix CodeQL alert 1 and pass under jsdom 31 - #126
Merged
Merged
Conversation
CodeQL flagged the regex as incomplete multi-character sanitization (code scanning alert 1). Removing comment nodes from a clone does the same job without a regex.
jsdom 31 gives detached elements no computed style and rounds CSS percentages to six significant digits, as browsers do. Attach the export-menu test's cards to the document, and compare the icicle offset as a number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two test-only fixes. No change to the card or
dist/, so no release.Code scanning alert 1 (Incomplete multi-character sanitization).
test/condition.test.tsstripped Lit's<!---->markers fromouterHTMLwith a regex before comparing. It now clones the element and removes the comment nodes through the DOM, which does the same job without a regex.Tests pass under jsdom 31 (unblocks #125). jsdom 31 behaves more like a browser in two ways that broke two tests:
66.66666666666666%as text; it now compares the number.Full suite passes on jsdom 30 (current) and on jsdom 31 with #125's lockfile: 1539/1539.