Skip to content

Commit f609014

Browse files
Fix mistake in test (#82)
Signed-off-by: Levko Kravets <[email protected]> Signed-off-by: Levko Kravets <[email protected]>
1 parent abb0d73 commit f609014

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/utils.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ describe('buildUserAgentString', () => {
1818
// Prefix: 'NodejsDatabricksSqlConnector/'
1919
// Version: three period-separated digits and optional suffix
2020
const re =
21-
/^(?<productName>NodejsDatabricksSqlConnector)\/(?<productVersion>\d+\.\d+\.\d+(-[^(]+)?)\((?<comment>[^)]+)\)$/i;
21+
/^(?<productName>NodejsDatabricksSqlConnector)\/(?<productVersion>\d+\.\d+\.\d+(-[^(]+)?)\s*\((?<comment>[^)]+)\)$/i;
2222
const match = re.exec(ua);
2323
expect(match).to.not.be.eq(null);
2424

2525
const { comment } = match.groups;
2626

27-
expect(comment.split(';').length).to.be.gte(2); // at least Node ans OS version should be there
27+
expect(comment.split(';').length).to.be.gte(2); // at least Node and OS version should be there
2828

2929
if (clientId) {
3030
expect(comment.trim()).to.satisfy((s) => s.startsWith(`${clientId};`));

0 commit comments

Comments
 (0)