Skip to content

Commit a10aadc

Browse files
committed
Add awaits in the tests
1 parent 1a12abb commit a10aadc

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

testing/snapshot_test.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -893,24 +893,24 @@ Deno.test(
893893
}),
894894
);
895895

896-
Deno.test("assertInlineSnapshot()", (t) => {
897-
assertInlineSnapshot(
896+
Deno.test("assertInlineSnapshot()", async (t) => {
897+
await assertInlineSnapshot(
898898
t,
899899
{ a: 1, b: 2 },
900900
`{
901901
a: 1,
902902
b: 2,
903903
}`,
904904
);
905-
assertInlineSnapshot(
905+
await assertInlineSnapshot(
906906
t,
907907
new TestClass(),
908908
`TestClass {
909909
a: 1,
910910
b: 2,
911911
}`,
912912
);
913-
assertInlineSnapshot(
913+
await assertInlineSnapshot(
914914
t,
915915
map,
916916
`Map(3) {
@@ -919,7 +919,7 @@ Deno.test("assertInlineSnapshot()", (t) => {
919919
[Function (anonymous)] => "World!",
920920
}`,
921921
);
922-
assertInlineSnapshot(
922+
await assertInlineSnapshot(
923923
t,
924924
new Set([1, 2, 3]),
925925
`Set(3) {
@@ -928,15 +928,15 @@ Deno.test("assertInlineSnapshot()", (t) => {
928928
3,
929929
}`,
930930
);
931-
assertInlineSnapshot(
931+
await assertInlineSnapshot(
932932
t,
933933
{ fn() {} },
934934
`{
935935
fn: [Function: fn],
936936
}`,
937937
);
938-
assertInlineSnapshot(t, function fn() {}, `[Function: fn]`);
939-
assertInlineSnapshot(
938+
await assertInlineSnapshot(t, function fn() {}, `[Function: fn]`);
939+
await assertInlineSnapshot(
940940
t,
941941
[1, 2, 3],
942942
`[
@@ -945,7 +945,7 @@ Deno.test("assertInlineSnapshot()", (t) => {
945945
3,
946946
]`,
947947
);
948-
assertInlineSnapshot(t, "hello world", `"hello world"`);
948+
await assertInlineSnapshot(t, "hello world", `"hello world"`);
949949
});
950950

951951
Deno.test("assertInlineSnapshot() formats", async () => {
@@ -956,15 +956,15 @@ Deno.test("assertInlineSnapshot() formats", async () => {
956956
await Deno.writeTextFile(
957957
formatTestFile,
958958
`import { assertInlineSnapshot } from "${SNAPSHOT_MODULE_URL}";
959-
Deno.test("format", (t) => {
960-
assertInlineSnapshot( t, "hello world", \`CREATE\` );
959+
Deno.test("format", async (t) => {
960+
await assertInlineSnapshot( t, "hello world", \`CREATE\` );
961961
});`,
962962
);
963963
await Deno.writeTextFile(
964964
noFormatTestFile,
965965
`import { assertInlineSnapshot } from "${SNAPSHOT_MODULE_URL}";
966-
Deno.test("no format", (t) => {
967-
assertInlineSnapshot( t, "hello world", \`CREATE\`, { format: false } );
966+
Deno.test("no format", async (t) => {
967+
await assertInlineSnapshot( t, "hello world", \`CREATE\`, { format: false } );
968968
});`,
969969
);
970970

@@ -983,15 +983,15 @@ Deno.test("no format", (t) => {
983983
assertEquals(
984984
await Deno.readTextFile(formatTestFile),
985985
`import { assertInlineSnapshot } from "${SNAPSHOT_MODULE_URL}";
986-
Deno.test("format", (t) => {
987-
assertInlineSnapshot(t, "hello world", \`"hello world"\`);
986+
Deno.test("format", async (t) => {
987+
await assertInlineSnapshot(t, "hello world", \`"hello world"\`);
988988
});\n`,
989989
);
990990
assertEquals(
991991
await Deno.readTextFile(noFormatTestFile),
992992
`import { assertInlineSnapshot } from "${SNAPSHOT_MODULE_URL}";
993-
Deno.test("no format", (t) => {
994-
assertInlineSnapshot( t, "hello world", \`"hello world"\`, { format: false } );
993+
Deno.test("no format", async (t) => {
994+
await assertInlineSnapshot( t, "hello world", \`"hello world"\`, { format: false } );
995995
});`,
996996
);
997997
} finally {

0 commit comments

Comments
 (0)