mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
test(platform): Add Platform tests (#17354)
* test(platform): add base platform tests * test(platform): add isPlatform test, clean up test file * test(platform): do not export matchMedia * test(platform): change window to win to avoid confusion
This commit is contained in:
@ -112,7 +112,7 @@ function isPWA(win: Window): boolean {
|
||||
return win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone;
|
||||
}
|
||||
|
||||
function testUserAgent(win: Window, expr: RegExp) {
|
||||
export function testUserAgent(win: Window, expr: RegExp) {
|
||||
return expr.test(win.navigator.userAgent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user