Unit test frontend code

Open
#2,673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
javascript
Domain
frontend, testing

Research direction

The issue names no files, tests, or frontend entry points. Start by locating the frontend JavaScript and development setup instructions, then determine the testing framework and package configuration needed; done means frontend unit tests run through the documented development setup.

Written by the indexing model from the issue text.

Description

feature

Feature request

Cover frontend JavaScript with unit testing.

Summary

While the Ruby backend core is fully covered by Minitest unit tests, the JavaScript frontend has no testing framework in place. This certainly encouraged past regressions and will continue to do so. It also omits a layer of expected behavior documentation.

Short of committing test framework packages to the repo, this would involve introducing a package.json file solely for dev dependencies. A dependency install step in dev setup instructions would need to be added.

(As an unrelated followup: with this in place, consider migrating vendor dependencies to this file.)

Dominant language
Ruby
Stars
39.5k
Forks
2.6k
Avg merge
4d 32m
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freeCodeCamp/devdocs

All issues in freeCodeCamp/devdocs

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.