test(utils, mdx-loader, core): improve coverage (#6303)

* test(utils, mdx-loader, core): improve coverage

* windows...

* fix
This commit is contained in:
Joshua Chen 2022-01-10 15:00:51 +08:00 committed by GitHub
parent cf265c051e
commit a79c23bc45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 841 additions and 219 deletions

View file

@ -141,6 +141,10 @@ describe('getDataFileData', () => {
);
}
test('returns undefined for nonexistent file', async () => {
await expect(readDataFile('nonexistent.yml')).resolves.toBeUndefined();
});
test('read valid yml author file', async () => {
await expect(readDataFile('valid.yml')).resolves.toEqual({a: 1});
});