@@ -21,6 +21,26 @@ describe("Action select", () => {
2121 } )
2222} )
2323
24+ describe ( "Actions equals" , ( ) => {
25+ it ( "empty" , async ( ) => {
26+ const testClient = await TestClient . start ( "tests/mocks" , "actions.qsps" , StartingLocation . mkCustom ( "startEmptyActions" ) )
27+ // fix(actionsEqual): the function does not respond if you run the game without actions
28+ await TestClient . actionsEqual ( testClient , [
29+ { name : "start" , image : "" } ,
30+ ] )
31+ await TestClient . select ( testClient , "start" )
32+ await TestClient . actionsEqual ( testClient , [ ] )
33+ } )
34+ it ( "Three actions" , async ( ) => {
35+ const testClient = await TestClient . start ( "tests/mocks" , "actions.qsps" )
36+ await TestClient . actionsEqual ( testClient , [
37+ { name : "First action" , image : "" } ,
38+ { name : "Second action" , image : "" } ,
39+ { name : "Third action" , image : "" } ,
40+ ] )
41+ } )
42+ } )
43+
2444test ( "IncLib" , async ( ) => {
2545 const testClient = await TestClient . start ( "tests/mocks" , "game.qsps" )
2646 await TestClient . select ( testClient , "start" )
0 commit comments