mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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', () => {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user