Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sidorares/node-mysql2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9c20fbecc8de5eac14f5c609f627afadbdb08b38
Choose a base ref
..
head repository: sidorares/node-mysql2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d280248fd4dab9d1e23c5ca21dc7f256c398e944
Choose a head ref
Showing with 29 additions and 0 deletions.
  1. +29 −0 test/unit/connection/test-connection_config.js
29 changes: 29 additions & 0 deletions test/unit/connection/test-connection_config.js
Original file line number Diff line number Diff line change
@@ -49,3 +49,32 @@ assert.strictEqual(
).password,
'pass!@$%^&*()word:',
);

assert.strictEqual(
ConnectionConfig.parseUrl(
String.raw`fml://user%40test.com:pass!%40%24%25%5E%26*()word%3A@www.example.com/database`,
).user,
'user@test.com',
);

assert.strictEqual(
ConnectionConfig.parseUrl(
String.raw`fml://test:pass@wordA@fe80%3A3438%3A7667%3A5c77%3Ace27%2518/database`,
).host,
'fe80:3438:7667:5c77:ce27%18',
);

assert.strictEqual(
ConnectionConfig.parseUrl(
String.raw`fml://test:pass@wordA@www.example.com/database`,
).host,
'www.example.com',
);

assert.strictEqual(
ConnectionConfig.parseUrl(
String.raw`fml://test:pass@wordA@www.example.com/database%24`,
).database,
'database$',
);