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:
33
test/spec/filterSpec.js
Normal file
33
test/spec/filterSpec.js
Normal 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
5
test/spec/mainSpec.js
Normal file
@@ -0,0 +1,5 @@
|
||||
require("./filterSpec");
|
||||
|
||||
(function main(){
|
||||
|
||||
})();
|
||||
3360
test/spec/spec.js
Normal file
3360
test/spec/spec.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user