config.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import {User} from './user';
  2. export function Config(params = {}) {
  3. return {
  4. theme: 'light',
  5. user: User(),
  6. messages: [],
  7. languageCode: 'en',
  8. csrfCookieName: 'csrf-test-cookie',
  9. superUserCookieName: 'su-test-cookie',
  10. features: new Set(),
  11. singleOrganization: false,
  12. urlPrefix: 'https://sentry-jest-tests.example.com/',
  13. needsUpgrade: false,
  14. supportEmail: 'support@sentry.io',
  15. invitesEnabled: false,
  16. privacyUrl: null,
  17. termsUrl: null,
  18. // Maintain isOnPremise key for backcompat (plugins?).
  19. isOnPremise: false,
  20. isSelfHosted: false,
  21. lastOrganization: null,
  22. gravatarBaseUrl: 'https://gravatar.com',
  23. dsn: 'test-dsn',
  24. userIdentity: {
  25. ip_address: '127.0.0.1',
  26. email: 'example@example.com',
  27. id: '1',
  28. isStaff: false,
  29. },
  30. isAuthenticated: true,
  31. version: {
  32. current: '1.0.0-dev',
  33. latest: '1.0.0-dev',
  34. build: 'test-build',
  35. upgradeAvailable: false,
  36. },
  37. sentryConfig: {
  38. dsn: 'test-dsn',
  39. release: '1.0.0.-dev',
  40. whitelistUrls: [],
  41. },
  42. distPrefix: '',
  43. apmSampling: 1,
  44. dsn_requests: '',
  45. demoMode: false,
  46. links: {
  47. sentryUrl: 'https://sentry.io',
  48. organizationUrl: 'https://foobar.sentry.io',
  49. regionUrl: 'https://us.sentry.io',
  50. },
  51. ...params,
  52. };
  53. }