blob: 2312e483761a1b2b9bcd3ff73ed0bdc514ad6135 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
});
})
|