Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
2
test/isBrowser/isBrowser.js
Normal file
2
test/isBrowser/isBrowser.js
Normal file
@ -0,0 +1,2 @@
|
||||
const isBrowser = () => ![typeof window, typeof document].includes('undefined');
|
||||
module.exports = isBrowser;
|
||||
8
test/isBrowser/isBrowser.test.js
Normal file
8
test/isBrowser/isBrowser.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
const expect = require('expect');
|
||||
const isBrowser = require('./isBrowser.js');
|
||||
|
||||
|
||||
test('isBrowser is a Function', () => {
|
||||
expect(isBrowser).toBeInstanceOf(Function);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user