From 7077852c8dcfade54141ac437913b72e09008375 Mon Sep 17 00:00:00 2001 From: Ford544 Date: Fri, 11 Sep 2026 14:45:11 +0000 Subject: [PATCH] Added top level suite to core/index_compile_test and increased timeouts for some tests --- cli/index_compile_test.ts | 653 ++++++++++++++++++-------------------- 1 file changed, 315 insertions(+), 338 deletions(-) diff --git a/cli/index_compile_test.ts b/cli/index_compile_test.ts index fd3c3c945..4a4434481 100644 --- a/cli/index_compile_test.ts +++ b/cli/index_compile_test.ts @@ -16,166 +16,159 @@ import { dataform } from "df/protos/ts"; import { suite, test } from "df/testing"; import { TmpDirFixture } from "df/testing/fixtures"; -suite("compile command", ({ afterEach }) => { - const tmpDirFixture = new TmpDirFixture(afterEach); +suite("compile", () => { + suite("compile command", ({ afterEach }) => { + const tmpDirFixture = new TmpDirFixture(afterEach); + + test( + "compile throws an error when dataformCoreVersion not in workflow_settings.yaml and no " + + "package.json exists", + async () => { + const projectDir = tmpDirFixture.createNewTmpDir(); + fs.writeFileSync( + path.join(projectDir, "workflow_settings.yaml"), + dumpYaml(dataform.WorkflowSettings.create({ defaultProject: "dataform" })) + ); + + expect((await runCli("compile", [projectDir])).stderr).contains( + "dataformCoreVersion must be specified either in workflow_settings.yaml or via a " + + "package.json" + ); + } + ); - test( - "compile throws an error when dataformCoreVersion not in workflow_settings.yaml and no " + - "package.json exists", - async () => { + test("compile error when package.json and no package is installed", async () => { const projectDir = tmpDirFixture.createNewTmpDir(); fs.writeFileSync( - path.join(projectDir, "workflow_settings.yaml"), - dumpYaml(dataform.WorkflowSettings.create({ defaultProject: "dataform" })) - ); - - expect( - (await runCli("compile", [projectDir])).stderr - ).contains( - "dataformCoreVersion must be specified either in workflow_settings.yaml or via a " + - "package.json" - ); - } - ); - - test("compile error when package.json and no package is installed", async () => { - const projectDir = tmpDirFixture.createNewTmpDir(); - fs.writeFileSync( - path.join(projectDir, "package.json"), - `{ + path.join(projectDir, "package.json"), + `{ "dependencies":{ "@dataform/core": "${version}" } }` - ); - fs.writeFileSync( - path.join(projectDir, "dataform.json"), - `{ + ); + fs.writeFileSync( + path.join(projectDir, "dataform.json"), + `{ "defaultDatabase": "tada-analytics", "defaultSchema": "df_integration_test", "assertionSchema": "df_integration_test_assertions", "defaultLocation": "${INTEGRATION_TEST_LOCATION}" } ` - ); - - expect( - (await runCli("compile", [projectDir])).stderr - ).contains( - "Could not find a recent installed version of @dataform/core in the project. Check that " + - "either `dataformCoreVersion` is specified in `workflow_settings.yaml`, or " + - "`@dataform/core` is specified in `package.json`. If using `package.json`, then run " + - "`dataform install`." - ); - }); - - test("compile rejects @dataform/core with incompatible version", async () => { - const projectDir = tmpDirFixture.createNewTmpDir(); - // dataformCoreVersion in workflow_settings.yaml triggers the stateless - // install path (compile.ts copies to a tmp dir and runs `npm i`), so the - // test exercises the same flow real users hit. 2.9.0 is the latest 2.x on - // the registry; its major (2) is incompatible with the current CLI (3.x). - fs.writeFileSync( - path.join(projectDir, "workflow_settings.yaml"), - dumpYaml( - dataform.WorkflowSettings.create({ - defaultProject: "dataform", - dataformCoreVersion: "2.9.0" - }) - ) - ); - - // npm needs a writable cache; ~/.npm is read-only in the bazel sandbox. - const npmCacheDir = tmpDirFixture.createNewTmpDir(); - const stderr = ( - await runCli("compile", [projectDir], { - env: { ...process.env, NPM_CONFIG_CACHE: npmCacheDir } - }) - ).stderr; - expect(stderr).contains("@dataform/core 2.9.0 is not compatible with @dataform/cli"); - expect(stderr).contains("matching major.minor"); - expect(stderr).contains("Set `dataformCoreVersion:"); - }); - - test("compile succeeds with @dataform/core <= 3.0.56 via caller-file shim", async () => { - const projectDir = tmpDirFixture.createNewTmpDir(); - // 3.0.50 predates 3.0.57, which is when @dataform/core started reading - // global.__dataform_current_file as a fallback in getCallerFile(). The - // compile path text-patches the bundle to add that fallback; this test - // proves the patch + host-side file stack drive a real action's - // fileName from inside vm2 3.11.3's path-stripped sandbox. - fs.writeFileSync( - path.join(projectDir, "workflow_settings.yaml"), - dumpYaml({ - defaultProject: INTEGRATION_TEST_PROJECT, - defaultLocation: INTEGRATION_TEST_LOCATION, - defaultDataset: "dataform", - dataformCoreVersion: "3.0.50" - }) - ); - writeDefinitionFile( - projectDir, - "example.sqlx", - `config { type: "table" }\nSELECT 1 AS id` - ); + ); - const npmCacheDir = tmpDirFixture.createNewTmpDir(); - const result = await runCli("compile", [projectDir, "--json"], { - env: { ...process.env, NPM_CONFIG_CACHE: npmCacheDir } + expect((await runCli("compile", [projectDir])).stderr).contains( + "Could not find a recent installed version of @dataform/core in the project. Check that " + + "either `dataformCoreVersion` is specified in `workflow_settings.yaml`, or " + + "`@dataform/core` is specified in `package.json`. If using `package.json`, then run " + + "`dataform install`." + ); }); - expect(result.exitCode, `compile failed: ${result.stderr}`).equals(0); - const compiled = JSON.parse(result.stdout); - expect(compiled.tables).to.have.lengthOf(1); - expect(compiled.tables[0].fileName).equals("definitions/example.sqlx"); - }); - - ["package.json", "package-lock.json", "node_modules"].forEach(npmFile => { - test(`compile throws an error when dataformCoreVersion in workflow_settings.yaml and ${npmFile} is present`, async () => { + test("compile rejects @dataform/core with incompatible version", { timeout: 60000 }, async () => { const projectDir = tmpDirFixture.createNewTmpDir(); + // dataformCoreVersion in workflow_settings.yaml triggers the stateless + // install path (compile.ts copies to a tmp dir and runs `npm i`), so the + // test exercises the same flow real users hit. 2.9.0 is the latest 2.x on + // the registry; its major (2) is incompatible with the current CLI (3.x). fs.writeFileSync( path.join(projectDir, "workflow_settings.yaml"), dumpYaml( dataform.WorkflowSettings.create({ defaultProject: "dataform", - dataformCoreVersion: "3.0.0" + dataformCoreVersion: "2.9.0" }) ) ); - const resolvedNpmPath = path.join(projectDir, npmFile); - if (npmFile === "node_modules") { - fs.mkdirSync(resolvedNpmPath); - } else { - fs.writeFileSync(resolvedNpmPath, ""); - } - expect( - (await runCli("compile", [projectDir])).stderr - ).contains(`${npmFile}' unexpected; remove it and try again`); + // npm needs a writable cache; ~/.npm is read-only in the bazel sandbox. + const npmCacheDir = tmpDirFixture.createNewTmpDir(); + const stderr = ( + await runCli("compile", [projectDir], { + env: { ...process.env, NPM_CONFIG_CACHE: npmCacheDir } + }) + ).stderr; + expect(stderr).contains("@dataform/core 2.9.0 is not compatible with @dataform/cli"); + expect(stderr).contains("matching major.minor"); + expect(stderr).contains("Set `dataformCoreVersion:"); + }); + + test("compile succeeds with @dataform/core <= 3.0.56 via caller-file shim", { timeout: 60000 }, async () => { + const projectDir = tmpDirFixture.createNewTmpDir(); + // 3.0.50 predates 3.0.57, which is when @dataform/core started reading + // global.__dataform_current_file as a fallback in getCallerFile(). The + // compile path text-patches the bundle to add that fallback; this test + // proves the patch + host-side file stack drive a real action's + // fileName from inside vm2 3.11.3's path-stripped sandbox. + fs.writeFileSync( + path.join(projectDir, "workflow_settings.yaml"), + dumpYaml({ + defaultProject: INTEGRATION_TEST_PROJECT, + defaultLocation: INTEGRATION_TEST_LOCATION, + defaultDataset: "dataform", + dataformCoreVersion: "3.0.50" + }) + ); + writeDefinitionFile(projectDir, "example.sqlx", `config { type: "table" }\nSELECT 1 AS id`); + + const npmCacheDir = tmpDirFixture.createNewTmpDir(); + const result = await runCli("compile", [projectDir, "--json"], { + env: { ...process.env, NPM_CONFIG_CACHE: npmCacheDir } + }); + + expect(result.exitCode, `compile failed: ${result.stderr}`).equals(0); + const compiled = JSON.parse(result.stdout); + expect(compiled.tables).to.have.lengthOf(1); + expect(compiled.tables[0].fileName).equals("definitions/example.sqlx"); + }); + + ["package.json", "package-lock.json", "node_modules"].forEach(npmFile => { + test(`compile throws an error when dataformCoreVersion in workflow_settings.yaml and ${npmFile} is present`, async () => { + const projectDir = tmpDirFixture.createNewTmpDir(); + fs.writeFileSync( + path.join(projectDir, "workflow_settings.yaml"), + dumpYaml( + dataform.WorkflowSettings.create({ + defaultProject: "dataform", + dataformCoreVersion: "3.0.0" + }) + ) + ); + const resolvedNpmPath = path.join(projectDir, npmFile); + if (npmFile === "node_modules") { + fs.mkdirSync(resolvedNpmPath); + } else { + fs.writeFileSync(resolvedNpmPath, ""); + } + + expect((await runCli("compile", [projectDir])).stderr).contains( + `${npmFile}' unexpected; remove it and try again` + ); + }); }); }); -}); -suite("disable-assertions flag (compilation)", ({ afterEach, beforeEach }) => { - const tmpDirFixture = new TmpDirFixture(afterEach); - let projectDir: string; + suite("disable-assertions flag (compilation)", ({ afterEach, beforeEach }) => { + const tmpDirFixture = new TmpDirFixture(afterEach); + let projectDir: string; - async function setupTestProject(): Promise { - await setupProject(tmpDirFixture, projectDir); + async function setupTestProject(): Promise { + await setupProject(tmpDirFixture, projectDir); - writeDefinitionFile( - projectDir, - "test_assertion.sqlx", - ` + writeDefinitionFile( + projectDir, + "test_assertion.sqlx", + ` config { type: "assertion" } SELECT 1 WHERE FALSE ` - ); + ); - writeDefinitionFile( - projectDir, - "example_table.sqlx", - ` + writeDefinitionFile( + projectDir, + "example_table.sqlx", + ` config { type: "table", assertions: { @@ -184,258 +177,242 @@ config { } SELECT 1 as id ` - ); - } + ); + } - beforeEach("setup test project", async () => { - projectDir = tmpDirFixture.createNewTmpDir(); - await setupTestProject(); - }); + beforeEach("setup test project", async () => { + projectDir = tmpDirFixture.createNewTmpDir(); + await setupTestProject(); + }); - const expectedCompileResult = { - assertions: [ - { - canonicalTarget: { - database: INTEGRATION_TEST_PROJECT, - name: "dataform_example_table_assertions_uniqueKey_0", - schema: "dataform_assertions" - }, - dependencyTargets: [ - { + const expectedCompileResult = { + assertions: [ + { + canonicalTarget: { + database: INTEGRATION_TEST_PROJECT, + name: "dataform_example_table_assertions_uniqueKey_0", + schema: "dataform_assertions" + }, + dependencyTargets: [ + { + database: INTEGRATION_TEST_PROJECT, + name: "example_table", + schema: "dataform" + } + ], + disabled: true, + fileName: "definitions/example_table.sqlx", + parentAction: { database: INTEGRATION_TEST_PROJECT, name: "example_table", schema: "dataform" + }, + query: `\nSELECT\n *\nFROM (\n SELECT\n id,\n COUNT(1) AS index_row_count\n FROM \`${INTEGRATION_TEST_PROJECT}.dataform.example_table\`\n GROUP BY id\n ) AS data\nWHERE index_row_count > 1\n`, + target: { + database: INTEGRATION_TEST_PROJECT, + name: "dataform_example_table_assertions_uniqueKey_0", + schema: "dataform_assertions" } - ], - disabled: true, - fileName: "definitions/example_table.sqlx", - parentAction: { - database: INTEGRATION_TEST_PROJECT, - name: "example_table", - schema: "dataform" }, - query: - `\nSELECT\n *\nFROM (\n SELECT\n id,\n COUNT(1) AS index_row_count\n FROM \`${INTEGRATION_TEST_PROJECT}.dataform.example_table\`\n GROUP BY id\n ) AS data\nWHERE index_row_count > 1\n`, - target: { - database: INTEGRATION_TEST_PROJECT, - name: "dataform_example_table_assertions_uniqueKey_0", - schema: "dataform_assertions" + { + canonicalTarget: { + database: INTEGRATION_TEST_PROJECT, + name: "test_assertion", + schema: "dataform_assertions" + }, + disabled: true, + fileName: "definitions/test_assertion.sqlx", + query: "\n\nSELECT 1 WHERE FALSE\n", + target: { + database: INTEGRATION_TEST_PROJECT, + name: "test_assertion", + schema: "dataform_assertions" + } } + ], + dataformCoreVersion: version, + graphErrors: {}, + jitData: {}, + projectConfig: { + assertionSchema: "dataform_assertions", + defaultDatabase: INTEGRATION_TEST_PROJECT, + defaultLocation: INTEGRATION_TEST_LOCATION, + defaultSchema: "dataform", + disableAssertions: true, + warehouse: "bigquery" }, - { - canonicalTarget: { + tables: [ + { + canonicalTarget: { + database: INTEGRATION_TEST_PROJECT, + name: "example_table", + schema: "dataform" + }, + disabled: false, + enumType: "TABLE", + fileName: "definitions/example_table.sqlx", + hermeticity: "NON_HERMETIC", + query: "\n\nSELECT 1 as id\n", + target: { + database: INTEGRATION_TEST_PROJECT, + name: "example_table", + schema: "dataform" + }, + type: "table" + } + ], + targets: [ + { database: INTEGRATION_TEST_PROJECT, - name: "test_assertion", + name: "dataform_example_table_assertions_uniqueKey_0", schema: "dataform_assertions" }, - disabled: true, - fileName: "definitions/test_assertion.sqlx", - query: "\n\nSELECT 1 WHERE FALSE\n", - target: { - database: INTEGRATION_TEST_PROJECT, - name: "test_assertion", - schema: "dataform_assertions" - } - } - ], - dataformCoreVersion: version, - graphErrors: {}, - jitData: {}, - projectConfig: { - assertionSchema: "dataform_assertions", - defaultDatabase: INTEGRATION_TEST_PROJECT, - defaultLocation: INTEGRATION_TEST_LOCATION, - defaultSchema: "dataform", - disableAssertions: true, - warehouse: "bigquery" - }, - tables: [ - { - canonicalTarget: { + { database: INTEGRATION_TEST_PROJECT, name: "example_table", schema: "dataform" }, - disabled: false, - enumType: "TABLE", - fileName: "definitions/example_table.sqlx", - hermeticity: "NON_HERMETIC", - query: "\n\nSELECT 1 as id\n", - target: { + { database: INTEGRATION_TEST_PROJECT, - name: "example_table", - schema: "dataform" - }, - type: "table" - } - ], - targets: [ - { - database: INTEGRATION_TEST_PROJECT, - name: "dataform_example_table_assertions_uniqueKey_0", - schema: "dataform_assertions" - }, - { - database: INTEGRATION_TEST_PROJECT, - name: "example_table", - schema: "dataform" - }, - { - database: INTEGRATION_TEST_PROJECT, - name: "test_assertion", - schema: "dataform_assertions" - } - ] - }; + name: "test_assertion", + schema: "dataform_assertions" + } + ] + }; - test("with --disable-assertions flag", async () => { - alterWorkflowSettings(projectDir, { disableAssertions: false }); + test("with --disable-assertions flag", async () => { + alterWorkflowSettings(projectDir, { disableAssertions: false }); - const compileResult = await runCli("compile", [ - projectDir, - "--json", - "--disable-assertions" - ]); + const compileResult = await runCli("compile", [projectDir, "--json", "--disable-assertions"]); - expect(compileResult.exitCode).equals(0); - expect(JSON.parse(compileResult.stdout)).deep.equals(expectedCompileResult); - }); + expect(compileResult.exitCode).equals(0); + expect(JSON.parse(compileResult.stdout)).deep.equals(expectedCompileResult); + }); - test("with disableAssertions set in workflow_settings.yaml", async () => { - alterWorkflowSettings(projectDir, { disableAssertions: true }); + test("with disableAssertions set in workflow_settings.yaml", async () => { + alterWorkflowSettings(projectDir, { disableAssertions: true }); - const compileResult = await runCli("compile", [projectDir, "--json"]); + const compileResult = await runCli("compile", [projectDir, "--json"]); - expect(compileResult.exitCode).equals(0); - expect(JSON.parse(compileResult.stdout)).deep.equals(expectedCompileResult); + expect(compileResult.exitCode).equals(0); + expect(JSON.parse(compileResult.stdout)).deep.equals(expectedCompileResult); + }); }); -}); -suite("compile node selection", ({ afterEach, beforeEach }) => { - const tmpDirFixture = new TmpDirFixture(afterEach); + suite("compile node selection", ({ afterEach, beforeEach }) => { + const tmpDirFixture = new TmpDirFixture(afterEach); - const tableNames = (stdout: string): string[] => - JSON.parse(stdout).tables.map((table: any) => table.target.name).sort(); + const tableNames = (stdout: string): string[] => + JSON.parse(stdout) + .tables.map((table: any) => table.target.name) + .sort(); - let projectDir: string; + let projectDir: string; - beforeEach("setup test project", async () => { - // Builds a project with three tables: upstream -> midstream -> downstream. - projectDir = tmpDirFixture.createNewTmpDir(); - await setupProject(tmpDirFixture, projectDir); + beforeEach("setup test project", async () => { + // Builds a project with three tables: upstream -> midstream -> downstream. + projectDir = tmpDirFixture.createNewTmpDir(); + await setupProject(tmpDirFixture, projectDir); - writeDefinitionFile( - projectDir, - "upstream.sqlx", - `config { type: "table", tags: ["daily"] }\nSELECT 1 AS id` - ); - writeDefinitionFile( - projectDir, - "midstream.sqlx", - `config { type: "table" }\nSELECT * FROM \${ref("upstream")}` - ); - writeDefinitionFile( - projectDir, - "downstream.sqlx", - `config { type: "table" }\nSELECT * FROM \${ref("midstream")}` - ); - }); + writeDefinitionFile( + projectDir, + "upstream.sqlx", + `config { type: "table", tags: ["daily"] }\nSELECT 1 AS id` + ); + writeDefinitionFile( + projectDir, + "midstream.sqlx", + `config { type: "table" }\nSELECT * FROM \${ref("upstream")}` + ); + writeDefinitionFile( + projectDir, + "downstream.sqlx", + `config { type: "table" }\nSELECT * FROM \${ref("midstream")}` + ); + }); - test("no selector emits the entire graph", async () => { - const result = await runCli("compile", [projectDir, "--json"]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals(["downstream", "midstream", "upstream"]); - }); + test("no selector emits the entire graph", async () => { + const result = await runCli("compile", [projectDir, "--json"]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals(["downstream", "midstream", "upstream"]); + }); - test("--output-actions filters output to the selected action", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-actions", - "midstream", - "--json" - ]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals(["midstream"]); - // `targets` is printed alongside the actions, so it must be pruned too. - expect(JSON.parse(result.stdout).targets.map((target: any) => target.name)).deep.equals([ - "midstream" - ]); - }); + test("--output-actions filters output to the selected action", async () => { + const result = await runCli("compile", [ + projectDir, + "--output-actions", + "midstream", + "--json" + ]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals(["midstream"]); + // `targets` is printed alongside the actions, so it must be pruned too. + expect(JSON.parse(result.stdout).targets.map((target: any) => target.name)).deep.equals([ + "midstream" + ]); + }); - test("--output-actions --output-include-deps pulls in upstream dependencies", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-actions", - "midstream", - "--output-include-deps", - "--json" - ]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals(["midstream", "upstream"]); - }); + test("--output-actions --output-include-deps pulls in upstream dependencies", async () => { + const result = await runCli("compile", [ + projectDir, + "--output-actions", + "midstream", + "--output-include-deps", + "--json" + ]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals(["midstream", "upstream"]); + }); - test("--output-actions --output-include-dependents pulls in downstream dependents", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-actions", - "midstream", - "--output-include-dependents", - "--json" - ]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals(["downstream", "midstream"]); - }); + test("--output-actions --output-include-dependents pulls in downstream dependents", async () => { + const result = await runCli("compile", [ + projectDir, + "--output-actions", + "midstream", + "--output-include-dependents", + "--json" + ]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals(["downstream", "midstream"]); + }); - test("--output-tags filters output to actions carrying the tag", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-tags", - "daily", - "--json" - ]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals(["upstream"]); - }); + test("--output-tags filters output to actions carrying the tag", async () => { + const result = await runCli("compile", [projectDir, "--output-tags", "daily", "--json"]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals(["upstream"]); + }); - test("selector matching nothing emits an empty graph and exits zero", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-actions", - "nope", - "--json" - ]); - expect(result.exitCode, result.stderr).equals(0); - expect(tableNames(result.stdout)).deep.equals([]); - }); + test("selector matching nothing emits an empty graph and exits zero", async () => { + const result = await runCli("compile", [projectDir, "--output-actions", "nope", "--json"]); + expect(result.exitCode, result.stderr).equals(0); + expect(tableNames(result.stdout)).deep.equals([]); + }); - test("--output-include-deps without a selector is rejected", async () => { - const result = await runCli("compile", [ - projectDir, - "--output-include-deps", - "--json" - ]); - expect(result.exitCode).not.equals(0); - expect(result.stderr).contains("--output-include-deps"); + test("--output-include-deps without a selector is rejected", async () => { + const result = await runCli("compile", [projectDir, "--output-include-deps", "--json"]); + expect(result.exitCode).not.equals(0); + expect(result.stderr).contains("--output-include-deps"); + }); }); -}); -suite("extension config", ({ afterEach }) => { - const tmpDirFixture = new TmpDirFixture(afterEach); - - test("compile succeeds with extension set in workflow_settings.yaml", async () => { - const projectDir = tmpDirFixture.createNewTmpDir(); - await setupProject(tmpDirFixture, projectDir, { - defaultDataset: "dataform", - defaultAssertionDataset: "dataform_assertions", - extension: { - name: "test-extension", - compilationMode: dataform.ExtensionCompilationMode.PROLOGUE - } - }); + suite("extension config", ({ afterEach }) => { + const tmpDirFixture = new TmpDirFixture(afterEach); + + test("compile succeeds with extension set in workflow_settings.yaml", async () => { + const projectDir = tmpDirFixture.createNewTmpDir(); + await setupProject(tmpDirFixture, projectDir, { + defaultDataset: "dataform", + defaultAssertionDataset: "dataform_assertions", + extension: { + name: "test-extension", + compilationMode: dataform.ExtensionCompilationMode.PROLOGUE + } + }); - const compileResult = await runCli("compile", [projectDir]); + const compileResult = await runCli("compile", [projectDir]); - expect(compileResult.exitCode).equals(0); - expect(compileResult.stdout).contains("Compiled 0 action(s)."); + expect(compileResult.exitCode).equals(0); + expect(compileResult.stdout).contains("Compiled 0 action(s)."); + }); }); });