Skip to content

Commit 152575c

Browse files
Leon WeidauerConnor Clark
authored andcommitted
Fix Stats and BinTestCases after adding "Built at"
In order to pass the tests, a similar test replacement as with the millisecond values needs to happen. For the "Built at" stat all dates are replaces with Thu Jan 01 1970 00:00:00 GMT. Related to issue webpack#5305 add semicolon
1 parent 5cc55d8 commit 152575c

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

lib/Stats.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,6 @@ class Stats {
612612
newline();
613613
}
614614
if(typeof obj.time === "number") {
615-
colors.normal("Built at: ");
616-
colors.bold(new Date(obj.builtAt));
617-
newline();
618615
colors.normal("Time: ");
619616
colors.bold(obj.time);
620617
colors.normal("ms");

test/StatsTestCases.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe("StatsTestCases", () => {
9797
.replace(/\u001b\[39m\u001b\[22m/g, "</CLR>")
9898
.replace(/\u001b\[([0-9;]*)m/g, "<CLR=$1>")
9999
.replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2")
100-
.replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 <CLR=BOLD>00:00:00<\/CLR> GMT");
100+
.replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT");
101101
}
102102

103103
actual = actual

0 commit comments

Comments
 (0)