Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 11, 2024
1 parent 8524bb8 commit 8a060b9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion jsx-runtime/test/browser/jsx-runtime.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ describe('Babel jsx/jsxDEV', () => {

it('should keep ref in props', () => {
const ref = () => null;
const vnode = jsx('div', { ref });
const props = { ref };
const vnode = jsx('div', props);
expect(vnode.ref).to.equal(ref);
expect(vnode.props).to.not.equal(props);
});

it('should not copy props wen there is no ref in props', () => {
const props = { x: 'y' };
const vnode = jsx('div', props);
expect(vnode.props).to.equal(props);
});

it('should add keys', () => {
Expand Down

0 comments on commit 8a060b9

Please sign in to comment.