mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-29 07:10:44 -05:00
19 lines
388 B
JavaScript
19 lines
388 B
JavaScript
|
import { Gameboard } from '../src/components/gameboard';
|
||
|
class Player {
|
||
|
constructor(name) {
|
||
|
this.gameboard = new Gameboard();
|
||
|
this.playerName = name;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
let p = new Player('Player1');
|
||
|
|
||
|
it('should contain a gameboard', () => {
|
||
|
expect(p.gameboard).toHaveProperty(
|
||
|
'ships',
|
||
|
'scoreboard',
|
||
|
'shipCount',
|
||
|
'sunkShipCount',
|
||
|
);
|
||
|
});
|