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 16import { TraceSheet } from '../../../../../src/trace/component/trace/base/TraceSheet'; 17jest.mock('../../../../../src/trace/database/ui-worker/ProcedureWorker', () => { 18 return {}; 19}); 20jest.mock('../../../../../src/trace/database/ui-worker/ProcedureWorkerSnapshot', () => { 21 return {}; 22}); 23const intersectionObserverMock = () => ({ 24 observe: () => null, 25}); 26window.IntersectionObserver = jest.fn().mockImplementation(intersectionObserverMock); 27window.ResizeObserver = 28 window.ResizeObserver || 29 jest.fn().mockImplementation(() => ({ 30 disconnect: jest.fn(), 31 observe: jest.fn(), 32 unobserve: jest.fn(), 33 })); 34 35describe('TraceSheet Test', () => { 36 let traceSheet = new TraceSheet(); 37 it('TraceSheet Test01', () => { 38 expect(traceSheet).not.toBeUndefined(); 39 }); 40 41 it('TraceSheet Test08', () => { 42 expect(traceSheet.connectedCallback()).toBeUndefined(); 43 }); 44 it('TraceSheet Test09', () => { 45 expect(traceSheet.loadTabPaneData('key')).toBeUndefined(); 46 }); 47 48 it('TraceSheet Test10', () => { 49 expect(traceSheet.updateRangeSelect()).toBeFalsy(); 50 }); 51}); 52