Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit ccd4b96

Browse files
committed
fixed
1 parent 5e07643 commit ccd4b96

3 files changed

Lines changed: 26 additions & 3 deletions

File tree

jest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
preset: 'react-scripts',
3+
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
4+
moduleNameMapper: {
5+
'^dld-books$': '<rootDir>/src/__mocks__/dld-books.js'
6+
},
7+
transformIgnorePatterns: [
8+
'node_modules/(?!dld-books)'
9+
],
10+
moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'],
11+
testEnvironment: 'jsdom'
12+
};

src/App.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { render, screen } from '@testing-library/react';
22
import App from './App';
33

4-
test('renders learn react link', () => {
4+
test('renders Boolforge application', () => {
55
render(<App />);
6-
const linkElement = screen.getByText(/learn react/i);
7-
expect(linkElement).toBeInTheDocument();
6+
const titleElement = screen.getByRole('heading', { name: /boolforge/i });
7+
expect(titleElement).toBeInTheDocument();
88
});

src/__mocks__/dld-books.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Mock for dld-books module to handle ES6 exports in Jest
2+
export const logic_and_computer_design_fundamental = {
3+
// Mock data structure - you can add actual mock data here if needed
4+
problems: [],
5+
solutions: []
6+
};
7+
8+
// Add any other exports that might be used from dld-books
9+
export const mockDefault = {
10+
logic_and_computer_design_fundamental
11+
};

0 commit comments

Comments
 (0)