Files
odin-javascript-exercises/11_getTheTitles/getTheTitles.spec.js
T

19 lines
334 B
JavaScript
Raw Normal View History

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