tracks/ecmascript/exercises/queen-attack/queen-attack.spec.js in trackler-2.2.0.0 vs tracks/ecmascript/exercises/queen-attack/queen-attack.spec.js in trackler-2.2.0.1

- old
+ new

@@ -6,27 +6,27 @@ expect(queens.white).toEqual([0, 3]); expect(queens.black).toEqual([7, 3]); }); xtest('initialized with specific placement', () => { - const queens = new Queens({white: [3,7], black: [6,1]}); + const queens = new Queens({ white: [3, 7], black: [6, 1] }); expect(queens.white).toEqual([3, 7]); expect(queens.black).toEqual([6, 1]); }); xtest('cannot occupy the same space', () => { - const positioning = {white: [2,4], black: [2,4]}; + const positioning = { white: [2, 4], black: [2, 4] }; try { new Queens(positioning); - } catch(error) { + } catch (error) { expect(error).toEqual('Queens cannot share the same space'); } }); xtest('toString representation', () => { - const positioning = {white: [2, 4], black: [6, 6]}; + const positioning = { white: [2, 4], black: [6, 6] }; const queens = new Queens(positioning); const board = '_ _ _ _ _ _ _ _\n\ _ _ _ _ _ _ _ _\n\ _ _ _ _ W _ _ _\n\ _ _ _ _ _ _ _ _\n\ @@ -37,21 +37,21 @@ '; expect(queens.toString()).toEqual(board); }); xtest('queens cannot attack', () => { - const queens = new Queens({ white: [2,3], black: [4,7] }); + const queens = new Queens({ white: [2, 3], black: [4, 7] }); expect(queens.canAttack()).toEqual(false); }); xtest('queens can attack when they are on the same row', () => { - const queens = new Queens({ white: [2,4], black: [2,7] }); + const queens = new Queens({ white: [2, 4], black: [2, 7] }); expect(queens.canAttack()).toEqual(true); }); xtest('queens can attack when they are on the same column', () => { - const queens = new Queens({ white: [5,4], black: [2,4] }); + const queens = new Queens({ white: [5, 4], black: [2, 4] }); expect(queens.canAttack()).toEqual(true); }); xtest('queens can attack diagonally', () => { const queens = new Queens({ white: [1, 1], black: [6, 6] }); @@ -75,7 +75,6 @@ xtest('queens can attack on another ne/sw diagonal', () => { const queens = new Queens({ white: [2, 6], black: [5, 3] }); expect(queens.canAttack()).toEqual(true); }); - });