GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix 'checks' validation test for checkPrime · nodejs/node@45e7b10

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-crypto-prime.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-crypto-prime.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-prime.js
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,16 @@ generatePrime(
229229
});
230230
});
231231

232-
['hello', {}, []].forEach((i) => {
233-
assert.throws(() => checkPrime(2, { checks: i }), {
234-
code: 'ERR_INVALID_ARG_TYPE'
235-
}, common.mustNotCall());
236-
assert.throws(() => checkPrimeSync(2, { checks: i }), {
237-
code: 'ERR_INVALID_ARG_TYPE'
232+
for (const checks of ['hello', {}, []]) {
233+
assert.throws(() => checkPrime(2n, { checks }, common.mustNotCall()), {
234+
code: 'ERR_INVALID_ARG_TYPE',
235+
message: /checks/
238236
});
239-
});
237+
assert.throws(() => checkPrimeSync(2n, { checks }), {
238+
code: 'ERR_INVALID_ARG_TYPE',
239+
message: /checks/
240+
});
241+
}
240242

241243
assert(!checkPrimeSync(Buffer.from([0x1])));
242244
assert(checkPrimeSync(Buffer.from([0x2])));

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.