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 proper test coverage #19

Open
mkrl opened this issue Oct 16, 2021 · 0 comments
Open

Add proper test coverage #19

mkrl opened this issue Oct 16, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mkrl
Copy link
Owner

mkrl commented Oct 16, 2021

Is your feature request related to a problem? Please describe.

Every good piece of software has tests. We don't and it's a good chance to have them added.

Describe the solution you'd like

We could start with simple unit tests with the DOM API and terminal instance mocked.
Assert DOM changes being made under different edge cases & conditions. Assert correct instance fields have been mutated & modified. Assert keyboard events performing what they should perform under different conditions, etc.

Additional context

Vitest should be used as a test runner since we're already on Vite.
Here's a checklist:

  1. Write minimal tests covering everything in src/api
  2. Create an npm test script
  3. Hook up into the test GH action workflow (after "Typecheck")

- name: Typecheck
run: npm run typecheck

Not a very trivial task, but we could start a discussion here and work on adding tests together.

@mkrl mkrl added enhancement New feature or request help wanted Extra attention is needed hacktoberfest For all the Hacktoberfest participants! labels Oct 16, 2021
@mkrl mkrl changed the title Add proper test Add proper test coverage Oct 16, 2021
@mkrl mkrl removed the hacktoberfest For all the Hacktoberfest participants! label Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant