diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-01-10 09:05:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 09:05:43 +0100 |
commit | b358a212fda6be6c43eb864979e1c58bd6f5200e (patch) | |
tree | 36a0858f99424571bf9fba978a1ae6a3a12af352 /test | |
parent | 01f77f86cea0a6b2b7b74b2105720ee7142d6767 (diff) | |
parent | 3bbeb33e6df1aac21ec2e92931f4628b992f4013 (diff) | |
download | kronikarz-b358a212fda6be6c43eb864979e1c58bd6f5200e.tar.gz kronikarz-b358a212fda6be6c43eb864979e1c58bd6f5200e.zip |
Merge pull request #22 from pniedzwiedzinski/pages v2.3.0
Pages
Diffstat (limited to 'test')
-rw-r--r-- | test/generatePages.spec.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/generatePages.spec.ts b/test/generatePages.spec.ts new file mode 100644 index 0000000..2312e48 --- /dev/null +++ b/test/generatePages.spec.ts @@ -0,0 +1,13 @@ +import * as fs from "fs"; +import Kronikarz from "../dist"; + +const k = new Kronikarz(__dirname + "/samples"); +const dir = "./tmp"; + +test("generate pages", () => { + k.generateApi(dir); + fs.readFile("./tmp/api/page/1.json", "utf-8", (err, data) => { + const page = JSON.parse(data); + expect(page.posts.length).toBe(2); + }); +}) |