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

Initial Vue SFC unit test patterns #89

Merged
merged 4 commits into from
Jun 14, 2023
Merged

Initial Vue SFC unit test patterns #89

merged 4 commits into from
Jun 14, 2023

Conversation

kamorel
Copy link
Contributor

@kamorel kamorel commented Jun 8, 2023

Description

Adds a few small SFC tests to show how to correctly mount components with proper plugins and initial store states, access various parts of the DOM, and router mocking and testing.

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@kamorel kamorel requested review from jujaga and TimCsaky as code owners June 8, 2023 18:58
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Coverage Report (Application)

Totals Coverage
Statements: 75% ( 51 / 68 )
Methods: 62.5% ( 5 / 8 )
Lines: 82.61% ( 38 / 46 )
Branches: 57.14% ( 8 / 14 )

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

Coverage Report (Frontend)

Totals Coverage
Statements: 42.81% ( 426 / 995 )
Methods: 42.31% ( 99 / 234 )
Lines: 50.59% ( 298 / 589 )
Branches: 16.86% ( 29 / 172 )

Copy link
Member

@jujaga jujaga left a comment

Choose a reason for hiding this comment

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

From what I can gather I think this looks good. Please do one pass through to make sure that the it callback body functions do not have async on them unless they're absolutely needed; most of them do not have an explicit await statement in them, leading me to believe that most of these can be declared synchronously instead. Tentatively approving. 👍

@jujaga jujaga merged commit e5de016 into master Jun 14, 2023
@jujaga jujaga deleted the tests/poc branch June 14, 2023 17:52
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