Skip to content

Commit

Permalink
docs: improve tutorials and homepage (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel authored Jul 5, 2024
1 parent c6984d8 commit 77d406c
Show file tree
Hide file tree
Showing 22 changed files with 355 additions and 136 deletions.
Binary file removed .github/assets/readme/assert-node.png
Binary file not shown.
Binary file removed .github/assets/readme/assert-poku.png
Binary file not shown.
1 change: 0 additions & 1 deletion .github/assets/readme/bun.svg

This file was deleted.

1 change: 0 additions & 1 deletion .github/assets/readme/deno.svg

This file was deleted.

1 change: 0 additions & 1 deletion .github/assets/readme/node-js.svg

This file was deleted.

Binary file removed .github/assets/readme/parallel.png
Binary file not shown.
3 changes: 0 additions & 3 deletions .github/assets/readme/plus.svg

This file was deleted.

Binary file removed .github/assets/readme/sequential.png
Binary file not shown.
1 change: 0 additions & 1 deletion .github/assets/readme/typescript.svg

This file was deleted.

4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
interval: 'weekly'
- package-ecosystem: 'npm'
directory: '/website'
schedule:
interval: 'daily'
interval: 'weekly'
17 changes: 15 additions & 2 deletions website/docs/roadmaps/beginner.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
---
title: Beginner
description: From a basic assertion test to its execution.
tags: [assert, assertion, tutorial, beginner, roadmap]
---

import Junior from '@site/static/img/junior.svg';

<div className='title-section'>
<aside>

# Beginner Tutorial

<Junior height='256' />
- From a basic assertion test to its execution.

</aside>
<aside>
<Junior className='logo' height='128' />
</aside>
</div>

<hr />

## Assertions

Expand All @@ -28,7 +41,7 @@ Each _tester_ may have a different way of doing this, but the end is usually the

### In Practice

#### Understanding ()
#### Understanding conditions and assertions

In **JavaScript**, we can compare using `===`, right?

Expand Down
45 changes: 16 additions & 29 deletions website/docs/roadmaps/mid-level.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
---
tags: [assert, assertion, tutorial, mid level, roadmap]
title: Good Practices
description: Organizing tests for different needs, requirements and approaches.
tags: [assert, assertion, test, describe, it, tutorial, mid level, roadmap]
---

import MidLevel from '@site/static/img/mid-level.svg';

# Mid Level Tutorial
<div className='title-section'>
<aside>

<MidLevel height='256' />
# Good Practices

- Organizing tests for different needs, requirements and approaches.

</aside>
<aside>
<MidLevel className='logo' height='128' />
</aside>
</div>

<hr />

## Organizing the tests

Expand Down Expand Up @@ -164,32 +177,6 @@ test(async () => {

<hr />

## Running "Promise Tests" in parallel in the same file

```js
import { test, assert, sleep } from 'poku';

test(async () => {
const actual = 1;
const expected = 1;

await sleep(2000);

assert.strictEqual(actual, expected);
});

test(async () => {
const actual = 2;
const expected = 2;

await sleep(1000);

assert.strictEqual(actual, expected);
});
```

<hr />

## Running "Promise Tests" one-by-one in the same file (await top-level)

```js
Expand Down
9 changes: 9 additions & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ const sidebars: SidebarsConfig = {
},
items: [{ type: 'autogenerated', dirName: 'examples' }],
},
{
type: 'category',
label: 'Quick Tutorials',
collapsed: true,
link: {
type: 'generated-index',
},
items: [{ type: 'autogenerated', dirName: 'roadmaps' }],
},
],
};

Expand Down
Loading

0 comments on commit 77d406c

Please sign in to comment.