Skip to content

Test Harness fails when used with a widget contained typed children in an object #596

@tomdye

Description

@tomdye

Bug

Changes to framework now allow a widget to be passed an object containing typed render functions as it's children. Harness fails when you attempt to test a widget that contains another widget that uses typed children.

Given a widget with the following dom, the harness will error.

<div class='root'>
   <ChildWidget>
      {{ 
         trigger: () => <button>trigger</button>, 
         content: () => <span>hello</span>
      }}
   </ChildWidget>
</div>
    TypeError: Cannot convert undefined or null to object
      at Function.keys  <anonymous>
      at formatNode  <node_modules/@dojo/framework/testing/support/assertRender.ts:94:34>
      at <node_modules/@dojo/framework/testing/support/assertRender.ts:54:24>
      at Array.reduce  <anonymous>
      at formatDNodes  <node_modules/@dojo/framework/testing/support/assertRender.ts:35:28>
      at <node_modules/@dojo/framework/testing/support/assertRender.ts:56:30>
      at Array.reduce  <anonymous>
      at formatDNodes  <node_modules/@dojo/framework/testing/support/assertRender.ts:35:28>
      at <node_modules/@dojo/framework/testing/support/assertRender.ts:56:30>
      at Array.reduce  <anonymous>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions