Skip to content

Commit afddae7

Browse files
camertronkeithamus
andauthored
Update test/test.js
Co-authored-by: Keith Cirkel <[email protected]>
1 parent 3412dc6 commit afddae7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,13 @@ describe('clipboard-copy element', function () {
162162

163163
const button = document.querySelector('clipboard-copy')
164164
button.setAttribute('aria-disabled', 'true')
165+
let fired = false;
166+
document.addEventListener('clipboard-copy', () => { fired = true }, { once: true })
167+
165168
button.click()
166-
167-
const text = await whenCopied
169+
170+
await new Promise(setTimeout)
171+
assert.equal(fired, false);
168172
assert.equal(null, text)
169173
})
170174
})

0 commit comments

Comments
 (0)