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 { ProcedureWorker, drawSelection } from '../../../src/trace/database/ProcedureWorker';
17
18describe('ProcedureWorker Test', () => {
19  it('ProcedureWorkerTest01', function () {
20    const context = {
21      globalAlpha: 0.5,
22      fillStyle: '#666666',
23      fillRect: '',
24    };
25     const data = {
26        startX: '',
27        endX: '',
28        startNS: '',
29        endNS: '',
30        x: '',
31        y: '',
32        height: 1,
33        width: 1,
34    };
35    const params = {
36      isRangeSelect: {},
37      rangeSelectObject: {
38        startX: '',
39        endX: '',
40        startNS: '',
41        endNS: '',
42      },
43      startNS: '',
44      endNS: '',
45      totalNS: 1,
46      frame: {
47        x: '',
48        y: '',
49        height: 1,
50        width: 1,
51      },
52    };
53    let drawSelection = jest.fn(() => true);
54    // @ts-ignore
55    expect(drawSelection(context, params)).toBeTruthy();
56  });
57});
58