Skip to content

Commit

Permalink
docs: unified test names (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 authored Dec 10, 2023
1 parent 5eb4002 commit c34f709
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions runtime/manual/references/contributing/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ For a better understanding of the tests, function should be correctly named as
it's prompted throughout the test command. Like:

```
test myTestFunction ... ok
foo() returns bar object ... ok
```

Example of test:
Expand All @@ -322,11 +322,14 @@ Example of test:
import { assertEquals } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
import { foo } from "./mod.ts";
Deno.test("myTestFunction", function () {
Deno.test("foo() returns bar object", function () {
assertEquals(foo(), { bar: "bar" });
});
```

Note: See [tracking issue](https://github.com/denoland/deno_std/issues/3754) for
more information.

### Top-level functions should not use arrow syntax.

Top-level functions should use the `function` keyword. Arrow syntax should be
Expand Down

0 comments on commit c34f709

Please sign in to comment.