/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/shell-browser/src/app/comm-utils.spec.ts
33 строки
1 KB
Matthieu Riegler
fix(devtools): scope the message bus with URLs to prevent cross message interference
12 фев 2026, 01:38
12 фев 2026, 01:38
302ea2e
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {stripUrlQueryParamsAndFragment} from './comm-utils'; describe('Communication utils', () => { describe('stripUrlQueryParamsAndFragment', () => { it('should return the URL', () => { const url = stripUrlQueryParamsAndFragment('https://example.com'); expect(url).toEqual('https://example.com'); }); it('should strip the URL from its query parameters', () => { const url = stripUrlQueryParamsAndFragment('https://example.com?foo=bar&baz=314'); expect(url).toEqual('https://example.com'); }); it('should strip the URL from its fragment', () => { const url = stripUrlQueryParamsAndFragment('https://example.com#main-heading'); expect(url).toEqual('https://example.com'); }); it('should strip the URL from both its query params and fragment', () => { const url = stripUrlQueryParamsAndFragment('https://example.com?foo=bar#main-heading'); expect(url).toEqual('https://example.com'); }); }); });