48024506e0c2b5199bed81d90dfba26cb7f4a027
Infantry Platoon Combat
- virtual board game
- turn-based, top-down, hex grid
- platoon-level, squad-based combat
Live
Run
-
Build the Docker image
docker build -t btroops . -
Install
nodepackages./npm install -
Start development server
./npm run start -
Visit
localhost:8080with browser to view app.
Command to install pan-zoom package from repo
$ ./npm install --save https://git.miti.sh/ccm/pan-zoom/archive/v0.3.0.tar.gz
Integration tests
Run
./npm run test:integ
Debug
-
Put
debuggerin whatever test you want to debug. -
Add
onlyto the test'sitfunction call.From
it(...toit.only(.... -
Then run
./npm run test:integ:debugto start start the debugger.
> test:integ:debug
> NODE_INSPECT_RESUME_ON_START=1 node inspect ./node_modules/jest/bin/jest.js --config jest.config.integ.cjs --runInBand test/integration/page.test.js
< Debugger listening on ws://127.0.0.1:9229/7150f5fc-339a-4171-af42-b8902d0d3e31
< For help, see: https://nodejs.org/en/docs/inspector
<
connecting to 127.0.0.1:9229 ... ok
< Debugger attached.
<
< Jest config file read.
<
<
< Spawning server process...
<
< Test server running at http://localhost:3005
< Build completed in 11ms
<
<
break in test/integration/page.test.js:31
29 counter = await driver.findElement(By.css(selector), svg);
30 await counter.click();
>31 debugger;
32 expect(await counter.getAttribute('class')).toEqual(expect.stringContaining('selected'));
33 });
debug>
- To run the test again without having to quit the debugger, use
cto continue past the breakpoint and thenrto restart.
debug> c
...
<
< Stopping server.
<
< Waiting for the debugger to disconnect...
<
debug> r
< Debugger listening on ws://127.0.0.1:9229/1cda953e-c9ae-41d8-9d4a-e41a567e0826
< For help, see: https://nodejs.org/en/docs/inspector
<
connecting to 127.0.0.1:9229 ... ok
< Debugger attached.
<
< Jest config file read.
<
<
< Spawning server process...
<
< Test server running at http://localhost:3005
< Build completed in 11ms
<
<
break in test/integration/page.test.js:31
29 counter = await driver.findElement(By.css(selector), svg);
30 await counter.click();
>31 debugger;
32 expect(await counter.getAttribute('class')).toEqual(expect.stringContaining('selected'));
33 });
debug>
References
Description
Languages
JavaScript
72.6%
CSS
16.2%
HTML
10.1%
Dockerfile
0.6%
Shell
0.5%