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
0 commit comments