chore(v2): fix async tests ()

This commit is contained in:
Sébastien Lorber 2020-06-08 19:10:13 +02:00 committed by GitHub
parent 66716d1619
commit 08359dd3ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 28 deletions
packages/docusaurus-plugin-content-docs/src/__tests__

View file

@ -45,7 +45,7 @@ test('site with wrong sidebar file', async () => {
const plugin = pluginContentDocs(context, {
sidebarPath,
});
return plugin.loadContent().catch((e) => expect(e).toMatchSnapshot());
await expect(plugin.loadContent()).rejects.toThrowErrorMatchingSnapshot();
});
describe('empty/no docs website', () => {