|
@ -1,6 +1,9 @@ |
|
|
//Imports
|
|
|
//Imports
|
|
|
const uno = require('../js/uno'); |
|
|
const uno = require('../js/uno'); |
|
|
const Card = require('../js/cards/Card'); |
|
|
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'); |
|
|
|
|
|
|
|
|
//Instanz CARD_COLORS aus uno.js
|
|
|
//Instanz CARD_COLORS aus uno.js
|
|
|
const CARD_COLORS = uno.CARD_COLORS; |
|
|
const CARD_COLORS = uno.CARD_COLORS; |
|
@ -32,6 +35,39 @@ describe('Karten erstellen', () => { |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('ChooseColor', () => { |
|
|
|
|
|
|
|
|
|
|
|
//Erstellen einer +2 Karte:
|
|
|
|
|
|
//Name: CC, Farbe: keine
|
|
|
|
|
|
card = new ChooseColor('CC'); |
|
|
|
|
|
|
|
|
|
|
|
//Testet das Erstellen der Karte
|
|
|
|
|
|
testCreatedCard(card, 'CC', "NONE"); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('Skip - Gelb', () => { |
|
|
|
|
|
|
|
|
|
|
|
//Erstellen einer Skip Karte:
|
|
|
|
|
|
//Name: Skip, Farbe: gelb
|
|
|
|
|
|
card = new Skip('S', CARD_COLORS[4]); |
|
|
|
|
|
|
|
|
|
|
|
//Testet das Erstellen der Karte
|
|
|
|
|
|
testCreatedCard(card, 'S', "YELLOW"); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('Reverse - Grün', () => { |
|
|
|
|
|
|
|
|
|
|
|
//Erstellen einer Reverse Karte:
|
|
|
|
|
|
//Name: Reverse, Farbe: grün
|
|
|
|
|
|
card = new Reverse('R', CARD_COLORS[2]); |
|
|
|
|
|
|
|
|
|
|
|
//Testet das Erstellen der Karte
|
|
|
|
|
|
testCreatedCard(card, 'R', "GREEN"); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
//Testet eine Karte auf die Eigenschaften von Card.js
|
|
|
//Testet eine Karte auf die Eigenschaften von Card.js
|
|
|