Docs update
Some checks failed
Build / Build NPM Project (push) Failing after 28s
Build / Tag Version (push) Has been skipped

This commit is contained in:
2024-09-22 02:38:13 -04:00
parent a0f0699a85
commit 3896949fc1
15 changed files with 984 additions and 110 deletions

View File

@ -1,4 +1,4 @@
import {sleep, urlParser} from '../src';
import {sleep, parseUrl} from '../src';
describe('Miscellanies Utilities', () => {
describe('sleep', () => {
@ -12,7 +12,7 @@ describe('Miscellanies Utilities', () => {
describe('urlParser', () => {
test('localhost w/ port', () => {
const parsed = urlParser('http://localhost:4200/some/path?q1=test1&q2=test2#frag');
const parsed = parseUrl('http://localhost:4200/some/path?q1=test1&q2=test2#frag');
expect(parsed.protocol).toStrictEqual('http');
expect(parsed.host).toStrictEqual('localhost:4200');
expect(parsed.domain).toStrictEqual('localhost');
@ -23,7 +23,7 @@ describe('Miscellanies Utilities', () => {
});
test('advanced URL', () => {
const parsed = urlParser('https://sub.domain.example.com/some/path?q1=test1&q2=test2#frag');
const parsed = parseUrl('https://sub.domain.example.com/some/path?q1=test1&q2=test2#frag');
expect(parsed.protocol).toStrictEqual('https');
expect(parsed.host).toStrictEqual('sub.domain.example.com');
expect(parsed.domain).toStrictEqual('example.com');