Spaces:
Running
Running
| import { describe, expect, it } from 'vitest'; | |
| import { isSafariUserAgent } from './Header'; | |
| describe('Safari performance notice routing', () => { | |
| it('detects desktop Safari without matching Chromium user agents', () => { | |
| expect(isSafariUserAgent('Mozilla/5.0 AppleWebKit/605.1.15 Version/26.5 Safari/605.1.15')).toBe(true); | |
| expect(isSafariUserAgent('Mozilla/5.0 AppleWebKit/537.36 Chrome/150.0.0.0 Safari/537.36')).toBe(false); | |
| expect(isSafariUserAgent('Mozilla/5.0 AppleWebKit/537.36 HeadlessChrome/150.0.0.0 Safari/537.36')).toBe(false); | |
| expect(isSafariUserAgent('Mozilla/5.0 AppleWebKit/537.36 Edg/150.0.0.0 Safari/537.36')).toBe(false); | |
| }); | |
| }); | |