Skip to content

Commit

Permalink
chore: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshah98 committed Dec 2, 2023
1 parent 4047299 commit 0c15aab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/dom/test/serialize-inputs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('serializeInputs', () => {
<textarea id="feedback"></textarea>
</form>
`);

platforms.forEach((platform) => {
const dom = platformDOM(platform);
dom.querySelector('#name').value = 'Bob Boberson';
Expand All @@ -62,6 +63,8 @@ describe('serializeInputs', () => {
}
});
cache[platform].$ = parseDOM(serializeDOM(), platform);
// save DOM, only after serializing it
// clone DOM, so that during next platform iteration, serializeDOM doesn't change current original DOM
cache[platform].dom = platform === 'shadow' ? dom : dom.cloneNode(true);
});
// interact with the inputs to update properties (does not update attributes)
Expand Down

0 comments on commit 0c15aab

Please sign in to comment.