How to use the inferno-vnode-flags.ChildFlags.HasKeyedChildren function in inferno-vnode-flags

To help you get started, we’ve selected a few inferno-vnode-flags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infernojs / inferno / packages / inferno-create-element / __tests__ / validations.spec.jsx View on Github external
it('Should if there is one that cannot be keyed for example array', () => {
        const errorNode = (
          <div>
            {createTextVNode('foo', 'foo')}
            {['1', '2']}
          </div>
        );

        expect(() =&gt; render(errorNode, container)).toThrowError(
          'Inferno Error: Encountered ARRAY in mount, array must be flattened, or normalize used. Location: \n&gt;&gt; Array(1,2)\n&gt;&gt; <div>'
        );
      });
</div>