1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15// @ts-ignore 16import { TabPaneCpuFreqLimits } from '../../../../../../dist/trace/component/trace/sheet/freq/TabPaneCpuFreqLimits.js'; 17const sqlite = require('../../../../../../dist/trace/database/SqlLite.js'); 18jest.mock('../../../../../../dist/trace/database/SqlLite.js'); 19jest.mock('../../../../../../dist/trace/database/ui-worker/ProcedureWorker.js', () => { 20 return {}; 21}); 22jest.mock('../../../../../../dist/trace/component/trace/base/TraceRow.js', () => { 23 return {}; 24}); 25jest.mock('../../../../../../dist/base-ui/table/lit-table.js', () => { 26 return {}; 27}); 28jest.mock('../../../../../../dist/js-heap/model/DatabaseStruct.js', () => {}); 29 30// @ts-ignore 31window.ResizeObserver = 32 window.ResizeObserver || 33 jest.fn().mockImplementation(() => ({ 34 disconnect: jest.fn(), 35 observe: jest.fn(), 36 unobserve: jest.fn(), 37 })); 38describe('TabPaneCpuFreqLimits Test', () => { 39 let tabPaneCpuFreqLimits = new TabPaneCpuFreqLimits(); 40 it('TabPaneCpuFreqLimits01', function () { 41 expect(tabPaneCpuFreqLimits.sortCpuFreqLimitTable('timeStr', 1)).toBeUndefined(); 42 }); 43 it('TabPaneCpuFreqLimits02', function () { 44 expect(tabPaneCpuFreqLimits.sortCpuFreqLimitTable('valueStr', 1)).toBeUndefined(); 45 }); 46 it('TabPaneCpuFreqLimits03', function () { 47 expect(tabPaneCpuFreqLimits.sortCpuFreqLimitTable('cpu', 1)).toBeUndefined(); 48 }); 49 it('TabPaneCpuFreqLimits04', function () { 50 expect(tabPaneCpuFreqLimits.sortCpuFreqLimitTable('type', 1)).toBeUndefined(); 51 }); 52}); 53