Chore/unit test (#538)

* chore: add unit test

* chore: add github action for unit test
This commit is contained in:
zuomeng wang
2022-11-29 18:15:43 +00:00
committed by GitHub
parent 5eb7830c13
commit f10237d207
7 changed files with 1915 additions and 78 deletions

View File

@@ -0,0 +1,12 @@
import { describe, test, expect } from '@jest/globals';
import { isMobile } from '../get-is-mobile';
describe('get-is-mobile', () => {
test('get-is-mobile', () => {
expect(
isMobile(
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
)
).toBe(true);
});
});