mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
17 lines
542 B
TypeScript
17 lines
542 B
TypeScript
import getRouteStringFromRoutes from 'sentry/utils/getRouteStringFromRoutes';
|
|
|
|
describe('getRouteStringFromRoutes', function () {
|
|
const routes = [
|
|
{path: '/'},
|
|
{path: '/:orgId/'},
|
|
{name: 'this should be skipped'},
|
|
{path: '/organizations/:orgId/'},
|
|
{name: 'also skipped'},
|
|
{path: 'api-keys/', name: 'API Key'},
|
|
];
|
|
|
|
it('can get a route string from routes array and skips routes that do not have a path', function () {
|
|
expect(getRouteStringFromRoutes(routes)).toBe('/organizations/:orgId/api-keys/');
|
|
});
|
|
});
|