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

Add test suite using Vitest #21

Open
lucas-varela opened this issue Oct 5, 2023 · 0 comments · May be fixed by #25
Open

Add test suite using Vitest #21

lucas-varela opened this issue Oct 5, 2023 · 0 comments · May be fixed by #25
Assignees
Labels
enhancement New feature or request

Comments

@lucas-varela
Copy link
Contributor

Description

Like the JS SDK, we need to implement tests to validate our components. However, unlike the JS SDK, the React SDK doesn't make any requests, but exports React components instead.

With this in mind, we need to implement snapshot tests to verify if our components render correctly.

Requirements

  • Create a new branch off main called feature/tests.
    • The DynamicForm component branch won't be merged until we finish this task. This means that you won't write tests for the form component in this task.
  • Install and configure Vitest.
    • Read the docs on how to install Vitest on a new project.
    • Feel free to copy JS SDK's configuration file (vitest.config.js).
    • The React SDK doesn't make any requests, which means that we don't need to install MSW.
  • Implement test cases for both React components exported by the SDK:
    • VisualContent
    • ResponsiveImage

Additional info

@lucas-varela lucas-varela added the enhancement New feature or request label Oct 5, 2023
@RubensDiniz RubensDiniz linked a pull request Nov 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants