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

19 lines
334 B
JavaScript
Raw Normal View History

const getTheTitles = require('./getTheTitles')
2019-04-11 09:37:33 -07:00
describe('getTheTitles', () => {
2019-04-11 09:37:33 -07:00
const books = [
{
title: 'Book',
author: 'Name'
},
{
title: 'Book2',
author: 'Name2'
}
]
test('gets titles', () => {
2019-04-11 09:37:33 -07:00
expect(getTheTitles(books)).toEqual(['Book','Book2']);
});
});