gecko-dev/testing/web-platform/tests/web-nfc/NFCReadingEvent_constructor.https.html
kaixinjxq f8fe52794e Bug 1533678 [wpt PR 15667] - Add constructor tests for NFCErrorEvent/NFCReadingEvent, a=testonly
Automatic update from web-platform-tests
Add constructor tests for NFCErrorEvent/NFCReadingEvent (#15667)

--

wpt-commits: 9eca7476474f89226d6695b199b7fd071f10886a
wpt-pr: 15667
2019-04-01 14:42:43 +01:00

11 lines
448 B
HTML

<!DOCTYPE html>
<title>NFCReadingEvent constructor</title>
<link rel="help" href="https://w3c.github.io/web-nfc/#dom-nfcreadingevent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_equals(NFCReadingEvent.length, 2);
assert_throws(new TypeError, () => new NFCReadingEvent('message'));
}, 'NFCReadingEvent constructor without init dict');
</script>