2023-01-21 09:53:41 -08:00
|
|
|
const getTheTitles = require("./getTheTitles");
|
2022-02-20 11:07:44 -08:00
|
|
|
|
2023-01-21 09:53:41 -08:00
|
|
|
describe("getTheTitles", () => {
|
|
|
|
const books = [
|
|
|
|
{
|
|
|
|
title: "Book",
|
|
|
|
author: "Name",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Book2",
|
|
|
|
author: "Name2",
|
|
|
|
},
|
|
|
|
];
|
2022-02-20 11:07:44 -08:00
|
|
|
|
2023-01-21 09:53:41 -08:00
|
|
|
test("gets titles", () => {
|
|
|
|
expect(getTheTitles(books)).toEqual(["Book", "Book2"]);
|
|
|
|
});
|
2022-02-20 11:07:44 -08:00
|
|
|
});
|