test(studio): share one sealed preview frame that delivers messages like a browser (#8165)

* test(studio): share one sealed preview frame that delivers messages like a browser

* test(studio): name the sealed frame's port wrapper instead of commenting it

* fix(ci): the capture check treats .test-helpers files as tests, like the rest of the repo

* test(studio): keep the sealed frame's delivery helper private

* fix(studio): keep test helpers out of Studio's typecheck, like core does
This commit is contained in:
Miguel Ángel
2026-11-18 09:57:22 +00:00
committed by GitHub
parent bb55c1ea7e
commit 640cb37929
20 changed files with 127 additions and 384 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ function parseRecord(record) {
}
const DOC_FILE = /\.mdx?$/i;
const TEST_PATH = /\/(?:tests|__tests__)\/|\.(?:test|spec)\./;
const TEST_PATH = /\/(?:tests|__tests__)\/|\.(?:test|spec)(?:-helpers)?\./;
const isWatched = (path) =>
path !== "" &&
WATCHED_PREFIXES.some((prefix) => path.startsWith(prefix)) &&
+2 -1
View File
@@ -121,7 +121,8 @@ test("test files under a watched package need no capture", () => {
"28\t0\tpackages/studio/tests/e2e/edit-accuracy/server.test.mjs\0" +
"12\t4\tpackages/studio/tests/e2e/edit-accuracy/case.mjs\0" +
"6\t1\tpackages/player/src/a.spec.tsx\0" +
"40\t0\tpackages/studio/src/b.test.ts\0",
"40\t0\tpackages/studio/src/b.test.ts\0" +
"39\t0\tpackages/studio/src/c.test-helpers.ts\0",
);
assert.deepEqual(files, []);
assert.equal(evaluate({ body: "", files }).ok, true);