From 12d4af496708f0850a3260769482eb5661b48a27 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Mon, 3 Jun 2024 18:15:08 +0200 Subject: [PATCH] feat(fixture): Allow cjs/mjs and cts/mts --- .../src/__tests__/fixtures/tsconfig.json | 6 +++++- compiler/packages/snap/src/fixture-utils.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json index 20780aa365526..07d6d2baae402 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json @@ -23,8 +23,12 @@ }, "include": [ "./compiler/**/*.js", - "./compiler/**/*.jsx", + "./compiler/**/*.mjs", + "./compiler/**/*.cjs", "./compiler/**/*.ts", + "./compiler/**/*.mts", + "./compiler/**/*.cts", + "./compiler/**/*.jsx", "./compiler/**/*.tsx" ] } diff --git a/compiler/packages/snap/src/fixture-utils.ts b/compiler/packages/snap/src/fixture-utils.ts index 39979eb8515fa..9d3af50b4b2c4 100644 --- a/compiler/packages/snap/src/fixture-utils.ts +++ b/compiler/packages/snap/src/fixture-utils.ts @@ -10,7 +10,7 @@ import * as glob from "glob"; import path from "path"; import { FILTER_PATH, FIXTURES_PATH, SNAPSHOT_EXTENSION } from "./constants"; -const INPUT_EXTENSIONS = [".js", ".ts", ".jsx", ".tsx"]; +const INPUT_EXTENSIONS = [".js", ".cjs", ".mjs", ".ts", ".cts", ".mts", ".jsx", ".tsx"]; export type TestFilter = { debug: boolean;