From a443e2c4b5fcb20c652a3dfc1c5cf572ddf95ca1 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Tue, 10 Mar 2026 10:44:12 -0400 Subject: [PATCH] Sort snapshot files --- tests/helpers/utils.ts | 2 +- tests/smoke-tests/--typescript.test.ts | 52 +++++++++++++------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/helpers/utils.ts b/tests/helpers/utils.ts index 6322f79..89fa619 100644 --- a/tests/helpers/utils.ts +++ b/tests/helpers/utils.ts @@ -111,7 +111,7 @@ export async function filesMatching(glob: string, dirPath: string) { try { let files = await globby(glob, { cwd: dirPath }); - return files; + return files.sort(); } catch (e) { console.error('error', e); diff --git a/tests/smoke-tests/--typescript.test.ts b/tests/smoke-tests/--typescript.test.ts index 6bfc500..40af50a 100644 --- a/tests/smoke-tests/--typescript.test.ts +++ b/tests/smoke-tests/--typescript.test.ts @@ -96,13 +96,13 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { `ensure we don't pollute the src dir with declarations and emit the js and .d.ts to the correct folders -- this should be the same as the input files (no change from the fixture + default files)`, ).toMatchInlineSnapshot(` [ + "src/components/another-gts.gts", + "src/components/template-import.gts", "src/index.ts", "src/lint-test-gts.gts", "src/lint-test-ts.ts", - "src/template-registry.ts", - "src/components/another-gts.gts", - "src/components/template-import.gts", "src/services/example.ts", + "src/template-registry.ts", ] `); @@ -111,37 +111,37 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { `ensure we emit the correct files out of the box to the correct folders`, ).toMatchInlineSnapshot(` [ - "dist/index.js", - "dist/index.js.map", - "dist/lint-test-gts.js", - "dist/lint-test-gts.js.map", - "dist/lint-test-ts.js", - "dist/lint-test-ts.js.map", - "dist/template-registry.js", - "dist/template-registry.js.map", - "dist/components/another-gts.js", - "dist/components/another-gts.js.map", - "dist/components/template-import.js", - "dist/components/template-import.js.map", - "dist/services/example.js", - "dist/services/example.js.map", - "dist/_app_/components/another-gts.js", - "dist/_app_/components/template-import.js", - "dist/_app_/services/example.js", + "declarations/components/another-gts.d.ts", + "declarations/components/another-gts.d.ts.map", + "declarations/components/template-import.d.ts", + "declarations/components/template-import.d.ts.map", "declarations/index.d.ts", "declarations/index.d.ts.map", "declarations/lint-test-gts.d.ts", "declarations/lint-test-gts.d.ts.map", "declarations/lint-test-ts.d.ts", "declarations/lint-test-ts.d.ts.map", - "declarations/template-registry.d.ts", - "declarations/template-registry.d.ts.map", - "declarations/components/another-gts.d.ts", - "declarations/components/another-gts.d.ts.map", - "declarations/components/template-import.d.ts", - "declarations/components/template-import.d.ts.map", "declarations/services/example.d.ts", "declarations/services/example.d.ts.map", + "declarations/template-registry.d.ts", + "declarations/template-registry.d.ts.map", + "dist/_app_/components/another-gts.js", + "dist/_app_/components/template-import.js", + "dist/_app_/services/example.js", + "dist/components/another-gts.js", + "dist/components/another-gts.js.map", + "dist/components/template-import.js", + "dist/components/template-import.js.map", + "dist/index.js", + "dist/index.js.map", + "dist/lint-test-gts.js", + "dist/lint-test-gts.js.map", + "dist/lint-test-ts.js", + "dist/lint-test-ts.js.map", + "dist/services/example.js", + "dist/services/example.js.map", + "dist/template-registry.js", + "dist/template-registry.js.map", ] `); });