Skip to content

Instantly share code, notes, and snippets.

@zuhrig
Last active August 17, 2016 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuhrig/02070944b3a2bd13d8d849164f8bec92 to your computer and use it in GitHub Desktop.
Save zuhrig/02070944b3a2bd13d8d849164f8bec92 to your computer and use it in GitHub Desktop.
explicacion jasmine
/**
* Describe suite -> inicio
* * pre-condiciones -> hook(before)
* * * test-A -> it
* * * * asserts -> expect
* * * test-B -> it
* * * * asserts -> expect
* * post-condiciones -> hook(after)
* Describe suite -> fin
**/
describe('QUE-VOY-A-TESTEAR', function() {
/**
* pre-condiciones -> hook(before)
*/
beforeEach(function() {
// haz algo antes de cada test
});
beforeAll(function() {
// haz algo antes del primer test
});
// DEBERIA HACER TAL COSA it("should do something")
it("test-A", function() {
expect(true).toBe(true);
});
it("test-B", function() {
expect(true).not.toBe(false);
});
/* *
* post-condiciones -> hook(after)
*/
afterEach(function() {
// haz algo cuando finalice cada test
});
afterAll(function() {
// haz algo cuando finalice todos los tests
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment