Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created July 26, 2019 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/d333e53f79e4ab697042fb013c2b4c6a to your computer and use it in GitHub Desktop.
Save jasongorman/d333e53f79e4ab697042fb013c2b4c6a to your computer and use it in GitHub Desktop.
describe('catalogue contains matching CD', function(){
it('finds the CD that matches title and artist ' +
'when matching CD is only contents', function(){
const title = 'Empath', artist = 'Devin Townsend';
const cd = new CD(9.99, 1, title, artist);
const catalogue = new Catalogue(contents=[cd]);
assert.strictEqual(catalogue.search(title, artist), cd);
})
it('finds the CD that matches title and artist ' +
'when matching CD is one of multiple contents', function(){
const title = 'Empath', artist = 'Devin Townsend';
const cd = new CD(9.99, 1, title, artist);
const catalogue = new Catalogue(contents=[new CD(0,0,'',''), cd]);
assert.strictEqual(catalogue.search(title, artist), cd);
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment