eventEntry.ts 797 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import {ImageFixture} from 'sentry-fixture/image';
  2. import type {Entry, EntryDebugMeta, EntryRequest} from 'sentry/types/event';
  3. import {EntryType} from 'sentry/types/event';
  4. export function EventEntryFixture(params = {}): Entry {
  5. return {
  6. type: EntryType.MESSAGE,
  7. data: {
  8. formatted: 'Blocked script',
  9. },
  10. ...params,
  11. };
  12. }
  13. export function EntryRequestFixture(params: Partial<EntryRequest> = {}): EntryRequest {
  14. return {
  15. type: EntryType.REQUEST,
  16. data: {
  17. apiTarget: null,
  18. method: 'GET',
  19. url: '/index',
  20. },
  21. ...params,
  22. };
  23. }
  24. export function EntryDebugMetaFixture(
  25. params: Partial<EntryDebugMeta> = {}
  26. ): EntryDebugMeta {
  27. return {
  28. type: EntryType.DEBUGMETA,
  29. data: {
  30. images: [ImageFixture()],
  31. },
  32. ...params,
  33. };
  34. }