Skip to content

Instantly share code, notes, and snippets.

@vidit0210
Created December 6, 2018 12:48
Show Gist options
  • Select an option

  • Save vidit0210/faba73aca3b260740cc840720edab48c to your computer and use it in GitHub Desktop.

Select an option

Save vidit0210/faba73aca3b260740cc840720edab48c to your computer and use it in GitHub Desktop.
Mocha testing
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