• 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//@ts-ignore
16import { SpFileSystem } from '../../../../dist/trace/component/setting/SpFileSystem';
17
18describe('spFileSystem Test', () => {
19  let spFileSystem = new SpFileSystem();
20  it('SpFileSystemTest01', function () {
21    spFileSystem.startSamp = true;
22    expect(spFileSystem.startSamp).toBeTruthy();
23  });
24
25  it('SpFileSystemTest02', function () {
26    spFileSystem.startSamp = false;
27    expect(spFileSystem.startSamp).toBeFalsy();
28  });
29
30  it('SpFileSystemTest03', function () {
31    expect(spFileSystem.getSystemConfig()).toStrictEqual({
32      process: '',
33      unWindLevel: 10,
34    });
35  });
36
37  it('SpFileSystemTest04', function () {
38    expect(spFileSystem.unDisable()).toBeUndefined();
39  });
40
41  it('SpFileSystemTest05', function () {
42    expect(spFileSystem.disable()).toBeUndefined();
43  });
44
45  it('SpFileSystemTest07', function () {
46    spFileSystem.startRecord = true;
47    expect(spFileSystem.startRecord).toBeTruthy();
48  });
49
50  it('SpFileSystemTest08', function () {
51    spFileSystem.startRecord = false;
52    expect(spFileSystem.startRecord).toBeFalsy();
53  });
54
55  it('SpFileSystemTest09', function () {
56    spFileSystem.startFileSystem = true;
57    expect(spFileSystem.startFileSystem).toBeTruthy();
58  });
59
60  it('SpFileSystemTest10', function () {
61    spFileSystem.startFileSystem = false;
62    expect(spFileSystem.startFileSystem).toBeFalsy();
63  });
64
65  it('SpFileSystemTest11', function () {
66    spFileSystem.startVirtualMemory = true;
67    expect(spFileSystem.startVirtualMemory).toBeTruthy();
68  });
69
70  it('SpFileSystemTest12', function () {
71    spFileSystem.startVirtualMemory = false;
72    expect(spFileSystem.startVirtualMemory).toBeFalsy();
73  });
74
75  it('SpFileSystemTest13', function () {
76    spFileSystem.startIo = true;
77    expect(spFileSystem.startIo).toBeTruthy();
78  });
79
80  it('SpFileSystemTest14', function () {
81    spFileSystem.startIo = false;
82    expect(spFileSystem.startIo).toBeFalsy();
83  });
84});
85