Skip to content

Commit 19f584f

Browse files
authored
Add test for required requests field (#53925)
1 parent f2c14c0 commit 19f584f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

digital-credentials/create.tentative.https.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,11 @@
217217
await promise_rejects_js(t, TypeError, navigator.credentials.create(options));
218218
}
219219
}, "Mediation is required to create a DigitalCredential.");
220+
221+
promise_test(async (t) => {
222+
await promise_rejects_js(
223+
t,
224+
TypeError,
225+
navigator.credentials.create({digital: {}}));
226+
}, "`requests` field is required in the options object.");
220227
</script>

digital-credentials/get.tentative.https.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,11 @@
263263
);
264264
}
265265
}, "Throws TypeError when request data is not JSON stringifiable.");
266+
267+
promise_test(async (t) => {
268+
await promise_rejects_js(
269+
t,
270+
TypeError,
271+
navigator.credentials.get({digital: {}}));
272+
}, "`requests` field is required in the options object.");
266273
</script>

0 commit comments

Comments
 (0)