Skip to content

Instantly share code, notes, and snippets.

@goldbergyoni
Created December 26, 2018 13:55
Show Gist options
  • Select an option

  • Save goldbergyoni/625f647aa9442204c8c1b7f8ff4157f1 to your computer and use it in GitHub Desktop.

Select an option

Save goldbergyoni/625f647aa9442204c8c1b7f8ff4157f1 to your computer and use it in GitHub Desktop.
Test name constitutes 3 parts
//1. unit under test
describe('Products Service', function() {
describe('Add new product', function() {
//2. scenario and 3. expectation
it('When no price is specified, then the product status is pending approval', ()=> {
const newProduct = new ProductService().add(...);
expect(newProduct.status).to.equal('pendingApproval');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment