Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
replaced ascii.test method with RegExpPrototypeExec method
  • Loading branch information
pulkit-30 committed Dec 5, 2022
commit 07a6ab796e53464ed8d23634efbb5467a5664ae5
4 changes: 2 additions & 2 deletions lib/internal/test_runner/tap_lexer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { SafeSet, MathMax, StringPrototypeIncludes } = primordials;
const { SafeSet, MathMax, StringPrototypeIncludes, RegExpPrototypeExec } = primordials;
const {
codes: { ERR_TAP_LEXER_ERROR },
} = require('internal/errors');
Expand Down Expand Up @@ -485,7 +485,7 @@ class TapLexer {

#isNonASCIISymbol(char) {
const ascii = /^[ -~]+$/;
return !ascii.test(char);
return RegExpPrototypeExec(ascii, char) === null;
}

#isWhitespaceSymbol(char) {
Expand Down