@jsenv/test 3.3.0 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jsenv_test.js
CHANGED
|
@@ -740,19 +740,35 @@ const createAnsi = ({ supported }) => {
|
|
|
740
740
|
MAGENTA: "\x1b[35m",
|
|
741
741
|
CYAN: "\x1b[36m",
|
|
742
742
|
GREY: "\x1b[90m",
|
|
743
|
-
color: (text,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
743
|
+
color: (text, color) => {
|
|
744
|
+
if (!ANSI.supported) {
|
|
745
|
+
return text;
|
|
746
|
+
}
|
|
747
|
+
if (!color) {
|
|
748
|
+
return text;
|
|
749
|
+
}
|
|
750
|
+
if (text.trim() === "") {
|
|
751
|
+
// cannot set color of blank chars
|
|
752
|
+
return text;
|
|
753
|
+
}
|
|
754
|
+
return `${color}${text}${RESET}`;
|
|
747
755
|
},
|
|
748
756
|
|
|
749
757
|
BOLD: "\x1b[1m",
|
|
750
758
|
UNDERLINE: "\x1b[4m",
|
|
751
759
|
STRIKE: "\x1b[9m",
|
|
752
|
-
effect: (text,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
760
|
+
effect: (text, effect) => {
|
|
761
|
+
if (!ANSI.supported) {
|
|
762
|
+
return text;
|
|
763
|
+
}
|
|
764
|
+
if (!effect) {
|
|
765
|
+
return text;
|
|
766
|
+
}
|
|
767
|
+
// cannot add effect to empty string
|
|
768
|
+
if (text === "") {
|
|
769
|
+
return text;
|
|
770
|
+
}
|
|
771
|
+
return `${effect}${text}${RESET}`;
|
|
756
772
|
},
|
|
757
773
|
};
|
|
758
774
|
|
|
@@ -5511,6 +5527,14 @@ const renderStatusRepartition = (counters, { showProgression } = {}) => {
|
|
|
5511
5527
|
return `all ${ANSI.color(`completed`, COLOR_COMPLETED)}`;
|
|
5512
5528
|
}
|
|
5513
5529
|
const parts = [];
|
|
5530
|
+
if (showProgression) {
|
|
5531
|
+
if (counters.executing) {
|
|
5532
|
+
parts.push(`${counters.executing} executing`);
|
|
5533
|
+
}
|
|
5534
|
+
if (counters.waiting) {
|
|
5535
|
+
parts.push(`${counters.waiting} waiting`);
|
|
5536
|
+
}
|
|
5537
|
+
}
|
|
5514
5538
|
if (counters.timedout) {
|
|
5515
5539
|
parts.push(
|
|
5516
5540
|
`${counters.timedout} ${ANSI.color(`timed out`, COLOR_TIMEOUT)}`,
|
|
@@ -5535,14 +5559,6 @@ const renderStatusRepartition = (counters, { showProgression } = {}) => {
|
|
|
5535
5559
|
if (counters.skipped) {
|
|
5536
5560
|
parts.push(`${counters.skipped} ${ANSI.color(`skipped`, COLOR_SKIPPED)}`);
|
|
5537
5561
|
}
|
|
5538
|
-
if (showProgression) {
|
|
5539
|
-
if (counters.executing) {
|
|
5540
|
-
parts.push(`${counters.executing} executing`);
|
|
5541
|
-
}
|
|
5542
|
-
if (counters.waiting) {
|
|
5543
|
-
parts.push(`${counters.waiting} waiting`);
|
|
5544
|
-
}
|
|
5545
|
-
}
|
|
5546
5562
|
return `${parts.join(", ")}`;
|
|
5547
5563
|
};
|
|
5548
5564
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@c88/v8-coverage": "0.1.1",
|
|
40
40
|
"@jsenv/abort": "4.3.0",
|
|
41
|
-
"@jsenv/ast": "6.1.
|
|
42
|
-
"@jsenv/filesystem": "4.7.
|
|
43
|
-
"@jsenv/github-check-run": "0.1.
|
|
44
|
-
"@jsenv/humanize": "1.2.
|
|
45
|
-
"@jsenv/plugin-supervisor": "1.4.
|
|
41
|
+
"@jsenv/ast": "6.1.3",
|
|
42
|
+
"@jsenv/filesystem": "4.7.4",
|
|
43
|
+
"@jsenv/github-check-run": "0.1.19",
|
|
44
|
+
"@jsenv/humanize": "1.2.1",
|
|
45
|
+
"@jsenv/plugin-supervisor": "1.4.15",
|
|
46
46
|
"@jsenv/url-meta": "8.4.2",
|
|
47
|
-
"@jsenv/urls": "2.2.
|
|
47
|
+
"@jsenv/urls": "2.2.9",
|
|
48
48
|
"@jsenv/utils": "2.1.1",
|
|
49
49
|
"istanbul-lib-coverage": "3.2.2",
|
|
50
50
|
"istanbul-lib-instrument": "6.0.3",
|
|
@@ -771,6 +771,14 @@ const renderStatusRepartition = (counters, { showProgression } = {}) => {
|
|
|
771
771
|
return `all ${ANSI.color(`completed`, COLOR_COMPLETED)}`;
|
|
772
772
|
}
|
|
773
773
|
const parts = [];
|
|
774
|
+
if (showProgression) {
|
|
775
|
+
if (counters.executing) {
|
|
776
|
+
parts.push(`${counters.executing} executing`);
|
|
777
|
+
}
|
|
778
|
+
if (counters.waiting) {
|
|
779
|
+
parts.push(`${counters.waiting} waiting`);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
774
782
|
if (counters.timedout) {
|
|
775
783
|
parts.push(
|
|
776
784
|
`${counters.timedout} ${ANSI.color(`timed out`, COLOR_TIMEOUT)}`,
|
|
@@ -795,14 +803,6 @@ const renderStatusRepartition = (counters, { showProgression } = {}) => {
|
|
|
795
803
|
if (counters.skipped) {
|
|
796
804
|
parts.push(`${counters.skipped} ${ANSI.color(`skipped`, COLOR_SKIPPED)}`);
|
|
797
805
|
}
|
|
798
|
-
if (showProgression) {
|
|
799
|
-
if (counters.executing) {
|
|
800
|
-
parts.push(`${counters.executing} executing`);
|
|
801
|
-
}
|
|
802
|
-
if (counters.waiting) {
|
|
803
|
-
parts.push(`${counters.waiting} waiting`);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
806
|
return `${parts.join(", ")}`;
|
|
807
807
|
};
|
|
808
808
|
|