yeoman-assert icon indicating copy to clipboard operation
yeoman-assert copied to clipboard

Cannot read property 'xxx' of undefined

Open azachar opened this issue 3 years ago • 1 comments

Hello,

objectContent, got Cannot read property 'xxx' of undefined on the line index.js:235:21

It is because, the tested object is not having the nested structure, thus it should not be compared.

Consider this example for instance:


 assert.objectContent(
      {},
      {
        array: [
          {
            key: "1"
          },
          {
            key: "2"
          }
        ]
      }
    );

Btw. it would be cool to display real object diff.

Cheers, Andrej

azachar avatar May 07 '21 11:05 azachar