summaryrefslogtreecommitdiff
path: root/std/testing/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'std/testing/README.md')
-rw-r--r--std/testing/README.md16
1 files changed, 6 insertions, 10 deletions
diff --git a/std/testing/README.md b/std/testing/README.md
index e2bd90b24..8d02f9d79 100644
--- a/std/testing/README.md
+++ b/std/testing/README.md
@@ -92,11 +92,9 @@ Using `assertThrows()`:
```ts
test(function doesThrow(): void {
- assertThrows(
- (): void => {
- throw new TypeError("hello world!");
- }
- );
+ assertThrows((): void => {
+ throw new TypeError("hello world!");
+ });
assertThrows((): void => {
throw new TypeError("hello world!");
}, TypeError);
@@ -111,11 +109,9 @@ test(function doesThrow(): void {
// This test will not pass
test(function fails(): void {
- assertThrows(
- (): void => {
- console.log("Hello world");
- }
- );
+ assertThrows((): void => {
+ console.log("Hello world");
+ });
});
```