You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had issues on a different project, so I'm not sure if this is an issue or not, but write a test anyway to be sure.
Something to this effect:
describe('resolveBEMNode',()=>{it('preserves a key prop',()=>{expect(resolveBEMNode(<divkey="foo"/>).key).toEqual('foo');});it('transfers `key` property if present',()=>{constrenderer=createRenderer();constComponent=()=>resolveBEMNode(<divkey="foo"block="bar"/>);renderer.render(<Component/>);constcomponent=renderer.getRenderOutput();expect(component.key).toBe('foo');});it('does not add superfluous `key` property if not present',()=>{constrenderer=createRenderer();constComponent=()=>resolveBEMNode(<divblock="bar"/>);renderer.render(<Component/>);constcomponent=renderer.getRenderOutput();expect(component.key).toBe(null);});});
Note: use shallow rendering instead.
The text was updated successfully, but these errors were encountered:
Had issues on a different project, so I'm not sure if this is an issue or not, but write a test anyway to be sure.
Something to this effect:
Note: use shallow rendering instead.
The text was updated successfully, but these errors were encountered: