running Js test getting error window is defined

373
February 25, 2017, at 09:59 AM

running JS tests using karma + jasmine

I get an error 'window' is not defined, I've added defensive code to detect browser like so

if ((typeof window !== 'undefined') && window['test']) {
       ...
}

but still get an error , how can type of window be defined and the window be undefined at the same time ?

Rent Charter Buses Company
READ ALSO
Semantic UI dropdown user addition only allow email address

Semantic UI dropdown user addition only allow email address

The dropdown is being used to allow the visitor to search for users/email addresses or enter in a custom email address

804
Finding text within complex html document structure with javascript

Finding text within complex html document structure with javascript

I am writing an automation script that will pull information from a dynamically generated webpageI cannot control the information on it, thus I am having trouble referencing the information

278
Why using Webpack-dev-server to start a React App returned my directory structure

Why using Webpack-dev-server to start a React App returned my directory structure

I am new to webpack-dev-server and have this questionCan you please explain and help me to fix it?

426