urls.spec.tsx 669 B

123456789101112131415
  1. import {Organization} from 'sentry-fixture/organization';
  2. import {getDiscoverLandingUrl} from 'sentry/utils/discover/urls';
  3. describe('getDiscoverLandingUrl', function () {
  4. it('is correct for with discover-query and discover-basic features', function () {
  5. const org = Organization({features: ['discover-query', 'discover-basic']});
  6. expect(getDiscoverLandingUrl(org)).toBe('/organizations/org-slug/discover/homepage/');
  7. });
  8. it('is correct for with only discover-basic feature', function () {
  9. const org = Organization({features: ['discover-basic']});
  10. expect(getDiscoverLandingUrl(org)).toBe('/organizations/org-slug/discover/results/');
  11. });
  12. });