browser-ava 1.2.3 → 1.3.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 +2 -1
- package/src/browser-ava-cli.mjs +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-ava",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,6 +27,7 @@
|
|
|
27
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
|
+
"@koa/cors": "^4.0.0",
|
|
30
31
|
"chalk": "^5.1.2",
|
|
31
32
|
"commander": "^9.4.1",
|
|
32
33
|
"es-module-lexer": "^1.0.5",
|
package/src/browser-ava-cli.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { init, parse } from "es-module-lexer";
|
|
|
6
6
|
import { chromium, firefox, webkit } from "playwright";
|
|
7
7
|
import Koa from "koa";
|
|
8
8
|
import Static from "koa-static";
|
|
9
|
+
import Cors from "@koa/cors";
|
|
9
10
|
import { WebSocketServer } from "ws";
|
|
10
11
|
import { program, Option } from "commander";
|
|
11
12
|
import { calculateSummary, summaryMessages } from "./browser/util.mjs";
|
|
@@ -201,6 +202,8 @@ async function loadAndRewriteImports(file) {
|
|
|
201
202
|
async function createServer(tests, options) {
|
|
202
203
|
const app = new Koa();
|
|
203
204
|
|
|
205
|
+
app.use(Cors({ origin: "*" }));
|
|
206
|
+
|
|
204
207
|
app.use(Static(new URL("./browser", import.meta.url).pathname));
|
|
205
208
|
|
|
206
209
|
app.on("error", console.error);
|