|
|
@ -4,6 +4,7 @@ const Card = require('../js/cards/Card'); |
|
|
|
const ChooseColor = require('../js/cards/special/ChooseColor'); |
|
|
|
const Skip = require('../js/cards/special/Skip'); |
|
|
|
const Reverse = require('../js/cards/special/Reverse'); |
|
|
|
const PlusAmount = require('../js/cards/special/PlusAmount'); |
|
|
|
|
|
|
|
//Instanz CARD_COLORS aus uno.js
|
|
|
|
const CARD_COLORS = uno.CARD_COLORS; |
|
|
@ -68,6 +69,34 @@ describe('Karten erstellen', () => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
it('+4', () => { |
|
|
|
|
|
|
|
//Erstellen einer +4 Karte:
|
|
|
|
//Name: +4, Farbe: keine
|
|
|
|
card = new PlusAmount('+4'); |
|
|
|
|
|
|
|
//Testet das Erstellen der Karte
|
|
|
|
testCreatedCard(card, '+4', "NONE"); |
|
|
|
|
|
|
|
//PlusAmount muss 4 sein
|
|
|
|
expect(card.plus).toBe(4); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
it('+2 - Rot', () => { |
|
|
|
|
|
|
|
//Erstellen einer +2 Karte:
|
|
|
|
//Name: +2, Farbe: Rot
|
|
|
|
card = new PlusAmount('+2', CARD_COLORS[3]); |
|
|
|
|
|
|
|
//Testet das Erstellen der Karte
|
|
|
|
testCreatedCard(card, '+2', "RED"); |
|
|
|
|
|
|
|
//PlusAmount muss 2 sein
|
|
|
|
expect(card.plus).toBe(2); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//Testet eine Karte auf die Eigenschaften von Card.js
|
|
|
|