Skip to content

Commit 55dc24d

Browse files
committed
refactor: resolve review comments
1 parent 8aac540 commit 55dc24d

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/signature-object-tests.spec.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,7 @@ describe("Object support in XML signatures", function () {
119119

120120
// Verify that no ds:Object elements exist
121121
const objectNodesWithNull = xpath.select("//*[local-name(.)='Object']", docWithNull);
122-
123-
if (Array.isArray(objectNodesWithNull)) {
124-
expect(objectNodesWithNull.length).to.equal(0);
125-
} else {
126-
expect(objectNodesWithNull).to.not.exist;
127-
}
122+
expect(objectNodesWithNull).to.be.an("array").that.is.empty;
128123

129124
// Test with empty array objects
130125
const sigWithEmpty = new SignedXml({
@@ -150,12 +145,7 @@ describe("Object support in XML signatures", function () {
150145

151146
// Verify that no ds:Object elements exist
152147
const objectNodesWithEmpty = xpath.select("//*[local-name(.)='Object']", docWithEmpty);
153-
154-
if (Array.isArray(objectNodesWithEmpty)) {
155-
expect(objectNodesWithEmpty.length).to.equal(0);
156-
} else {
157-
expect(objectNodesWithEmpty).to.not.exist;
158-
}
148+
expect(objectNodesWithEmpty).to.be.an("array").that.is.empty;
159149
});
160150

161151
it("should handle Object with Encoding attribute", function () {

0 commit comments

Comments
 (0)