|
|
@@ -8,7 +8,7 @@
|
|
|
import isWindow from '../../src/dom/iswindow';
|
|
|
|
|
|
describe( 'isWindow()', () => {
|
|
|
- it( 'detects DOM Window', () => {
|
|
|
+ it( 'detects DOM Window in browsers', () => {
|
|
|
expect( isWindow( window ) ).to.be.true;
|
|
|
expect( isWindow( {} ) ).to.be.false;
|
|
|
expect( isWindow( null ) ).to.be.false;
|
|
|
@@ -16,4 +16,14 @@ describe( 'isWindow()', () => {
|
|
|
expect( isWindow( new Date() ) ).to.be.false;
|
|
|
expect( isWindow( 42 ) ).to.be.false;
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'detects DOM Window in the Electron environment', () => {
|
|
|
+ const global = {
|
|
|
+ get [ Symbol.toStringTag ]() {
|
|
|
+ return 'global';
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ expect( isWindow( global ) ).to.be.true;
|
|
|
+ } );
|
|
|
} );
|