Skip to content

Commit

Permalink
fix: frontend test
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Jul 13, 2024
1 parent c5373df commit 34118c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/web/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import type { Config } from '@jest/types';

const config: Config.InitialOptions = {
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
detectOpenHandles: true,
forceExit: true,
logHeapUsage: true,
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/tests/mocks/styleMock.js',
'^.+\\.(jpg|jpeg|png|gif|webp|avif|svg)$': '<rootDir>/tests/mocks/fileMock.js',
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "next dev --port 7500",
"lint": "next lint",
"start": "next start",
"test": "dotenv -e .env.test -- jest --logHeapUsage"
"test": "dotenv -e .env.test -- jest"
},
"dependencies": {
"@apollo/client": "3.10.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { NewsletterForm } from './newsletter-form';

jest.mock('next/router', () => require('next-router-mock'));

// TODO - to be refactored soon
// eslint-disable-next-line jest/no-disabled-tests
describe('Newsletter Form', () => {
beforeEach(() => {
// IntersectionObserver isn't available in test environment
Expand Down

0 comments on commit 34118c0

Please sign in to comment.