config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. features: new Set(),
  10. singleOrganization: false,
  11. urlPrefix: 'https://sentry-jest-tests.example.com/',
  12. needsUpgrade: false,
  13. supportEmail: 'support@sentry.io',
  14. invitesEnabled: false,
  15. privacyUrl: null,
  16. termsUrl: null,
  17. // Maintain isOnPremise key for backcompat (plugins?).
  18. isOnPremise: false,
  19. isSelfHosted: false,
  20. lastOrganization: null,
  21. gravatarBaseUrl: 'https://gravatar.com',
  22. dsn: 'test-dsn',
  23. userIdentity: {
  24. ip_address: '127.0.0.1',
  25. email: 'example@example.com',
  26. id: '1',
  27. isStaff: false,
  28. },
  29. isAuthenticated: true,
  30. version: {
  31. current: '1.0.0-dev',
  32. latest: '1.0.0-dev',
  33. build: 'test-build',
  34. upgradeAvailable: false,
  35. },
  36. sentryConfig: {
  37. dsn: 'test-dsn',
  38. release: '1.0.0.-dev',
  39. whitelistUrls: [],
  40. },
  41. distPrefix: '',
  42. apmSampling: 1,
  43. dsn_requests: '',
  44. demoMode: false,
  45. links: {
  46. sentryUrl: 'https://sentry.io',
  47. organizationUrl: 'https://foobar.sentry.io',
  48. regionUrl: 'https://us.sentry.io',
  49. },
  50. ...params,
  51. };
  52. }