Skip to content

Commit 354cd50

Browse files
committed
Bug 1978866 [wpt PR 53925] - Add tests for required requests field in Digital Credentials API get() and create() requests, a=testonly
Automatic update from web-platform-tests Add test for required `requests` field (#53925) -- wpt-commits: 19f584f069175b76951bceb68258418001b20073 wpt-pr: 53925 UltraBlame original commit: e541eea7769dce383446ce9f024b3ba4e122bf14
1 parent c22cabc commit 354cd50

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

testing/web-platform/tests/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>

testing/web-platform/tests/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)