@supertape/formatter-progress-bar 6.0.0 → 6.1.0

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.
@@ -49,6 +49,9 @@ export function createFormatter(bar) {
49
49
  out,
50
50
  store,
51
51
  }),
52
+ comment: comment({
53
+ out,
54
+ }),
52
55
  end: end({
53
56
  barStore,
54
57
  out,
@@ -110,6 +113,10 @@ export const fail = ({out, store}) => ({at, count, message, operator, result, ex
110
113
  out('');
111
114
  };
112
115
 
116
+ export const comment = ({out}) => ({message}) => {
117
+ out(`# ${message}`);
118
+ };
119
+
113
120
  export const end = ({barStore, out}) => ({count, passed, failed, skiped}) => {
114
121
  barStore().stop();
115
122
 
@@ -128,7 +135,7 @@ export const end = ({barStore, out}) => ({count, passed, failed, skiped}) => {
128
135
  out(`# ❌ fail ${failed}`);
129
136
 
130
137
  if (!failed)
131
- out('# ✅ ok');
138
+ out(formatOk());
132
139
 
133
140
  out('');
134
141
  out('');
@@ -200,6 +207,13 @@ function _createProgress({total, color, test}) {
200
207
  return bar;
201
208
  }
202
209
 
210
+ function formatOk() {
211
+ const {TERMINAL_EMULATOR} = process.env;
212
+ const spaces = /JetBrains/.test(TERMINAL_EMULATOR) ? ' ' : '';
213
+
214
+ return `# ✅ ${spaces}ok`;
215
+ }
216
+
203
217
  function formatSkip(skiped) {
204
218
  return `# ${WARNING} skip ${skiped}`;
205
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supertape/formatter-progress-bar",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "📼 Supertape formatter progress bar",
6
6
  "homepage": "http://github.com/coderaiser/supertape",