-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch removed util methods for vows (#389)
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* @fileoverview Vows logs using methods from `util` that were removed in node v12. To avoid cryptic | ||
* error messages when tests fail, we patch those methods using `console.log`. | ||
* @see {@link https://nodejs.org/api/deprecations.html#DEP0026|`util.print` deprecation} | ||
* @see {@link https://nodejs.org/api/deprecations.html#DEP0027|`util.puts` deprecation} | ||
* @see {@link https://nodejs.org/docs/latest-v0.10.x/api/util.html|Docs for deprecated `util` methods} | ||
*/ | ||
|
||
// Patch deprecated util methods | ||
const util = require("node:util"); | ||
util.print = (...args) => console.log(args.join('')); | ||
util.puts = (...args) => console.log(args.join('\n')); | ||
// Call vows executable | ||
require("vows/bin/vows"); |