Last active
August 17, 2016 18:58
-
-
Save zuhrig/02070944b3a2bd13d8d849164f8bec92 to your computer and use it in GitHub Desktop.
explicacion jasmine
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
/** | |
* 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