Skip to content

Commit

Permalink
add DataTransfer constructor check in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Dec 24, 2023
1 parent 60a12d6 commit 2cba0be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/unit-global/web.structured-clone.js
Expand Up @@ -435,7 +435,7 @@ QUnit.module('structuredClone', () => {
});

// FileList
if (fromSource('new File(["test"], "foo.txt")') && fromSource('"items" in DataTransfer.prototype')) QUnit.test('FileList', assert => {
if (fromSource('new File(["test"], "foo.txt")') && fromSource('new DataTransfer() && "items" in DataTransfer.prototype')) QUnit.test('FileList', assert => {
const transfer = new DataTransfer();
transfer.items.add(new File(['test'], 'foo.txt'));
cloneObjectTest(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-pure/web.structured-clone.js
Expand Up @@ -445,7 +445,7 @@ QUnit.module('structuredClone', () => {
});

// FileList
if (fromSource('new File(["test"], "foo.txt")') && fromSource('"items" in DataTransfer.prototype')) QUnit.test('FileList', assert => {
if (fromSource('new File(["test"], "foo.txt")') && fromSource('new DataTransfer() && "items" in DataTransfer.prototype')) QUnit.test('FileList', assert => {
const transfer = new DataTransfer();
transfer.items.add(new File(['test'], 'foo.txt'));
cloneObjectTest(
Expand Down

0 comments on commit 2cba0be

Please sign in to comment.