Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 9 days 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:46:16.000Z (almost 2 years ago)
- Last Synced: 2024-12-17T02:51:48.699Z (11 days ago)
- Topics: ava, javascript, learn, testing, unit-test, unit-testing
- Language: JavaScript
- Homepage:
- Size: 875 KB
- Stars: 1
- Watchers: 1
- 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!