• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-opcua / node-opcua / 22636309940

03 Mar 2026 06:03PM UTC coverage: 92.756% (+1.9%) from 90.81%
22636309940

push

github

erossignon
test: disable ENOENT on overlapping trustCertificate invocations in test environments with concurrency tests

18684 of 22141 branches covered (84.39%)

23 of 37 new or added lines in 1 file covered. (62.16%)

5775 existing lines in 228 files now uncovered.

160668 of 173216 relevant lines covered (92.76%)

875869.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.8
/packages/node-opcua-client-crawler/source/cache_node.ts
1

2✔
2
import { ReferenceDescription } from "node-opcua-types";
2✔
3
import { pendingBrowseName } from "./private";
2✔
4
import { NodeId } from "node-opcua-nodeid";
2✔
5
import { AccessLevelFlag, coerceLocalizedText, LocalizedText, NodeClass, QualifiedName } from "node-opcua-data-model";
2✔
6
import { DataTypeDefinition } from "node-opcua-types";
2✔
7
import { DataValue } from "node-opcua-data-value";
2✔
8

2✔
UNCOV
9
function w(s: string, l: number): string {
×
10
    return s.padEnd(l).substring(0, l);
×
UNCOV
11
}
×
12
export class CacheNode {
97,948✔
13
    // the reference that links this node to its parent
97,948✔
14
    public referenceToParent?: ReferenceDescription;
97,948✔
15
    public parent?: CacheNode;
97,948✔
16

97,948✔
17
    public nodeId: NodeId;
97,948✔
18
    public browseName: QualifiedName;
97,948✔
19
    public references: ReferenceDescription[];
97,948✔
20
    public nodeClass: NodeClass;
97,948✔
21
    public typeDefinition: any;
97,948✔
22
    public displayName: LocalizedText;
97,948✔
23
    public description: LocalizedText = coerceLocalizedText("")!;
97,948✔
24

97,948✔
25
    public _browse? : "planned"|"done";
97,948✔
26

97,948✔
27
    constructor(nodeId: NodeId) {
97,948✔
28
        /**
97,948✔
29
         */
97,948✔
30
        this.nodeId = nodeId;
97,948✔
31
        /**
97,948✔
32
         */
97,948✔
33
        this.browseName = pendingBrowseName;
97,948✔
34
        /**
97,948✔
35
         */
97,948✔
36
        this.references = [];
97,948✔
37

97,948✔
38
        this.nodeClass = NodeClass.Unspecified;
97,948✔
39

97,948✔
40
        this.typeDefinition = "";
97,948✔
41

97,948✔
42
        this.displayName = new LocalizedText({});
97,948✔
43
    }
97,948✔
44

97,948✔
45
    public toString(): string {
97,948✔
46
        let str = w(this.nodeId.toString(), 20);
×
47
        str += " " + w(this.browseName.toString(), 30);
×
48
        str += " typeDef : " + w(this.typeDefinition ? this.typeDefinition.toString() : "", 30);
×
49
        str += " nodeClass : " + w(NodeClass[this.nodeClass], 12);
×
50
        return str;
×
UNCOV
51
    }
×
52
    public dispose(): void {
97,948✔
53
        this.parent = undefined;
97,948✔
54
        this.referenceToParent = undefined;
97,948✔
55
        this.references.length = 0;
97,948✔
56
        this.typeDefinition = undefined;
97,948✔
57
    }
97,948✔
58
}
97,948✔
59

2✔
60
export interface CacheNodeDataType extends CacheNode {
2✔
61
    nodeClass: NodeClass.DataType;
2✔
62
    dataTypeDefinition: DataTypeDefinition;
2✔
63
}
2✔
64

2✔
65
// tslint:disable: max-classes-per-file
2✔
66
export class CacheNodeVariable extends CacheNode {
73,554✔
67
    public nodeClass: NodeClass.Variable = NodeClass.Variable;
73,554✔
68
    public dataValue?: DataValue;
73,554✔
69

73,554✔
70
    constructor(nodeId: NodeId) {
73,554✔
71
        super(nodeId);
73,554✔
72
    }
73,554✔
73
    public dispose(): void {
73,554✔
74
        super.dispose();
73,554✔
75
        if (this.dataValue) {
73,554✔
76
            this.dataValue = undefined;
73,554✔
77
        }
73,554✔
78
    }
73,554✔
79
}
73,554✔
80
export interface CacheNodeVariable extends CacheNode {
2✔
81
    dataType: NodeId;
2✔
82
    dataValue?: DataValue;
2✔
83
    minimumSamplingInterval: number;
2✔
84
    accessLevel: AccessLevelFlag;
2✔
85
    userAccessLevel: AccessLevelFlag;
2✔
86
    arrayDimensions?: number[];
2✔
87
    valueRank?: number;
2✔
88
}
2✔
89

2✔
90
export class CacheNodeVariableType extends CacheNode {
992✔
91
    public nodeClass: NodeClass.VariableType = NodeClass.VariableType;
992✔
92
    public dataValue?: DataValue;
992✔
93

992✔
94
    constructor(nodeId: NodeId) {
992✔
95
        super(nodeId);
992✔
96
    }
992✔
97
    public dispose(): void {
992✔
98
        super.dispose();
992✔
99
        if (this.dataValue) {
992✔
100
            this.dataValue = undefined;
992✔
101
        }
992✔
102
    }
992✔
103
}
992✔
104
export interface CacheNodeVariableType extends CacheNode {
2✔
105
    nodeClass: NodeClass.VariableType;
2✔
106
    isAbstract: boolean;
2✔
107
    dataType: NodeId;
2✔
108
    dataValue?: DataValue;
2✔
109
    accessLevel: AccessLevelFlag;
2✔
110
    arrayDimensions?: number[];
2✔
111
    valueRank?: number;
2✔
112
}
2✔
113

2✔
114
export interface CacheNodeObjectType extends CacheNode {
2✔
115
    nodeClass: NodeClass.ObjectType;
2✔
116
    isAbstract: boolean;
2✔
117
    accessLevel: AccessLevelFlag;
2✔
118
    eventNotifier: number;
2✔
119
}
2✔
120

2✔
121
export interface CacheNodeReferenceType extends CacheNode {
2✔
122
    nodeClass: NodeClass.ReferenceType;
2✔
123
    isAbstract: boolean;
2✔
124
    inverseName: LocalizedText;
2✔
125
}
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc