|
|
|
@ -12,7 +12,7 @@ describe('GameMuti get tests', () => {
|
|
|
|
|
it('should return bo jeu', () => {
|
|
|
|
|
expect(game.getName()).toBe('bo jeu');
|
|
|
|
|
})
|
|
|
|
|
it('should return require(blackjack.jpg)', () => {
|
|
|
|
|
it('should return img ("")', () => {
|
|
|
|
|
expect(game.getImageSource()).toBe(img);
|
|
|
|
|
})
|
|
|
|
|
it('should return super jeu', () => {
|
|
|
|
@ -27,36 +27,33 @@ describe('GameMuti get tests', () => {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Setting new values
|
|
|
|
|
game.setGameSource('trop cool le jeu');
|
|
|
|
|
game.setImageSource(img);
|
|
|
|
|
game.setName('beau jeu');
|
|
|
|
|
game.setNbPlayerMin(2);
|
|
|
|
|
game.setNbPlayerMax(4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set tests
|
|
|
|
|
describe('GameCasino set tests', () => {
|
|
|
|
|
it('should return beau jeu', () => {
|
|
|
|
|
game.setName('beau jeu');
|
|
|
|
|
expect(game.getName()).toBe('beau jeu');
|
|
|
|
|
})
|
|
|
|
|
it('should return require(JeuDeDame.jpg)', () => {
|
|
|
|
|
expect(game.getImageSource).toBe(img);
|
|
|
|
|
game.setImageSource(img);
|
|
|
|
|
expect(game.getImageSource()).toBe(img);
|
|
|
|
|
})
|
|
|
|
|
it('should return trop cool le jeu', () => {
|
|
|
|
|
game.setGameSource('trop cool le jeu');
|
|
|
|
|
expect(game.getGameSource()).toBe('trop cool le jeu');
|
|
|
|
|
})
|
|
|
|
|
it('should return trop cool le jeu', () => {
|
|
|
|
|
game.setNbPlayerMin(2);
|
|
|
|
|
expect(game.getNbPlayerMin()).toBe(2);
|
|
|
|
|
})
|
|
|
|
|
it('should return 4', () => {
|
|
|
|
|
expect(game.getNbPlayerMin()).toBe(4);
|
|
|
|
|
game.setNbPlayerMax(4);
|
|
|
|
|
expect(game.getNbPlayerMax()).toBe(4);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Coins Calculator Tests
|
|
|
|
|
describe('Coins calculator tests', () => {
|
|
|
|
|
describe('GameCasino coins calculator tests', () => {
|
|
|
|
|
it('should return 200', () => {
|
|
|
|
|
expect(game.coinsCalculator(200)).toBe(200);
|
|
|
|
|
})
|
|
|
|
|