odin-js-fundamentals-part-5/11_getTheTitles/solution/getTheTitles-solution.spec.js

19 lines
329 B
JavaScript
Raw Permalink Normal View History

2024-01-11 08:52:05 +00:00
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']);
});
});