Skip to content

Commit be06d2a

Browse files
author
dedicatedbroadcastsolutions
committed
tests: add .js extensions & include jest types in tsconfigs to fix typecheck
1 parent 237b4d3 commit be06d2a

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

apps/app/src/__tests__/timeLib.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { formatDurationLabeled } from '../lib/timeLib'
1+
import { formatDurationLabeled } from '../lib/timeLib.js'
22

33
describe('timeLib.formatDurationLabeled', () => {
44
test('formats seconds and ms correctly', () => {

apps/app/tsconfig.build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"outDir": "dist",
66
"jsx": "react",
77
"lib": ["DOM"],
8-
"baseUrl": "./"
8+
"baseUrl": "./",
9+
"types": ["jest"]
910
},
1011
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.mts", "src/**/*.test.ts"],
1112
"exclude": ["dist/**/*"],

shared/packages/tsr-bridge/src/sideload/__tests__/helpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseCasparFramerate, durationFromFrames, frameTimeFromFrames } from '../helpers'
1+
import { parseCasparFramerate, durationFromFrames, frameTimeFromFrames } from '../helpers.js'
22

33
describe('CasparCG helpers', () => {
44
test('parse simple fps', () => {

shared/packages/tsr-bridge/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
44
"rootDir": "src",
5-
"outDir": "dist"
5+
"outDir": "dist",
6+
"types": ["jest"]
67
},
78
"include": ["src/**/*.ts", "src/**/*.test.ts"],
89
"exclude": ["dist/**/*"],

0 commit comments

Comments
 (0)