Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

fix(TestBed): TestBed toNodeList and whitespace #1262

Closed
@ofagbemi

Description

@ofagbemi

I was using the TestBed class and found that the rootElement member wasn't being set properly. After some searching, I found that the problem was with the toNodeList function and the string I was passing to the TestBed's compile function:

String html => '''
  <component>
    <some-directive></some-directive>
  </component>
''';

The node list returned by toNodeList looked something like this

[        
, component,          ]

It looks like toNodeList doesn't play well with whitespace. I got around it by just trimming the string first, but I don't know if that could introduce any other issues down the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions