• 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 { HeapNode,HeapEdge,HeapTraceFunctionInfo,HeapSample,HeapLocation,HeapSnapshotStruct,FileStruct } from '../../../dist/js-heap/model/DatabaseStruct.js';
17// @ts-ignore
18window.ResizeObserver = window.ResizeObserver || jest.fn().mockImplementation(() => ({
19    disconnect: jest.fn(),
20    observe: jest.fn(),
21    unobserve: jest.fn(),
22}));
23
24describe('DatabaseStruct Test', () => {
25    it('DatabaseStructTest01', () => {
26        let heapNode = new HeapNode();
27        expect(heapNode).not.toBeUndefined();
28    });
29    it('DatabaseStructTest02', () => {
30        let heapEdge = new HeapEdge();
31        expect(heapEdge).not.toBeUndefined();
32    });
33    it('DatabaseStructTest03', () => {
34        let heapTraceFunctionInfo = new HeapTraceFunctionInfo();
35        expect(heapTraceFunctionInfo).not.toBeUndefined();
36    });
37    it('DatabaseStructTest04', () => {
38        let heapLocation = new HeapLocation();
39        expect(heapLocation).not.toBeUndefined();
40    });
41    it('DatabaseStructTest05', () => {
42        let heapSnapshotStruct = new HeapSnapshotStruct();
43        expect(heapSnapshotStruct).not.toBeUndefined();
44    });
45    it('DatabaseStructTest06', () => {
46        let fileStruct = new FileStruct();
47        expect(fileStruct).not.toBeUndefined();
48    });
49    it('DatabaseStructTest07', () => {
50        let heapNode = new HeapNode();
51        expect(heapNode.className()).toBe('(undefined)');
52    });
53    it('DatabaseStructTest09', () => {
54        let heapNode = new HeapNode();
55        expect(heapNode.nodeName()).toBeUndefined();
56    });
57    it('DatabaseStructTest10', () => {
58        let heapNode = new HeapNode();
59        expect(heapNode.addEdge({})).toBeUndefined;
60    });
61    it('DatabaseStructTest11', () => {
62        let heapNode = new HeapNode();
63        expect(heapNode.idHidden()).toBeUndefined;
64    });
65    it('DatabaseStructTest12', () => {
66        let heapNode = new HeapNode();
67        expect(heapNode.isArray()).toBeUndefined;
68    });
69    it('DatabaseStructTest13', () => {
70        let heapNode = new HeapNode();
71        expect(heapNode.isUserRoot()).toBeUndefined;
72    });
73    it('DatabaseStructTest14', () => {
74        let heapNode = new HeapNode();
75        expect(heapNode.isDocumentDOMTreesRoot()).toBeUndefined;
76    });
77    it('DatabaseStructTest15', () => {
78        let heapNode = new HeapSample();
79        expect(HeapSample).not.toBeUndefined;
80    });
81})