From ca447d3007b091c4b45d8509f9a9064942a93f2d Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 17 Apr 2023 04:12:04 -0400 Subject: [PATCH] Update Jest testing to include Typescript (#24555) --- .github/workflows/test-js.yml | 4 ++++ jest.config.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 6a1cacb3f..1c4958550 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -9,6 +9,8 @@ on: - '.nvmrc' - '**/*.js' - '**/*.jsx' + - '**/*.ts' + - '**/*.tsx' - '**/*.snap' - '.github/workflows/test-js.yml' @@ -19,6 +21,8 @@ on: - '.nvmrc' - '**/*.js' - '**/*.jsx' + - '**/*.ts' + - '**/*.tsx' - '**/*.snap' - '.github/workflows/test-js.yml' diff --git a/jest.config.js b/jest.config.js index 69222ea35..f447cf285 100644 --- a/jest.config.js +++ b/jest.config.js @@ -12,7 +12,7 @@ const config = { setupFiles: ['raf/polyfill'], setupFilesAfterEnv: ['/app/javascript/mastodon/test_setup.js'], collectCoverageFrom: [ - 'app/javascript/mastodon/**/*.js', + 'app/javascript/mastodon/**/*.{js,jsx,ts,tsx}', '!app/javascript/mastodon/features/emoji/emoji_compressed.js', '!app/javascript/mastodon/locales/locale-data/*.js', '!app/javascript/mastodon/service_worker/entry.js',