• 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 {SpApplication} from "../../dist/trace/SpApplication.js";
18
19window.ResizeObserver = window.ResizeObserver ||
20    jest.fn().mockImplementation(() => ({
21        disconnect: jest.fn(),
22        observe: jest.fn(),
23        unobserve: jest.fn(),
24    }));
25
26describe('spApplication Test', ()=>{
27    it('spApplicationTest01', function () {
28        let spApplication = new SpApplication();
29        expect(spApplication).not.toBeUndefined()
30    });
31
32
33    it('spApplicationTest02', function () {
34        let spApplication = new SpApplication();
35        expect(spApplication.sqlite).toBeFalsy()
36    });
37
38
39    it('spApplicationTest03', function () {
40        let spApplication = new SpApplication();
41        expect(spApplication.wasm).toBeFalsy()
42    });
43
44    it('spApplicationTest04', function () {
45        let spApplication = new SpApplication();
46        expect(spApplication.server).toBeFalsy()
47    });
48
49
50    it('spApplicationTest05', function () {
51        let spApplication = new SpApplication();
52        spApplication.server = true;
53        expect(spApplication.server).toBeTruthy()
54    });
55
56
57    it('spApplicationTest06', function () {
58        let spApplication = new SpApplication();
59        spApplication.server = false;
60        expect(spApplication.server).toBeFalsy()
61    });
62
63    it('spApplicationTest07', function () {
64        let spApplication = new SpApplication();
65        spApplication.search = false;
66        expect(spApplication.search).toBeFalsy()
67    });
68
69    it('spApplicationTest08', function () {
70        let spApplication = new SpApplication();
71        spApplication.search = true;
72        expect(spApplication.search).toBeUndefined()
73    });
74})
75