Skip to content

Commit

Permalink
fix: JSDOM no longer calls setAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 23, 2020
1 parent d05c432 commit c7ebfe1
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions packages/react-dom/src/__tests__/ReactDOMInput-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1579,25 +1579,13 @@ describe('ReactDOMInput', () => {
container,
);

if (disableInputAttributeSyncing) {
expect(log).toEqual([
'set attribute type',
'set attribute min',
'set attribute max',
'set attribute step',
'set property value',
]);
} else {
expect(log).toEqual([
'set attribute type',
'set attribute min',
'set attribute max',
'set attribute step',
'set property value',
'set attribute value',
'set attribute checked',
]);
}
expect(log).toEqual([
'set attribute type',
'set attribute min',
'set attribute max',
'set attribute step',
'set property value',
]);
});

it('sets value properly with type coming later in props', () => {
Expand Down Expand Up @@ -1662,8 +1650,6 @@ describe('ReactDOMInput', () => {
expect(log).toEqual([
'node.setAttribute("type", "date")',
'node.value = "1980-01-01"',
'node.setAttribute("value", "1980-01-01")',
'node.setAttribute("checked", "")',
]);
}
});
Expand Down

0 comments on commit c7ebfe1

Please sign in to comment.