Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
WestCoastSwing
/
RelativePlacement
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
8315e7ae
...
8315e7aeca4a2169d5e80d0df4627cf493646a69
authored
2016-12-05 22:58:54 +0100
by
Vincent Peybernes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
#8
Improve result test of election
1 parent
6c7d68e7
Pipeline
#14
for
8315e7ae
passed
in 56 seconds
Changes
1
Pipelines
1
Builds
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
tests/node/GlobalSpec.js
tests/node/GlobalSpec.js
View file @
8315e7a
...
...
@@ -158,5 +158,18 @@ describe('RelativePlacement global', () => {
assert
.
ok
(
candidates
.
every
(
name
=>
result
.
indexOf
(
name
)
!=
-
1
));
assert
.
ok
(
result
.
every
(
name
=>
candidates
.
indexOf
(
name
)
!=
-
1
));
});
it
(
'should have placements sum in candidates'
,
()
=>
{
election
.
addVote
([
'A'
,
'B'
,
'C'
]);
election
.
addVote
([
'B'
,
'A'
,
'C'
]);
election
.
addVote
([
'A'
,
'C'
,
'B'
]);
election
.
getResult
();
var
candidate
=
election
.
candidateList
[
'A'
];
assert
.
equal
(
candidate
.
placements
.
length
,
3
);
assert
.
equal
(
candidate
.
cumulativePlacement
.
length
,
3
);
assert
.
equal
(
candidate
.
votes
.
length
,
4
);
});
});
});
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment