Chore: Remove console output from some jest tests (#45792)

* Chore: Remove console output from some jest tests

* Skip manual performance test
This commit is contained in:
Ashley Harrison
2022-02-24 10:49:48 +00:00
committed by GitHub
parent 5c6061acd2
commit d3700c4032
6 changed files with 14 additions and 59 deletions

View File

@@ -2,9 +2,11 @@ import { getStylesheetEntries, hasThemeStylesheets } from './loaders';
describe('Loaders', () => {
describe('stylesheet helpers', () => {
jest.spyOn(console, 'log').mockImplementation();
beforeEach(() => {
jest.spyOn(console, 'log').mockImplementation();
});
afterAll(() => {
afterEach(() => {
jest.restoreAllMocks();
});
@@ -23,12 +25,12 @@ describe('Loaders', () => {
describe('hasThemeStylesheets', () => {
it('throws when only one theme file is defined', () => {
jest.spyOn(console, 'error').mockImplementation();
const errorSpy = jest.spyOn(console, 'error').mockImplementation();
const result = () => {
hasThemeStylesheets(`${__dirname}/../mocks/stylesheetsSupport/missing-theme-file`);
};
expect(result).toThrow();
jest.restoreAllMocks();
errorSpy.mockRestore();
});
it('returns false when no theme files present', () => {

View File

@@ -202,7 +202,8 @@ describe('nullInsertThreshold Transformer', () => {
expect(result).toBe(df);
});
test('perf stress test should be <= 10ms', () => {
// Leave this test skipped - it should be run manually
test.skip('perf stress test should be <= 10ms', () => {
// 10 fields x 3,000 values with 50% skip (output = 10 fields x 6,000 values)
let bigFrameA = genFrame();