summaryrefslogtreecommitdiff
path: root/std/testing/test.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-11-14 05:42:34 +1100
committerRy Dahl <ry@tinyclouds.org>2019-11-13 13:42:34 -0500
commit9837d324a7c3f5e1c850dadabfd670edad4aa85b (patch)
treea81de8e9e15f64edd2ccb6e30a351ca3b2305035 /std/testing/test.ts
parent279191ad9447c66fe1278589a7be242d035bb68b (diff)
Update to TypeScript 3.7 (#3275)
and update to prettier 1.19 Also, update `assert()` and remove not null assertions where possibly in `cli`. Closes #3273
Diffstat (limited to 'std/testing/test.ts')
-rw-r--r--std/testing/test.ts20
1 files changed, 8 insertions, 12 deletions
diff --git a/std/testing/test.ts b/std/testing/test.ts
index 93233f7cc..dd6d772f6 100644
--- a/std/testing/test.ts
+++ b/std/testing/test.ts
@@ -51,12 +51,10 @@ test(function testingAssertNotStrictEqual(): void {
test(function testingDoesThrow(): void {
let count = 0;
- assertThrows(
- (): void => {
- count++;
- throw new Error();
- }
- );
+ assertThrows((): void => {
+ count++;
+ throw new Error();
+ });
assert(count === 1);
});
@@ -64,12 +62,10 @@ test(function testingDoesNotThrow(): void {
let count = 0;
let didThrow = false;
try {
- assertThrows(
- (): void => {
- count++;
- console.log("Hello world");
- }
- );
+ assertThrows((): void => {
+ count++;
+ console.log("Hello world");
+ });
} catch (e) {
assert(e.message === "Expected function to throw.");
didThrow = true;