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

feat: Add vitest configuration and unit tests for index page #680

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

gitoak
Copy link
Contributor

@gitoak gitoak commented Oct 11, 2024

This commit adds the vitest configuration file (vitest.config.ts) and unit tests for the index page (pages/index.spec.ts). The vitest configuration sets up the test environment for Nuxt and specifies the use of JSDOM as the DOM environment. The unit tests for the index page ensure that it renders correctly and contains the expected content.

The following files were added or modified:

  • vitest.config.ts
  • pages/index.spec.ts
  • test/setup.ts
  • package.json (added test:unit and test:unit:watch scripts)

Pull request

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Did you lint your code locally before submission?
  2. Did you test your feature thoroughly to ensure there are no bugs?
  3. Does your feature introduce breaking changes?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Please describe your changes

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  • Describe what your code exactly does and if it affects any other part of the code in any way (especially check for breaking changes)

Additional context

This commit adds the vitest configuration file (vitest.config.ts) and unit tests for the index page (pages/index.spec.ts). The vitest configuration sets up the test environment for Nuxt and specifies the use of JSDOM as the DOM environment. The unit tests for the index page ensure that it renders correctly and contains the expected content.

The following files were added or modified:
- vitest.config.ts
- pages/index.spec.ts
- test/setup.ts
- package.json (added test:unit and test:unit:watch scripts)
@trobonox trobonox merged commit 357c08e into kanriapp:main Oct 11, 2024
3 of 4 checks passed
@gitoak gitoak deleted the unit-test-setup branch October 11, 2024 10:22
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.

2 participants