mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
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:
@@ -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)) &&
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user