summaryrefslogtreecommitdiff
path: root/src/serializers/to_json.test.ts
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-02-12 00:44:57 +0200
committerAsko Nõmm <asko@nmm.ee>2025-02-12 00:44:57 +0200
commit670dbc07239fb860961055eb7af6823786e4febe (patch)
treed575fdb4871e23af0220b938ba009d9ea4797523 /src/serializers/to_json.test.ts
parent8ff7c10249b1a9daeb30d47cf5b9266a5a0f7a26 (diff)
Refactor to use Effect.
Diffstat (limited to 'src/serializers/to_json.test.ts')
-rw-r--r--src/serializers/to_json.test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/serializers/to_json.test.ts b/src/serializers/to_json.test.ts
index 4184ab1..78f704a 100644
--- a/src/serializers/to_json.test.ts
+++ b/src/serializers/to_json.test.ts
@@ -2,11 +2,11 @@ import FlatMatter from "../flatmatter.ts";
import ToJson from "./to_json.ts";
test("Single-level configuration", () => {
- const fm = new FlatMatter(
- 'a: true\nb: false\nc: 1\nd: 12.5\nf: "some string"'
+ const config = FlatMatter.config(
+ '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);
+ expect(FlatMatter.serialize(config, ToJson)).toStrictEqual(equal);
});