https://github.com/tkraak/intro-unit-test
:circus_tent: Workshop: Intro to unit testing with AVA
https://github.com/tkraak/intro-unit-test
ava javascript learn testing unit-test unit-testing
Last synced: 3 months ago
JSON representation
:circus_tent: Workshop: Intro to unit testing with AVA
- Host: GitHub
- URL: https://github.com/tkraak/intro-unit-test
- Owner: tkraak
- Created: 2017-09-19T12:43:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:46:16.000Z (over 2 years ago)
- Last Synced: 2025-04-01T19:09:21.872Z (3 months ago)
- Topics: ava, javascript, learn, testing, unit-test, unit-testing
- Language: JavaScript
- Homepage:
- Size: 875 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Introduction to writing unit tests with AVA
This repository serves as a gentle introduction to writing JavaScript [unit](https://dev.to/jackmarchant/no-excuses-write-unit-tests) tests with [AVA](https://github.com/avajs/ava).
The `getAmount()` function and the motivation to refactor it were taken from NodeSchool's [JavaScript Best Practices workshop](https://github.com/excellalabs/js-best-practices-workshopper).
The `orderTotal()` function was taken from the [Fun Fun Function](https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q) video series on [Unit Tesing in JavaScript](https://www.youtube.com/playlist?list=PL0zVEGEvSaeF_zoW9o66wa_UCNE3a7BEr). Thanks @mpj!
## Getting started
- fork and clone this repo
- `npm install` or `yarn install`
- `npm test` to lint with [standard](https://standardjs.com) and run the tests with [AVA](https://github.com/avajs/ava)
- `npm run lint` to lint only
- happy learning ... pull requests welcome!