From 18b8ec9e080e2e886f582d210e97cc472cc61a2b Mon Sep 17 00:00:00 2001 From: Peter Lu Date: Tue, 5 Mar 2024 10:30:06 -0800 Subject: [PATCH] update docs --- README.md | 6 +++++- docs/getting-started/installation.md | 10 ++++++---- docs/getting-started/running-tests.md | 13 +++++++++++-- docs/index.md | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8bdb843..77d8a6d 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,21 @@
 
-TestEZ can run within Roblox itself, as well as inside [Lemur](https://github.com/LPGhatguy/Lemur) for testing on CI systems. +TestEZ can run within Roblox itself. We use TestEZ at Roblox for testing our apps, in-game core scripts, built-in Roblox Studio plugins, as well as libraries like [Roact](https://github.com/Roblox/roact) and [Rodux](https://github.com/Roblox/rodux). It provides an API that can run all of your tests with a single method call as well as a more granular API that exposes each step of the pipeline. +TestEZ can also run inside [Lemur](https://github.com/LPGhatguy/Lemur) for testing on CI systems however Lemur is no longer supported so this flow is not recommended. + ## Inspiration and Prior Work The `describe` and `it` syntax in TestEZ is based on the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) methodology, notably as implemented in RSpec (Ruby), busted (Lua), Mocha (JavaScript), and Ginkgo (Go). The `expect` syntax is based on Chai, a JavaScript assertion library commonly used with Mocha. Similar expectation systems are also used in RSpec and Ginkgo, with slightly different syntax. +[Jest](https://github.com/Roblox/jest-roblox) is a very similar testing framework based on [https://jestjs.io/](https://jestjs.io/) however it's currently not available for use by Roblox developers (we're working on it) so TestEZ is still the recommended testing framework. + ## Contributing Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for information. diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 3311572..7e819c0 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -3,9 +3,11 @@ ### Method 1: Rojo (Roblox) * Copy the `src` directory into your codebase * Rename the folder to `TestEZ` -* Use [Rojo](https://github.com/LPGhatguy/rojo) to sync the files into a place +* Use [Rojo](https://github.com/rojo-rbx/rojo) to sync the files into a place -### Method 2: Lemur (CI Systems) -You can use [Lemur](https://github.com/LPGhatguy/Lemur) paired together with a regular Lua 5.1 interpreter to run tests written with TestEZ. +### Method 2: Wally (Roblox) +* TestEZ is available with [Wally](https://wally.run/package/roblox/testez) +* [Rojo](https://github.com/rojo-rbx/rojo) is prerequisite for [wally](https://wally.run/install) -This is the best approach when testing Roblox Lua libraries using existing continuous integration systems like Travis-CI. We use this technique to run tests for [Rodux](https://github.com/Roblox/Rodux) and other libraries. \ No newline at end of file +### Method 3: Lemur (CI Systems) +You can use [Lemur](https://github.com/LPGhatguy/Lemur) paired together with a regular Lua 5.1 interpreter to run tests written with TestEZ. Note that Lemur is no longer supported. \ No newline at end of file diff --git a/docs/getting-started/running-tests.md b/docs/getting-started/running-tests.md index 342466b..46e8fd9 100644 --- a/docs/getting-started/running-tests.md +++ b/docs/getting-started/running-tests.md @@ -6,6 +6,15 @@ local TestEZ = require() TestEZ.TestBootstrap:run({ MY_TESTS }) ``` -The method also returns information about the test run that can be used to take further action! +This will run all files post-fixed with *.spec.lua (in Rojo) that are children of `MY_TESTS` -The internals of TestEZ are being reworked, so accessing other APIs at this time isn't recommended. \ No newline at end of file +For example, you might have + +- Shared (mapped to ReplicatedStorage) + - AnimalModule + - cat.lua + - cat.spec.lua + - dog.lua + - dog.spec.lua + +then setting `MY_TESTS = game.ReplicatedStorage.Shared.AnimalModule` would run the tests in cat.spec.lua and dog.spec.lua \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 0837cd7..0490af6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,5 @@ TestEZ is a BDD-style testing framework for Roblox Lua. -We use TestEZ at Roblox for testing our apps, in-game core scripts, built-in Roblox Studio plugins, as well as libraries like [Roact](https://github.com/Roblox/roact) and [Rodux](https://github.com/Roblox/rodux). +We use TestEZ at Roblox for testing our apps, in-game core scripts, built-in Roblox Studio plugins. It provides an API that can run all of your tests with a single method call as well as a more granular API that exposes each step of the pipeline. \ No newline at end of file