Jasmine
1. What is the Jasmine?
- Jasmine is a behavior-driven testing framework for Javascript
- Jasmine is an automated testing framework
2. How to get
- There are two ways to get a jasmine
1) download zip
- https://github.com/jasmine/jasmine/releases
2) npm
2_0. install
# Local installation:
npm install --save-dev jasmine
# Global installation
npm install -g jasmine
2_1. Init
- jasmine init
- jasmine examples
2_2. Usage
- jasmine
3. Usage
3_0. Src
3_1. Spec
1) suite
- describe("Hello.....) What we call a suite
- This is basically a component of your application
- This suite is called "Hello World"
2) spec
- it()
- This is called a spec
- For each suite, you can have a bajillion specs for the bajillion tests you want to do
3) matcher
- We're testing if helloworld() does equal "Hello world".
- This check is called a matcher
- I can also make my own matcher
3_2. SpecRunner
1) SpecRunner.html
2) view
'Tools > jasmine' 카테고리의 다른 글
[Jasmine] Spies (0) | 2016.07.29 |
---|---|
[Jasmine] Matcher (0) | 2016.07.29 |