Updated to airbnb coding styles

This commit is contained in:
Alejandro Celaya
2022-03-26 12:17:42 +01:00
parent 4e9b19afd1
commit a2df486280
239 changed files with 2210 additions and 3549 deletions

View File

@@ -3,9 +3,9 @@ import { replaceAuthorityFromUri } from '../../../src/utils/helpers/uri';
describe('uri-helper', () => {
describe('replaceAuthorityFromUri', () => {
it.each([
[ 'http://something.com/foo/bar', 'www.new.to', 'http://www.new.to/foo/bar' ],
[ 'https://www.authori.ty:8000/', 'doma.in', 'https://doma.in/' ],
[ 'http://localhost:8080/this/is-a-long/path', 'somewhere:8888', 'http://somewhere:8888/this/is-a-long/path' ],
['http://something.com/foo/bar', 'www.new.to', 'http://www.new.to/foo/bar'],
['https://www.authori.ty:8000/', 'doma.in', 'https://doma.in/'],
['http://localhost:8080/this/is-a-long/path', 'somewhere:8888', 'http://somewhere:8888/this/is-a-long/path'],
])('replaces authority as expected', (uri, newAuthority, expectedResult) => {
expect(replaceAuthorityFromUri(uri, newAuthority)).toEqual(expectedResult);
});