-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PADV-1475 test: Creating test for shared componets and helper functions. #19
Conversation
398cbf5
to
161a544
Compare
import { logError } from '@edx/frontend-platform/logging'; | ||
import LabSummary from '../index'; | ||
import '@testing-library/jest-dom'; | ||
import { columns } from '../columns'; | ||
import { formatUnixTimestamp } from '../../../helpers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { logError } from '@edx/frontend-platform/logging'; | |
import LabSummary from '../index'; | |
import '@testing-library/jest-dom'; | |
import { columns } from '../columns'; | |
import { formatUnixTimestamp } from '../../../helpers'; | |
import { logError } from '@edx/frontend-platform/logging'; | |
import '@testing-library/jest-dom'; | |
import LabSummary from '../index'; | |
import { columns } from '../columns'; | |
import { formatUnixTimestamp } from '../../../helpers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nandodev-net You have a lot of unnecessary inline comments, even in Spanish. |
@JuanDavidBuitrago Sure, but given so many tests of that tool that I don't know well, for me they were very useful. Now that I know the approach makes sense, I clean them |
jest.config.js
Outdated
// Your existing Jest configuration options | ||
moduleNameMapper: { | ||
'^views/(.*)$': '<rootDir>/src/views/$1', | ||
'^shared/(.*)$': '<rootDir>/src/shared/$1', | ||
'^constants/(.*)$': '<rootDir>/src/constants/$1', | ||
// Add more mappings as needed | ||
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', // Mock CSS modules | ||
'\\.(svg|png|jpg|jpeg|gif)$': '<rootDir>/__mocks__/fileMock.js', // Mock files like images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These inline comments are necessaries? @nandodev-net
f9264fd
to
692c084
Compare
Tickets
Description
This PR aims to improve and finalize the test coverage for the core application components and helper functions. It includes comprehensive test suites for the following components:
ClassRoster:
LabSummary:
LabDetails:
Helpers/Index.js: Covers all utility functions and ensures their expected behavior across different scenarios.
Changes Made
This PR targets increasing the test coverage for the critical parts of the application, particularly focusing on routing, main view functionality, and helper functions. Expected coverage:
How To Test
npm i
in your MFE folder.npm test -- --verbose
Verify that all tests pass and that coverage reports indicate the coverage for the targeted files.
Component Tests
Helpers
Views
ClassRoster
LabSummary
LabDetails
Core