Created
December 6, 2018 12:48
-
-
Save vidit0210/faba73aca3b260740cc840720edab48c to your computer and use it in GitHub Desktop.
Mocha testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Car{ | |
| park(){ | |
| return "stopped"; | |
| } | |
| drive(){ | |
| return "Vroom"; | |
| } | |
| } | |
| let car ; | |
| //Runs before it statements | |
| beforeEach(()=>{ | |
| car = new Car(); | |
| }) | |
| describe('Car Describe :',()=>{ | |
| it('Park test',()=>{ | |
| // const car = new Car(); | |
| assert.equal(car.park(),"stopped"); | |
| }); | |
| it ('Can Drive',()=>{ | |
| //const car = new Car(); | |
| assert.equal(car.drive(),'Vroom'); | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment