Skip to content

Commit

Permalink
trying to fix jest issues
Browse files Browse the repository at this point in the history
  • Loading branch information
joshreisner committed Oct 10, 2024
1 parent b32e2f4 commit 1648a8f
Show file tree
Hide file tree
Showing 7 changed files with 1,511 additions and 195 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ interface TSMLReactConfig {
weekdays: string[];
}

declare var tsml_react_config: TSMLReactConfig | undefined;
declare const tsml_react_config: TSMLReactConfig | undefined;

//google analytics globals
declare var gtag:
declare const gtag:
| ((
type: 'event',
action: string,
Expand All @@ -65,7 +65,7 @@ declare var gtag:
) => void)
| undefined;

declare var ga:
declare const ga:
| ((
type: 'send',
params: {
Expand Down
14 changes: 0 additions & 14 deletions jest.config.js

This file was deleted.

19 changes: 19 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
// process `*.tsx` files with `ts-jest`
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
collectCoverageFrom: [
'<rootDir>/src/**/*.(j|t)s*',
'!<rootDir>/src/(types|i18n)/*',
'!<rootDir>/**/__snapshots__/*',
'!<rootDir>/src/**/index.ts',
],
moduleNameMapper: {
'\\.(css)$': '<rootDir>/test/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
},
};
File renamed without changes.
Loading

0 comments on commit 1648a8f

Please sign in to comment.