fix(gate): empty memory phase shows a notice and auto-advances instead of an empty checklist
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const test = require("node:test");
|
||||
const assert = require("node:assert");
|
||||
const { shouldSkipEmptyDecide } = require("../../tht-gate.js");
|
||||
|
||||
test("skips the widget only when empty AND allow_empty AND advance", () => {
|
||||
assert.equal(shouldSkipEmptyDecide({ meritCount: 0, allowEmpty: true, advance: true }), true);
|
||||
});
|
||||
|
||||
test("does not skip when there are merito options", () => {
|
||||
assert.equal(shouldSkipEmptyDecide({ meritCount: 2, allowEmpty: true, advance: true }), false);
|
||||
});
|
||||
|
||||
test("does not skip when allow_empty is false or advance is false", () => {
|
||||
assert.equal(shouldSkipEmptyDecide({ meritCount: 0, allowEmpty: false, advance: true }), false);
|
||||
assert.equal(shouldSkipEmptyDecide({ meritCount: 0, allowEmpty: true, advance: false }), false);
|
||||
});
|
||||
Reference in New Issue
Block a user