Skip to content

Commit

Permalink
Add a test.
Browse files Browse the repository at this point in the history
Disable/hide the animated/graphic solution display if the game-variant rules do not match 8cols+4reserves freecell
  • Loading branch information
shlomif committed Apr 7, 2024
1 parent 5c5e108 commit 35811a1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions fc-solve/site/wml/src/ts/tests/fcs-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ function my_func(qunit: QUnit, _my_mod, my_callback: () => void) {
},
);

const FCS_ES_FILLED_BY_KINGS_ONLY: number = 1;

qunit.test("FC_Solve user_get_empty_stacks_filled_by #1", (assert) => {
assert.expect(1);

Expand All @@ -450,6 +452,30 @@ function my_func(qunit: QUnit, _my_mod, my_callback: () => void) {
);
});

qunit.test(
"FC_Solve user_get_empty_stacks_filled_by after CLI flag",
(assert) => {
assert.expect(1);

const instance: w.FC_Solve = new FC_Solve({
module_wrapper,
cmd_line_preset: "default",
dir_base: "fcs4",
set_status_callback: () => {
return;
},
string_params: "--empty-stacks-filled-by kings",
});

// TEST
assert.equal(
instance.get_empty_stacks_filled_by(),
FCS_ES_FILLED_BY_KINGS_ONLY,
"get_empty_stacks_filled_by() returns the modified value after command line.",
);
},
);

qunit.test("FC_Solve deal_ms_fc_board", (assert) => {
assert.expect(2);

Expand Down

0 comments on commit 35811a1

Please sign in to comment.