2021-05-08 18:25:04 +00:00
|
|
|
const getTheTitles = require("./getTheTitles");
|
2019-04-11 16:37:33 +00:00
|
|
|
|
2021-05-08 18:25:04 +00:00
|
|
|
describe("getTheTitles", function () {
|
|
|
|
const books = [
|
|
|
|
{
|
|
|
|
title: "Book",
|
|
|
|
author: "Name",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Book2",
|
|
|
|
author: "Name2",
|
|
|
|
},
|
|
|
|
];
|
2019-04-11 16:37:33 +00:00
|
|
|
|
2021-05-08 18:25:04 +00:00
|
|
|
test("gets titles", () => {
|
|
|
|
expect(getTheTitles(books)).toBe(["Book", "Book2"]);
|
2019-04-11 16:37:33 +00:00
|
|
|
});
|
|
|
|
});
|