summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-11-25 02:23:03 +0100
committerGitHub <noreply@github.com>2021-11-25 02:23:03 +0100
commit1193d46485db35a1161e85515795340240a64201 (patch)
tree946214a138b81d10b4c382f31c4e5315150ec098 /cli/tests
parente68a241946f8fd6602b9d1a99c4b8fa7ead159ef (diff)
tests: add 'await' to all invocations of 'assertRejects' (#12893)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/buffer_test.ts2
-rw-r--r--cli/tests/unit/testing_test.ts10
-rw-r--r--cli/tests/unit/webcrypto_test.ts4
3 files changed, 8 insertions, 8 deletions
diff --git a/cli/tests/unit/buffer_test.ts b/cli/tests/unit/buffer_test.ts
index 34116e5ce..a94bb72b2 100644
--- a/cli/tests/unit/buffer_test.ts
+++ b/cli/tests/unit/buffer_test.ts
@@ -301,7 +301,7 @@ Deno.test(async function bufferReadFrom() {
const fub = new Uint8Array(testString.length);
await empty(b, s, fub);
}
- assertRejects(async function () {
+ await assertRejects(async function () {
await new Deno.Buffer().readFrom(null!);
});
});
diff --git a/cli/tests/unit/testing_test.ts b/cli/tests/unit/testing_test.ts
index de3da77aa..7aa55e2c1 100644
--- a/cli/tests/unit/testing_test.ts
+++ b/cli/tests/unit/testing_test.ts
@@ -80,8 +80,8 @@ Deno.test(function nameOfTestCaseCantBeEmpty() {
);
});
-Deno.test(function invalidStepArguments(t) {
- assertRejects(
+Deno.test(async function invalidStepArguments(t) {
+ await assertRejects(
async () => {
// deno-lint-ignore no-explicit-any
await (t as any).step("test");
@@ -90,7 +90,7 @@ Deno.test(function invalidStepArguments(t) {
"Expected function for second argument.",
);
- assertRejects(
+ await assertRejects(
async () => {
// deno-lint-ignore no-explicit-any
await (t as any).step("test", "not a function");
@@ -99,7 +99,7 @@ Deno.test(function invalidStepArguments(t) {
"Expected function for second argument.",
);
- assertRejects(
+ await assertRejects(
async () => {
// deno-lint-ignore no-explicit-any
await (t as any).step();
@@ -108,7 +108,7 @@ Deno.test(function invalidStepArguments(t) {
"Expected a test definition or name and function.",
);
- assertRejects(
+ await assertRejects(
async () => {
// deno-lint-ignore no-explicit-any
await (t as any).step(() => {});
diff --git a/cli/tests/unit/webcrypto_test.ts b/cli/tests/unit/webcrypto_test.ts
index 7108e060b..5087c7076 100644
--- a/cli/tests/unit/webcrypto_test.ts
+++ b/cli/tests/unit/webcrypto_test.ts
@@ -521,7 +521,7 @@ Deno.test(async function testHkdfDeriveBitsWithLargeKeySize() {
false,
["deriveBits"],
);
- assertRejects(
+ await assertRejects(
() =>
crypto.subtle.deriveBits(
{
@@ -705,7 +705,7 @@ Deno.test(async function testDecryptWithInvalidIntializationVector() {
data,
);
const initVector2 = crypto.getRandomValues(new Uint8Array(16));
- assertRejects(async () => {
+ await assertRejects(async () => {
await crypto.subtle.decrypt(
{ name: "AES-CBC", iv: initVector2 },
key,