odin-codespace/battleship/tests/player.test.js

19 lines
388 B
JavaScript
Raw Permalink Normal View History

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',
);
});