odin-javascript-exercises/getTheTitles/getTheTitles.spec.js
2021-03-10 00:12:25 +13:00

19 lines
332 B
JavaScript

const getTheTitles = require('./getTheTitles')
describe('getTheTitles', () => {
const books = [
{
title: 'Book',
author: 'Name'
},
{
title: 'Book2',
author: 'Name2'
}
]
test('gets titles', () => {
expect(getTheTitles(books)).toBe(['Book','Book2']);
});
});