browser-ava 1.0.3 → 1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-ava",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,10 +23,11 @@
23
23
  },
24
24
  "scripts": {
25
25
  "test": "npm run test:ava",
26
- "test:ava": "ava --timeout 2m tests/*.mjs",
27
- "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
26
+ "test:ava": "ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs",
27
+ "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
28
28
  },
29
29
  "dependencies": {
30
+ "chalk": "^5.1.2",
30
31
  "commander": "^9.4.1",
31
32
  "es-module-lexer": "^1.0.5",
32
33
  "globby": "^13.1.2",
@@ -58,6 +58,14 @@ program
58
58
  .argument("<tests...>")
59
59
  .action(async (tests, options) => {
60
60
  if (options.browser) {
61
+
62
+ const parts = options.browser.split(/:/);
63
+ if (parts.length > 1) {
64
+ if (parts[1] === "headless") {
65
+ options.headless = true;
66
+ }
67
+ options.browser = parts[0];
68
+ }
61
69
  browsers.push(knownBrowsers[options.browser]);
62
70
  }
63
71
 
@@ -116,7 +124,9 @@ program
116
124
  };
117
125
 
118
126
  for (const m of summaryMessages(summary)) {
119
- console.log(" " + chalk[classToColor[m.colorClass] || "black"](m.text));
127
+ console.log(
128
+ " " + chalk[classToColor[m.colorClass] || "black"](m.text)
129
+ );
120
130
  }
121
131
 
122
132
  await shutdown(summary.failed);