frame.spec.tsx 562 B

1234567891011121314151617181920
  1. import {Frame} from 'sentry/utils/profiling/frame';
  2. describe('Frame', () => {
  3. describe('web', () => {
  4. it('sets anonymouse name if frame has no name', () => {
  5. expect(new Frame({key: 0, name: '', line: 0, column: 0}, 'web').name).toBe(
  6. 'anonymous'
  7. );
  8. });
  9. it('appends [native code] to name if frame belongs to native code', () => {
  10. expect(
  11. new Frame(
  12. {key: 0, name: 'foo', line: undefined, column: undefined},
  13. 'web'
  14. ).name.endsWith('[native code]')
  15. ).toBe(true);
  16. });
  17. });
  18. });