1
0
mirror of https://github.com/exane/not-gwent-online synced 2026-01-10 19:23:45 +00:00

add some abilities

This commit is contained in:
exane
2015-06-19 14:14:37 +02:00
parent b2aa796aad
commit 21a92f69f3
19 changed files with 3772 additions and 81 deletions

33
test/spec/filterSpec.js Normal file
View File

@@ -0,0 +1,33 @@
var Card = require("../../server/Card");
var Battleside = require("../../server/Battleside");
var data = require("../../assets/data/abilities");
describe("filter", function(){
var card, side, filter, cards;
beforeEach(function(){
filter = Battleside.prototype.filter;
cards = [];
cards.push(Card("iorveth"));
cards.push(Card("toruviel"));
cards.push(Card("isengrim_faoiltiarnah"));
cards.push(Card("decoy"));
})
it("it should filter heroes out", function(){
var res = filter(cards, {
"ability": "hero"
})
expect(res.length).toBe(2);
})
it("it should filter hero and special cards out", function(){
var res = filter(cards, {
"ability": "hero",
"type": Card.TYPE.SPECIAL
})
expect(res.length).toBe(1);
})
})

5
test/spec/mainSpec.js Normal file
View File

@@ -0,0 +1,5 @@
require("./filterSpec");
(function main(){
})();

3360
test/spec/spec.js Normal file

File diff suppressed because one or more lines are too long