Conversation
…ecking if the aiMock test works
Pull Request Test Coverage Report for Build 1025
💛 - Coveralls |
|
Based on the title, I'm unclear if this is actually submitted for review. I'll wait until you assign this to me as a reviewer as the signal that you want this merged in. |
| @@ -0,0 +1,82 @@ | |||
| // var chai = require('chai'); | |||
| var sinon = require('sinon') | |||
| import {store} from '../../../src/store/store' | |||
There was a problem hiding this comment.
Absolute Import references like these make me nervous. If the directory structure gets changed in the future, this will break.
Having said that though, I'm not sure the likelihood of directory structure changes in the future.
| let oPO = player2 | ||
| let oV = player2 | ||
| let aVMock = new AntiVirus(hand, boolSide, move, event) | ||
| // let aVSpy = sinon.spy(aVMock, 'execute') |
There was a problem hiding this comment.
Looks like there is some dead code to clean up here.
| store.state.players = [] | ||
| expect(store.getters.maxplayers).to.equal(0) | ||
| }) | ||
| it('test the store currentPlayerName function', () => { |
There was a problem hiding this comment.
Consider adding spaces between the tests to improve readability.
| // }) | ||
| import MainComponent from '../../../src/components/MainGame/MainComponent.vue' | ||
|
|
||
| // function getSubmit (Component, propsData) { |
| expect(defaultData.winnerScore).to.equal(0) | ||
| expect(Array.isArray(defaultData.deleteData)).to.equal(true) | ||
| }) | ||
| // it('testing the submit funtion', () => { |
| store.commit('resetState') | ||
| expect(store.getters.getWinner).to.equal(false) | ||
| }) | ||
| it('test the store addPlayers function', () => { |
There was a problem hiding this comment.
See the previous comment about readability.
| }) | ||
| it('test the setPlayfieldColour function', () => { | ||
| store.commit('setPlayfieldColour', false) | ||
| // expect(store.state.trueSideColour).to.equal('background-color: #80aef7; box-shadow: 0px 3px 15px rgba(0,0,0,0.6)') |
|
The problem I was having running the tests was fixed by |

Increases the test coverage.