odin-javascript-exercises/getTheTitles/getTheTitles.spec.js

20 lines
332 B
JavaScript
Raw Normal View History

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