Research and Provide a Demo of Unit Testing for front-end JavaScript code
- Dominant language
- JavaScript
- Stars
- 363
- Forks
- 872
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 18
Description
### Overview
We need to select a strategy and a test framework for running unit tests against the front-end JavaScript code in the HfLA website, so that tests can be run first locally and then ultimately as a Pull Request check, in order to ensure the quality of JavaScript code updates. In this issue several sample unit tests will be developed and will be run locally from the command line.
### Action Items
- [x] Select one of the following JS test frameworks: Jest, Mocha and Jasmine. Consider:
- [ ] widely-used JS test framework suitable for invoking tests against JavaScript code on a Jekyll site
- [ ] Ideally tests could be run either locally or in the context of GitHub PR checkes
- [ ] Provide comments documenting the selection, installation and configuration of the test framework
- [ ] In a new git branch, create a folder under the website root named `unittests-JSfrontend`
- [ ] In the new folder create several unit tests. Provide comments describing your reasoning for selection of unit tests.
- [ ] Invoke the tests from the command line
- [ ] provide comments documenting the commands for running the tests
- [ ] Submit a pull request, and provide links to the relevant comments that will be useful for reviewers.
### Resources/Instructions
https://jasmine.github.io/
[How to Test a GitHub Action with GitHub Actions]
- This issue is a follow-up to #2249
Contributor guide
Assessment
This issue has not been assessed yet.