2021-05-08 11:31:02 -07:00
|
|
|
const expect = require('expect');let getTheTitles = require('./getTheTitles')
|
2019-04-11 09:37:33 -07:00
|
|
|
|
2021-05-08 11:28:50 -07:00
|
|
|
describe('getTheTitles', function() {
|
|
|
|
const books = [
|
|
|
|
{
|
|
|
|
title: 'Book',
|
|
|
|
author: 'Name'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Book2',
|
|
|
|
author: 'Name2'
|
|
|
|
}
|
|
|
|
]
|
2019-04-11 09:37:33 -07:00
|
|
|
|
2021-05-08 11:28:50 -07:00
|
|
|
it('gets titles', function() {
|
|
|
|
expect(getTheTitles(books)).toEqual(['Book','Book2']);
|
2019-04-11 09:37:33 -07:00
|
|
|
});
|
|
|
|
});
|