2021-03-09 11:12:25 +00:00
|
|
|
const getTheTitles = require('./getTheTitles')
|
2019-04-11 16:37:33 +00:00
|
|
|
|
2021-03-09 11:12:25 +00:00
|
|
|
describe('getTheTitles', () => {
|
2019-04-11 16:37:33 +00:00
|
|
|
const books = [
|
|
|
|
{
|
|
|
|
title: 'Book',
|
|
|
|
author: 'Name'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Book2',
|
|
|
|
author: 'Name2'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2021-03-09 11:12:25 +00:00
|
|
|
test('gets titles', () => {
|
2021-04-30 10:12:52 +00:00
|
|
|
expect(getTheTitles(books)).toEqual(['Book','Book2']);
|
2019-04-11 16:37:33 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|