Closed Alino closed 7 years ago
if I use
global.chrome = chrome
typescript gives me error error TS2304: Cannot find name 'global'.
error TS2304: Cannot find name 'global'.
but if I declare global like this
let global = {}; global.chrome = chrome
My tests will fail, because chrome is not defined on the separate file that I am writing tests for.
chrome
ok I was able to work around this by doing this
declare var global: any; global.chrome = chrome
Hi, @Alino .
global is Node.js global object. You should use window object, if you run your tests under browser.
global
window
if I use
typescript gives me error
error TS2304: Cannot find name 'global'.
but if I declare global like this
My tests will fail, because
chrome
is not defined on the separate file that I am writing tests for.