refactor: import jest as global; unify import style of some modules ()

* refactor: import jest as global

* fix react
This commit is contained in:
Joshua Chen 2022-03-11 19:04:27 +08:00 committed by GitHub
parent e97dc0d37e
commit c9ee6e467c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 177 additions and 139 deletions
packages/docusaurus-utils-validation/src/__tests__

View file

@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import {jest} from '@jest/globals';
import Joi from '../Joi';
import {JoiFrontMatter} from '../JoiFrontMatter';
import {validateFrontMatter} from '../validationUtils';
@ -21,7 +22,9 @@ describe('validateFrontMatter', () => {
});
test('should reject bad values', () => {
const consoleError = jest.spyOn(console, 'error').mockImplementation();
const consoleError = jest
.spyOn(console, 'error')
.mockImplementation(() => {});
const schema = Joi.object<{test: string}>({
test: Joi.string(),
});