mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-09-21 17:04:00 +00:00
Address review on the suite and instance tests
- The instance tests run against a real Instance with a real InstanceConfig, matching the controller tests: the spies are sendTo and the server, which record what leaves the instance, so sendRcon passes through the real script command gate. The plugin's config fields are registered so the sync mode is a real field. - Shallow eq is gone and eq compares recursively; the suite is created with Framework.suite(extend_env), which hands the extension a fresh set of stubs per test, so the plugin's env.lua is only the extension. - add_player assigns continuous indexes itself. - The lua fixtures are referenced by role name: assignments take names, and ids in expectations come from the role object. The name lookup in env.R uses a fixture index rather than searching the roles. - Test names format functions as name() and methods as .name(). - Branch coverage filled in: sort tie breaking, the highest role assertion when a player has no roles, has all for the server, the by player default from game.player, deleted assignment records on initialise, set_emit_events with no argument, printing to a role with no holders, role property update validation, the assignment subscription replay, unassignment over the ipc, and a refused removal having nothing to roll back. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
e6552a39be
commit
3218351db6
@@ -96,7 +96,7 @@ t.test("class AssignmentUpdateRequest", subtest => {
|
||||
subtest.end();
|
||||
});
|
||||
|
||||
t.test("encodeRolesForLua sends each permission name once", subtest => {
|
||||
t.test("encodeRolesForLua() sends each permission name once", subtest => {
|
||||
const meta = id => new messages.RoleMetaRecord(id, id);
|
||||
const encoded = messages.encodeRolesForLua([
|
||||
new messages.RoleRecord(1, "A", ["p.one", "p.two"], meta(1)),
|
||||
|
||||
Reference in New Issue
Block a user