summaryrefslogtreecommitdiff
path: root/src/serializers/to_json.test.ts
blob: 01f73e0b2d8ff68f9c6033926e8f4b62753f60fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import FlatMatter from "../flatmatter";
import ToJson from "./to_json";

test("Single-level configuration", () => {
    const fm = new FlatMatter(
        'a: true\nb: false\nc: 1\nd: 12.5\nf: "some string"'
    );

    const equal = "{\"a\":true,\"b\":false,\"c\":1,\"d\":12.5,\"f\":\"some string\"}";
    
    expect(fm.serialize(new ToJson())).toStrictEqual(equal);
});