Skip to main content

BinderTestUtils

Helpers for specs that register binders in a ServiceBag with tags unique to each spec.

Functions​

makeTrackingClass​

BinderTestUtils.makeTrackingClass() → TrackingClass

Returns a bound class that records its instance and whether it was destroyed.

noopConstructor​

BinderTestUtils.noopConstructor() → table

A constructor that does nothing but return an empty table.

setup​

BinderTestUtils.setup() → {...}

Builds a controller that adds binders, initializes them through a ServiceBag, and cleans up on Destroy.

Show raw api
{
    "functions": [
        {
            "name": "makeTrackingClass",
            "desc": "Returns a bound class that records its instance and whether it was destroyed.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "TrackingClass"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/binder/src/Shared/BinderTestUtils.lua"
            }
        },
        {
            "name": "noopConstructor",
            "desc": "A constructor that does nothing but return an empty table.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 48,
                "path": "src/binder/src/Shared/BinderTestUtils.lua"
            }
        },
        {
            "name": "setup",
            "desc": "Builds a controller that adds binders, initializes them through a [ServiceBag], and cleans up on `Destroy`.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ ... }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 57,
                "path": "src/binder/src/Shared/BinderTestUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "BinderTestUtils",
    "desc": "Helpers for specs that register binders in a [ServiceBag] with tags unique to each spec.",
    "source": {
        "line": 7,
        "path": "src/binder/src/Shared/BinderTestUtils.lua"
    }
}