Skip to content

Commit 8ca8bb6

Browse files
committed
cleanup: comments
1 parent 6a98ed3 commit 8ca8bb6

File tree

8 files changed

+6
-283
lines changed

8 files changed

+6
-283
lines changed

Diff for: __tests__/extend.test.js

-59
This file was deleted.

Diff for: __tests__/output.test.js

-215
This file was deleted.

Diff for: package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
"license": "MIT",
77
"main": "./src/index.js",
88
"types": "./src/index.d.ts",
9+
"engines": {
10+
"node": ">=16.11.0"
11+
},
912
"scripts": {
10-
"test": "jest --watch",
13+
"test": "jest",
14+
"test:w": "jest --watch",
1115
"check:tar": "npm pack && tar -xvzf *.tgz && rm -rf package *.tgz"
1216
},
1317
"files": [

Diff for: src/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
declare module "expect" {
2+
23
//to-log matchers
34
interface Matchers<R> {
45
toLog(expected: string): R;

Diff for: src/matchers/toLog.js

-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ function toLogMatcher(actual, expected) {
1414
console.log = (firstArg, ...rest) => {
1515
loggedMessage += util.format(firstArg, ...rest) + "\n";
1616
return origConsoleLog(firstArg, ...rest);
17-
// return;
1817
};
1918

20-
//work cuz only an alias, .info DNCall .log unlike .log calling process.stdout.write
21-
//Console.prototype.info = . .log
22-
//Console.prototype.debug = . .log
2319
console.info = console.log;
2420
console.debug = console.log;
2521

Diff for: src/matchers/toLogErrorOrWarn.js

-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ function toLogErrorOrWarnMatcher(actual, expected) {
2424
console.error = origConsoleError;
2525
console.warn = origConsoleWarn;
2626

27-
//ansi applied only after invoked, so cleaning nu need
2827
const cleanedMessage = util.stripVTControlCharacters(loggedMessage);
29-
// const cleanedMessage = loggedMessage;
3028

3129
const pass = cleanedMessage === expected;
3230

Diff for: src/matchers/toLogStderr.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function toLogStderrMatcher(actual, expected) {
1212
if (typeof chunk == "string") {
1313
loggedMessage += chunk;
1414
}
15-
//display the side effects of the orig function
1615
return origProcessStderrWrite(chunk, encoding, cb);
1716
};
1817

Diff for: src/matchers/toLogStdout.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function toLogStdoutMatcher(actual, expected) {
1212
if (typeof chunk == "string") {
1313
loggedMessage += chunk;
1414
}
15-
//display the side effects of the orig function
1615
return origProcessStdoutWrite(chunk, encoding, cb);
1716
};
1817

0 commit comments

Comments
 (0)