blob: 4c349aa47afc1a3c58c9f790066a4db986f6f02b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import FlatMatter from "./flatmatter";
import {assert} from "vitest";
test('Line has no value separator', () => {
expect(() => new FlatMatter('test'))
.toThrowError("Line on index 0 doesn't have a value separator.");
})
test('Line can only have one value separator', () => {
expect(() => new FlatMatter('test: this: that'))
.toThrowError("Line on index 0 has multiple value separators.")
})
test('String values can have colon characters', () => {
assert.doesNotThrow(() => new FlatMatter('test: "this : that"'), Error)
})
|