Last active
April 10, 2018 02:59
-
-
Save haingdc/9a04de655ddd5c8ed803e0013a927781 to your computer and use it in GitHub Desktop.
Thao tác với DOM thông qua TDD
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
// photo-lister-spec.js | |
describe("#photoToListItem()", function() { | |
it("should take a photo object and return a list item string", function() { | |
var input = { | |
title: "This is a test", | |
url: "http://loremflickr.com/960/593", | |
}, | |
expected = | |
'<li><figure><img src="http://loremflickr.com/960/593" alt=""/>' + | |
"<figcaption>This is a test</figcaption></figure></li>"; | |
expect(PhotoLister.photoToListItem(input)).to.equal(expected); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment