You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@senssoft.apache.org by "Joshua Poore (JIRA)" <ji...@apache.org> on 2019/02/25 14:24:00 UTC

[jira] [Resolved] (SENSSOFT-338) Mocha unit tests treat 'document' and 'window' as 'Undefinied' vars

     [ https://issues.apache.org/jira/browse/SENSSOFT-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Poore resolved SENSSOFT-338.
-----------------------------------
    Resolution: Fixed

Used jsdom-global library to resolve.

easy to include, exposes DOM elements as global variables in jsdom environments. Simply invoke at script level through 'require' or 'import'. Good package, well used and has hooks that play nice with Mocha 6.

but, requires at least a 'modern' version of JSDOM SENSSOFT-339

> Mocha unit tests treat 'document' and 'window' as 'Undefinied' vars 
> --------------------------------------------------------------------
>
>                 Key: SENSSOFT-338
>                 URL: https://issues.apache.org/jira/browse/SENSSOFT-338
>             Project: SensSoft
>          Issue Type: Bug
>          Components: UserALE.js
>    Affects Versions: UserALE.js 2.0.0
>            Reporter: Joshua Poore
>            Assignee: Joshua Poore
>            Priority: Blocker
>             Fix For: UserALE.js 2.0.0
>
>
> Results in failing unit tests, although document and window are global variables properties in deploy/prod environment (browser).
> Fix tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)