odin-javascript-exercises/getTheTitles/getTheTitles.spec.js

20 lines
321 B
JavaScript
Raw Normal View History

2019-04-11 10:14:20 -07:00
let getTheTitles = require('./getTheTitles')
describe('getTheTitles', function() {
const books = [
{
title: 'Book',
author: 'Name'
},
{
title: 'Book2',
author: 'Name2'
}
]
it('gets titles', function() {
expect(getTheTitles(books)).toEqual(['Book','Book2']);
});
});