Skip to content

Commit

Permalink
docs: unified test names
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Dec 7, 2023
1 parent 2c90cc2 commit dd1429c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/manual/references/contributing/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,20 +313,22 @@ 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:

```ts, ignore
```ts
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 dd1429c

Please sign in to comment.