Skip to content

Commit 131fbbe

Browse files
authored
docs: Update README (#87)
1 parent 01bbe1a commit 131fbbe

File tree

3 files changed

+133
-22
lines changed

3 files changed

+133
-22
lines changed

README.md

Lines changed: 82 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,70 @@
1-
![vest logo](./icon.png)
1+
<!-- ![vest logo](./icon.png) -->
22

3-
# vest
3+
# ![vest logo](./docs/assets/vest-favicon.png) vest
44

5-
A unit testing library for Godot.
5+
[![License](https://img.shields.io/github/license/foxssake/vest)](https://github.com/foxssake/vest/blob/main/LICENSE)
6+
[![GitHub Release](https://img.shields.io/github/v/release/foxssake/vest)](https://github.com/foxssake/vest/releases)
7+
[![Documentation](https://img.shields.io/badge/Docs-github.io-blue)](https://foxssake.github.io/vest/)
8+
[![Discord](https://img.shields.io/discord/1253434107656933447?logo=discord&label=Discord)](https://discord.gg/xWGh4GskG5)
9+
[![ko-fi](https://img.shields.io/badge/Support%20on-ko--fi-ff5e5b?logo=ko-fi)](https://ko-fi.com/T6T8WZD0W)
10+
11+
A unit testing library for [Godot].
612

713
## Features
814

9-
* Define test suites
10-
* Both with `define()` and with class methods
11-
* Assert library
12-
* Parametrized tests
13-
* Mocks
14-
* Benchmarks
15-
* Generate reports in TAP
16-
* In-editor UI for running tests
15+
* ✨ Define tests with test methods or programmatically with `define()`
16+
* 📝 Parameterized tests to conveniently define multiple tests
17+
* 🎭 Mock classes dynamically, for simpler unit testing
18+
* ⚡ Run benchmarks, to find the best performing implementations
19+
* 🗒️ Generate reports in [TAP] format, to integrate with other test harnesses
20+
* ▶️ In-editor UI for convenient testing
21+
* 🤖 Support for running in CI
22+
23+
## Overview
24+
25+
A testing addon for [Godot], *vest* aims to bring all the features of a
26+
full-fledged testing framework, while staying as lightweight and nonintrusive
27+
as possible.
28+
29+
Tests written with *vest* look as follows:
30+
31+
```gdscript
32+
extends VestTest
33+
34+
# Specify name shown in reports
35+
func get_suite_name() -> String:
36+
return "pow()"
37+
38+
# With define():
39+
func suite():
40+
test("exp 0 should return 1", func():
41+
expect_equal(1, pow(128, 0))
42+
)
43+
test("exp 1 should return input", func():
44+
expect_equal(128, pow(128, 128))
45+
)
46+
47+
# With test methods:
48+
func test_exp_0_should_return_1():
49+
expect_equal(1, pow(128, 0))
50+
51+
func test_exp_1_should_return_inpt():
52+
expect_equal(128, pow(128, 128))
53+
```
54+
55+
## Install
56+
57+
<!-- TODO: Update after release -->
58+
* [Godot AssetLibrary](https://godotengine.org/asset-library/asset?filter=vest&category=&godot_version=&cost=&sort=updated)
59+
* [GitHub release](https://github.com/foxssake/vest/releases)
60+
* [Source](https://github.com/foxssake/vest/archive/refs/heads/main.zip)
61+
62+
## Usage
63+
64+
Extensive documentation can be found at the [vest site]. A good starting point
65+
is the [Getting started] guide.
66+
67+
*Examples* are included in the [`examples/`] folder and in the documentation.
1768

1869
## Compatibility
1970

@@ -23,3 +74,23 @@ Godot v4.1.4 and up
2374

2475
*vest* is licensed under the [MIT License](LICENSE).
2576

77+
## Issues
78+
79+
In case of any issues, comments, or questions, please feel free to [open an issue]!
80+
81+
## Funding
82+
83+
If you've found *vest* useful, feel free to fund us on ko-fi:
84+
85+
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/T6T8WZD0W)
86+
87+
Donations are always appreciated and taken as gratitude for the work that has
88+
already been done.
89+
90+
91+
[Godot]: https://godotengine.org/
92+
[TAP]: https://testanything.org/
93+
[vest site]: https://foxssake.github.io/vest/latest/
94+
[Getting started]: https://foxssake.github.io/vest/latest/getting-started/installing-vest/
95+
[`examples/`]: https://github.com/foxssake/vest/tree/main/examples
96+
[open an issue]: https://github.com/foxssake/vest/issues

addons/vest/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="vest"
44
description="A unit testing library for Godot"
55
author="Tamás Gálffy"
6-
version="0.22.13"
6+
version="0.22.14"
77
script="plugin.gd"

docs/index.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,58 @@
1-
# Index
1+
[![License](https://img.shields.io/github/license/foxssake/vest)](https://github.com/foxssake/vest/blob/main/LICENSE)
2+
[![GitHub Release](https://img.shields.io/github/v/release/foxssake/vest)](https://github.com/foxssake/vest/releases)
3+
[![Documentation](https://img.shields.io/badge/Docs-github.io-blue)](https://foxssake.github.io/vest/)
4+
[![Discord](https://img.shields.io/discord/1253434107656933447?logo=discord&label=Discord)](https://discord.gg/xWGh4GskG5)
5+
[![ko-fi](https://img.shields.io/badge/Support%20on-ko--fi-ff5e5b?logo=ko-fi)](https://ko-fi.com/T6T8WZD0W)
26

3-
*Vest* is a unit testing library for Godot.
7+
A unit testing library for [Godot].
48

59
## Features
610

7-
* Define test suites
8-
* Both with `define()` and with class methods
9-
* Assert library
10-
* Parametrized tests
11-
* Mocks
12-
* Benchmarks
13-
* Generate reports in TAP
14-
* In-editor UI for running tests
11+
* ✨ Define tests with test methods or programmatically with `define()`
12+
* 📝 Parameterized tests to conveniently define multiple tests
13+
* 🎭 Mock classes dynamically, for simpler unit testing
14+
* ⚡ Run benchmarks, to find the best performing implementations
15+
* 🗒️ Generate reports in [TAP] format, to integrate with other test harnesses
16+
* ▶️ In-editor UI for convenient testing
17+
* 🤖 Support for running in CI
18+
19+
## Overview
20+
21+
A testing addon for [Godot], *vest* aims to bring all the features of a
22+
full-fledged testing framework, while staying as lightweight and nonintrusive
23+
as possible.
24+
25+
Tests written with *vest* look as follows:
26+
27+
```gdscript
28+
extends VestTest
29+
30+
# Specify name shown in reports
31+
func get_suite_name() -> String:
32+
return "pow()"
33+
34+
# With define():
35+
func suite():
36+
test("exp 0 should return 1", func():
37+
expect_equal(1, pow(128, 0))
38+
)
39+
test("exp 1 should return input", func():
40+
expect_equal(128, pow(128, 128))
41+
)
42+
43+
# With test methods:
44+
func test_exp_0_should_return_1():
45+
expect_equal(1, pow(128, 0))
46+
47+
func test_exp_1_should_return_inpt():
48+
expect_equal(128, pow(128, 128))
49+
```
50+
1551

1652
## Compatibility
1753

1854
Godot v4.1.4 and up
55+
56+
57+
[Godot]: https://godotengine.org/
58+
[TAP]: https://testanything.org/

0 commit comments

Comments
 (0)