Skip to content

Commit bd67563

Browse files
authored
Don't run the chatbot-list-view and chatbot-note-composed tests (commontoolsinc#1812)
- These tests are causing problems in the integration test, so temporarily disable them. - There was also an issue where we were instantiating more runtimes than needed (since beforeAll/afterAll can register multiple hooks that will all be called). The for loop was tightened to just encapsulate the `it`.
1 parent daf1d75 commit bd67563

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

packages/patterns/integration/all.test.ts

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,35 @@ import { join } from "@std/path";
55
import { assert } from "@std/assert";
66
import { Identity } from "@commontools/identity";
77
import { FileSystemProgramResolver } from "@commontools/js-runtime";
8-
import { RuntimeProgram } from "@commontools/runner";
98

109
const { API_URL, SPACE_NAME } = env;
1110

1211
describe("Compile all recipes", () => {
13-
for (const file of Deno.readDirSync(join(import.meta.dirname!, ".."))) {
14-
const { name } = file;
15-
if (!name.endsWith(".tsx")) continue;
12+
let cc: CharmsController;
13+
let identity: Identity;
1614

17-
let cc: CharmsController;
18-
let identity: Identity;
19-
20-
beforeAll(async () => {
21-
identity = await Identity.generate();
22-
cc = await CharmsController.initialize({
23-
spaceName: SPACE_NAME,
24-
apiUrl: new URL(API_URL),
25-
identity: identity,
26-
});
15+
beforeAll(async () => {
16+
identity = await Identity.generate();
17+
cc = await CharmsController.initialize({
18+
spaceName: SPACE_NAME,
19+
apiUrl: new URL(API_URL),
20+
identity: identity,
2721
});
22+
});
2823

29-
afterAll(async () => {
30-
if (cc) await cc.dispose();
31-
});
24+
afterAll(async () => {
25+
if (cc) await cc.dispose();
26+
});
27+
28+
const skippedPatterns = [
29+
"chatbot-list-view.tsx",
30+
"chatbot-note-composed.tsx",
31+
];
32+
// Add a test for each pattern, but skip ones that have issues
33+
for (const file of Deno.readDirSync(join(import.meta.dirname!, ".."))) {
34+
const { name } = file;
35+
if (!name.endsWith(".tsx")) continue;
36+
if (skippedPatterns.includes(name)) continue;
3237

3338
it(`Executes: ${name}`, async () => {
3439
const sourcePath = join(import.meta.dirname!, "..", name);

0 commit comments

Comments
 (0)