Skip to content

Commit

Permalink
fix: adjust unit-test to node20
Browse files Browse the repository at this point in the history
  • Loading branch information
Krauskopf Sebastian (DC-AE/EAR2) committed May 27, 2024
1 parent f205dd7 commit 402efc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/ctrlx-datalayer-subscribe.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ describe('ctrlx-datalayer-subscribe', function () {
expect(msg).to.have.property('timestamp').to.be.a('number');
expect(msg).to.have.property('type').to.be.a('string').eql('double');
expect(msg).to.have.property('payload').to.be.a('number').eql(23);

s1.subscription.close();
done();
}
Expand All @@ -504,9 +503,9 @@ describe('ctrlx-datalayer-subscribe', function () {
}
});

// We expect to reveive an error message, because the mockup will send an invalid JSON message.
// The node should not return any errors, but just accept the path
n1.on('call:error', call => {
//numErrors++;
done(call.firstArg);
});

});
Expand Down Expand Up @@ -563,7 +562,7 @@ describe('ctrlx-datalayer-subscribe', function () {
n1.on('call:error', call => {
numErrors++;
try {
expect(call.firstArg).eql('Error parsing update event: Unexpected end of JSON input');
expect(call.firstArg).oneOf(['Error parsing update event: Unexpected end of JSON input', 'Error parsing update event: Unterminated string in JSON at position 50']);
} catch (err) {
done(err);
}
Expand Down

0 comments on commit 402efc9

Please sign in to comment.