From 74ee8edb555ef128112378f828c636bc04533b31 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 28 Jan 2020 12:18:47 +0100 Subject: Fix remove attributes --- test/generateApi.spec.ts | 2 +- test/getPost.spec.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/generateApi.spec.ts b/test/generateApi.spec.ts index c2a96e3..bf63b6e 100644 --- a/test/generateApi.spec.ts +++ b/test/generateApi.spec.ts @@ -8,6 +8,6 @@ test("generate single file", () => { k.generateApi(dir); fs.readFile("./tmp/api/posts/2019/12/12/test.json", "utf-8", (err, data) => { const parsedPost = JSON.parse(data); - expect(parsedPost.title).toBe("test"); + expect(parsedPost.title).toBe("Test"); }); }); diff --git a/test/getPost.spec.ts b/test/getPost.spec.ts index 72d7b5e..080bfbd 100644 --- a/test/getPost.spec.ts +++ b/test/getPost.spec.ts @@ -3,6 +3,7 @@ import Kronikarz from "../dist"; const k = new Kronikarz(__dirname + "/samples"); test("simple get", () => { - const post = k.getPost("2019", "12", "12", "test"); + const p = k.getPost("2019", "12", "12", "test"); + const post = p.toApi(); expect(post.title).toBe("Test"); }); -- cgit 1.4.1