Created
June 25, 2018 18:29
-
-
Save stalniy/81222d2596a74c44cfe34eb91bfe8b25 to your computer and use it in GitHub Desktop.
Lazy vars shared examples
This file contains 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
sharedExamplesFor('Collection', function() { | |
it('is empty by default', function() { | |
expect($subject).to.be.empty; | |
}); | |
it('increments "length" property when adds a new item', function() { | |
$subject.add(1, 2, 3); | |
expect($subject).to.have.length(3); | |
}); | |
it('can remove item', function() { | |
$subject.add(1, 2); | |
$subject.remove(2); | |
expect($subject).not.to.contain(2); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment