Created
March 27, 2018 10:00
-
-
Save haingdc/8acde2659aff67b0dd39a7a103d0142e to your computer and use it in GitHub Desktop.
get start with 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
// flickr-fetcher-spec.js | |
describe('#transformPhotoObj()', function() { | |
it('should take a photo object and return an object with just title and URL', function() { | |
var input = { | |
id: '25373736106', | |
owner: '99117316@N03', | |
secret: '146731fcb7', | |
server: '1669', | |
farm: 2, | |
title: 'Dog goes to desperate measure to avoid walking on a leash', | |
ispublic: 1, | |
isfriend: 0, | |
isfamily: 0 | |
}, | |
expected = { | |
title: 'Dog goes to desperate measure to avoid walking on a leash', | |
url: 'https://farm2.staticflickr.com/1669/25373736106_146731fcb7_b.jpg' | |
}, | |
actual = FlickrFetcher.transformPhotoObj(input); | |
expect(actual).to.eql(expected); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment