From f214d7c1c4d7f4000d094b524e8631b3de0c9e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Mon, 15 Jan 2018 20:54:38 +0100 Subject: [PATCH] add 4 tests for elo snippet --- test/elo/elo.test.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/elo/elo.test.js b/test/elo/elo.test.js index a86587170..b425f7fb1 100644 --- a/test/elo/elo.test.js +++ b/test/elo/elo.test.js @@ -4,11 +4,10 @@ const elo = require('./elo.js'); test('Testing elo', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape - // BORKEN - // t.true(typeof elo === 'function', 'elo is a Function'); - // t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard 1v1s"); - // t.deepEqual(elo([1200, 1200], 64), [1232, 1168]), "Standard 1v1s"; - // t.deepEqual(elo([1200, 1200, 1200, 1200]).map(Math.round), [1246, 1215, 1185, 1154], "4 player FFA, all same rank"); + t.true(typeof elo === 'function', 'elo is a Function'); + t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard 1v1s"); + t.deepEqual(elo([1200, 1200], 64), [1232, 1168]), "Standard 1v1s"; + t.deepEqual(elo([1200, 1200, 1200, 1200]).map(Math.round), [1246, 1215, 1185, 1154], "4 player FFA, all same rank"); //t.deepEqual(elo(args..), 'Expected'); //t.equal(elo(args..), 'Expected'); //t.false(elo(args..), 'Expected');