forked from terraforming-mars/terraforming-mars
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Arklight compatible with Merger
- Loading branch information
Showing
2 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
import {expect} from 'chai'; | ||
import {Predators} from '../../../src/server/cards/base/Predators'; | ||
import {Arklight} from '../../../src/server/cards/colonies/Arklight'; | ||
import {runAllActions, testGame} from '../../TestingUtils'; | ||
import {cast, runAllActions, testGame} from '../../TestingUtils'; | ||
import {EcoLine} from '../../../src/server/cards/corporation/EcoLine'; | ||
|
||
describe('Arklight', function() { | ||
it('Should play', function() { | ||
describe('Arklight', () => { | ||
it('Should play', () => { | ||
const card = new Arklight(); | ||
const [game, player/* , player2 */] = testGame(2); | ||
const play = card.play(player); | ||
expect(play).is.undefined; | ||
cast(card.play(player), undefined); | ||
player.corporations.push(card); | ||
runAllActions(game); | ||
|
||
expect(card.resourceCount).to.eq(1); | ||
player.corporations.push(card); | ||
|
||
card.onCardPlayed(player, new Predators()); | ||
|
||
expect(card.resourceCount).to.eq(2); | ||
expect(card.getVictoryPoints(player)).to.eq(1); | ||
}); | ||
|
||
it('Compatible with Merger', () => { | ||
const card = new Arklight(); | ||
const [game, player/* , player2 */] = testGame(2); | ||
player.corporations.push(card); | ||
runAllActions(game); | ||
|
||
card.resourceCount = 0; | ||
|
||
player.playAdditionalCorporationCard(new EcoLine()); | ||
|
||
expect(card.resourceCount).to.eq(1); | ||
}); | ||
}); |