fix(core): update

This commit is contained in:
2019-09-04 15:45:18 +02:00
parent 8db0cac292
commit fdc9cb6784
3 changed files with 59 additions and 1 deletions

View File

@ -23,7 +23,23 @@ tap.test('should stringify data', async () => {
});
tap.test('should parse a normal frontmatter file', async () => {
const normalFile = `---
heythere: awesome
---
really
`;
let result = testSmartfm.parse(normalFile);
expect(result.data.heythere).to.equal('awesome')
});
tap.test('should parse a commented out frontmatter file', async () => {
const commentedFile = `# ---
# heythere: awesome
# ---
really
`;
let result = testSmartfm.parseFromComments('# ', commentedFile);
console.log(result);
});
tap.start();