Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test is broken due to NullException #5

Open
naxxfish opened this issue Dec 9, 2017 · 0 comments
Open

Test is broken due to NullException #5

naxxfish opened this issue Dec 9, 2017 · 0 comments

Comments

@naxxfish
Copy link

naxxfish commented Dec 9, 2017

    this.username = user.username;
                         ^

TypeError: Cannot read property 'username' of null
    at new wmic (E:\dev\ohwm2graphite\ohwm2graphite\node_modules\wmi-client\lib\wmic.js:20:26)
    at Object.<anonymous> (E:\dev\ohwm2graphite\ohwm2graphite\node_modules\wmi-client\test\index.js:5:11)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! Test failed.  See above for more details.

The getUsername function returns null if it's provided with an empty string or null, therefore the test script (which passes username: null in it's options) gets null back, and therefore a call to user.username in wmic.js subsequently fails

@naxxfish naxxfish changed the title Test is broken Test is broken due to NullException Dec 9, 2017
NAlexandrov added a commit that referenced this issue May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant