refactor(v2): avoid synchronous/ blocking operation when possible (#1957)

* perf(v2): avoid synchronous/ blocking operation when possible

* save variable
This commit is contained in:
Endi 2019-11-11 20:56:23 +07:00 committed by GitHub
parent 5e445a0011
commit 1235fc9f7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 76 deletions

View file

@ -52,4 +52,10 @@ describe('loadSidebars', () => {
const result = loadSidebars(null);
expect(result).toEqual({});
});
test('fake sidebars path', () => {
expect(() => {
loadSidebars('/fake/path');
}).toThrowError();
});
});