Skip to content

Commit

Permalink
Merge pull request #647 from cloudinary/fix-get-user-agent-spec
Browse files Browse the repository at this point in the history
fix: getUserAgent regex
  • Loading branch information
cloudinary-pkoniu authored Jan 18, 2024
2 parents 73d6a66 + 3fbfc2b commit de47c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/cloudinaryUtils/getUserAgent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ describe("getUserAgent", function () {
});
it("should add a user platform to USER_AGENT", function () {
cloudinary.utils.userPlatform = "Spec/1.0 (Test)";
expect(cloudinary.utils.getUserAgent()).to.match(/Spec\/1.0 \(Test\) CloudinaryNodeJS\/[\d.]+(?:-[a-zA-Z\d]+)? \(Node [\d.]+\)/);
expect(cloudinary.utils.getUserAgent()).to.match(/Spec\/1.0 \(Test\) CloudinaryNodeJS\/(\d+\.\d+\.\d+(?:-[\da-zA-Z]+(?:\.\d+)?)?) \(Node [\d.]+\)/);
});
});

0 comments on commit de47c60

Please sign in to comment.