Skip to content
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

chore(test): add tests for react components #231

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

FranceBe
Copy link
Contributor

@FranceBe FranceBe commented Mar 6, 2024

Add test script & configuration for adding unit test on react components (Blocks feature)

Copy link

sonarcloud bot commented Mar 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need this plugin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we don't need this because it's for Vite

import {render, screen} from '@testing-library/react'
describe('InstallmentsTotal', () => {
it('should display the right total amount', () => {
render(<IntlProvider locale={"fr"}><InstallmentsTotal totalAmount={1000}/></IntlProvider>)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a warning about missing translations in the test's console that we need to check

@FranceBe FranceBe force-pushed the feature/ECOM-1383/poc-woocommerce-blocks branch from dea31e7 to 5b57d11 Compare March 28, 2024 11:42
Base automatically changed from feature/ECOM-1383/poc-woocommerce-blocks to develop April 25, 2024 08:04
@Francois-Gomis
Copy link
Collaborator

@FranceBe can you Delete this PR and Branche ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants