• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16// @ts-ignore
17import { Cmd } from '../../dist/command/Cmd.js';
18
19describe('Cmd', () => {
20  it('CmdTest_01', () => {
21    expect(Cmd.execObjDump('', '')).toBeUndefined();
22  });
23
24  it('CmdTest_02', () => {
25    expect(Cmd.execHdcCmd('')).toBeUndefined();
26  });
27
28  it('CmdTest_03', () => {
29    expect(Cmd.execFileRecv('', '')).toBeTruthy();
30  });
31
32  it('CmdTest_04', () => {
33    expect(Cmd.execHdcTraceCmd('', '')).toBeUndefined();
34  });
35
36  it('CmdTest_05', () => {
37    let params = [
38      {
39        length: 0,
40      },
41    ];
42    expect(Cmd.formatString('', params)).toBe('');
43  });
44
45  it('CmdTest_06', () => {
46    expect(Cmd.showSaveFile()).toBeUndefined();
47  });
48
49  it('CmdTest_07', () => {
50    expect(Cmd.uploadFile()).toBeUndefined();
51  });
52
53  it('CmdTest_08', () => {
54    expect(Cmd.copyFile('', '')).toBeUndefined();
55  });
56
57  it('CmdTest_09', () => {
58    expect(Cmd.openFileDialog()).toBeTruthy();
59  });
60
61  it('CmdTest_10', () => {
62    expect(Cmd.formatString('', [])).toBe('');
63  });
64});
65