Merge pull request #9512 from webpack/bugfix/100-percent
fix 100% progress output
This commit is contained in:
commit
5a9d0292b4
|
@ -15,7 +15,9 @@ const truncateArgs = (args, maxLength) => {
|
|||
const availableLength = maxLength - lengths.length + 1;
|
||||
|
||||
if (availableLength > 0 && args.length === 1) {
|
||||
if (availableLength > 3) {
|
||||
if (availableLength >= args[0].length) {
|
||||
return args;
|
||||
} else if (availableLength > 3) {
|
||||
return ["..." + args[0].slice(-availableLength + 3)];
|
||||
} else {
|
||||
return [args[0].slice(-availableLength)];
|
||||
|
|
|
@ -49,6 +49,7 @@ describe("ProgressPlugin", function() {
|
|||
"omit arguments when no space"
|
||||
);
|
||||
expect(logs).toContain("93% ...hunk asset optimization");
|
||||
expect(logs).toContain("100%");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue