Created
June 17, 2018 21:20
-
-
Save kcmr/ae62dd068faf60b79e7fc79bdf15e98d to your computer and use it in GitHub Desktop.
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('<my-modal>', () => { | |
// context es un alias de describe | |
context('setting "opened" as true', () => { | |
// fixture instancia el componente | |
const sut = fixture('someId'); | |
// Se ejecuta una vez antes de todos los tests de este bloque | |
before(() => { | |
sut.opened = true; | |
}); | |
it('opens the modal', () => { | |
expect(isVisible(sut)).to.be.true; | |
}); | |
it('sets "aria-hidden" attribute to false', () => { | |
expect(sut.getAttribute('aria-hidden')).to.equal('false'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment