• 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 {ProfilerClient} from "../../../dist/trace/grpc/ProfilerClient.js"
18
19describe('HiProfilerClient Test', ()=>{
20    it('HiProfilerClientTest01 ', function () {
21        expect(ProfilerClient.client).toBeUndefined()
22
23    });
24    it('HiProfilerClientTest02', function () {
25        ProfilerClient.client = true;
26        expect(ProfilerClient.client).toBeTruthy()
27
28    });
29    it('HiProfilerClientTest03 ', function () {
30        expect(ProfilerClient.filePaths).toBeUndefined()
31
32    });
33    it('HiProfilerClientTest04', function () {
34        ProfilerClient.filePaths = true;
35        expect(ProfilerClient.filePaths).toBeTruthy()
36
37    });
38    it('HiProfilerClientTest05', function () {
39        expect(ProfilerClient.profiler_proto).toBeUndefined()
40    });
41    it('HiProfilerClientTest06', function () {
42        ProfilerClient.profiler_proto = true;
43        expect(ProfilerClient.profiler_proto).toBeTruthy()
44    });
45
46    it('HiProfilerClientTest07 ', function () {
47        expect(ProfilerClient.shutdown).toBeUndefined()
48
49    });
50    it('HiProfilerClientTest08', function () {
51        ProfilerClient.getChannel = jest.fn(()=>true)
52        expect(ProfilerClient.getChannel()).toBeTruthy();
53    });
54
55})