browser.spec.ts 483 B

1234567891011121314
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. const userAgentSpy = vi.spyOn(window.navigator, 'userAgent', 'get')
  3. userAgentSpy.mockReturnValue(
  4. 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4758.102 Safari/537.36',
  5. )
  6. import { generateFingerprint } from '../browser'
  7. describe('browser', () => {
  8. it('generate fingerprint', () => {
  9. expect(generateFingerprint()).toBe('1613472439')
  10. })
  11. })