w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to write mocha test case for html elements

I believe the issue is here-

it("should pass with correct inputs", function () {
    var processJsonObject = getNodeClickWithExpand(idElement, treeName,

The test error 'Cannot read property 'expand' of null' indicates that there is no element in the dom with id = idElement. You need to pass an element's id as a string when you are running the test. You are also not passing any value for the parameters 'treeName' and 'autoCompleteName'.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.