odin-javascript-exercises/11_getTheTitles/solution/getTheTitles-solution.spec.js
2022-02-20 14:07:44 -05:00

18 lines
381 B
JavaScript

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