Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripting/debugging/unit-testing.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Unit Testing"
description: "Write and run unit tests for your Util Scripts using Test scripts."
description: "Write and run unit tests for your Blank Scripts using Test scripts."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really make sense. You don't write test for blank scripts.

---
import { Demos } from '/snippets/demos.jsx'

Test scripts let you write unit tests for your [Util Scripts](/scripting/protocols/util-scripts) and run them directly in the Rive editor.
Test scripts let you write unit tests for your [Blank Scripts](/scripting/protocols/util-scripts) and run them directly in the Rive editor.
Use them to verify math helpers, string utilities, or any other pure logic your scripts depend on.

Beyond validating your code, tests also serve as precise instructions for the [AI Agent](/editor/ai-agent), helping it produce code that behaves exactly as you intend.
Expand Down Expand Up @@ -32,7 +32,7 @@ Inside a case, the `expect` function is passed as an argument to your test callb
### Example

```lua
-- Load the Util that you want to create tests for
-- Load the script that you want to create tests for
local MyUtil = require('MyUtil')

function setup(test: Tester)
Expand Down
2 changes: 1 addition & 1 deletion scripting/protocols/listener-action-scripts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Use Listener Action Scripts when you need to perform side effects—such as upda

## Creating a Listener Action Script

[Create a new script](/scripting/creating-scripts) and select **Listener Action Script** as the type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the editor they are called Listener Action Scripts

[Create a new script](/scripting/creating-scripts) and select **Listener Action** as the type.

## Anatomy of a Listener Action

Expand Down
3 changes: 3 additions & 0 deletions scripting/protocols/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Rive currently ships with the following protocols, with more to come:
- [Path Effect](/scripting/protocols/path-effect-scripts) - Create custom path effects.
- [Transition Conditions](/scripting/protocols/transition-condition-scripts) - Create custom state machine transition conditions.
- [Listener Actions](/scripting/protocols/listener-action-scripts) - React to state machine listeners.
- [Blank](/scripting/protocols/util-scripts) - Share helper logic across scripts.
- [Test](/scripting/protocols/test-scripts) - Unit test your functions.
- **File Format** - Read and write a binary file format.
- **Text File Format** - Read and write a text file format.

Each protocol represents a different kind of script the Editor can generate: a converter that shapes data, a custom drawing function, a layout helper, a testing harness, a path effect you can attach to strokes, and so on.

Expand Down
2 changes: 1 addition & 1 deletion scripting/protocols/transition-condition-scripts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "Create custom state machine transitions using scripts"

## Creating a Transition Condition Script

[Create a new script](/scripting/creating-scripts) and select **Transition Condition Script** as the type.
[Create a new script](/scripting/creating-scripts) and select **Transition Condition** as the type.

## Anatomy of a Transition Condition

Expand Down
12 changes: 6 additions & 6 deletions scripting/protocols/util-scripts.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: "Util Scripts"
title: "Blank Scripts"
description: "Create helper modules to organize shared logic across your scripts."
---

Util scripts let you organize your code into small, focused modules that can be reused across multiple scripts.
Blank scripts let you organize your code into small, focused modules that can be reused across multiple scripts.
They’re ideal for math helpers, geometry utilities, color functions, or any logic that should be broken out into its own script.

## Creating a Util Script
## Creating a Blank Script

[Create a new script](/scripting/creating-scripts) and select **Util** as the type.
[Create a new script](/scripting/creating-scripts) and select **Blank** as the type.

```lua
--- Example helper function.
Expand All @@ -33,9 +33,9 @@ print(result) -- 5

```

## Utils with Custom Types
## Blank Scripts with Custom Types

Custom types defined in your Util scripts will automatically be accessible
Custom types defined in your Blank scripts will automatically be accessible
in the parent script.

```lua
Expand Down