Skip to content

Automated behaviour testing#372

Merged
johnanvik merged 61 commits intomasterfrom
testingCoverage
Jul 9, 2018
Merged

Automated behaviour testing#372
johnanvik merged 61 commits intomasterfrom
testingCoverage

Conversation

@johnanvik
Copy link
Collaborator

Fixes #366

Overview of changes

  • Added behaviour unit tests

Reviewer: @JaceRiehl

@coveralls
Copy link

coveralls commented Jul 6, 2018

Pull Request Test Coverage Report for Build 1031

  • 7 of 31 (22.58%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.2%) to 24.679%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/classes/AiActions/GeneratorStep.js 0 1 0.0%
src/classes/AiActions/FirewallStep.js 0 1 0.0%
src/classes/AiActions/AiHandler.js 7 11 63.64%
src/classes/AiActions/AiMove.js 0 18 0.0%
Files with Coverage Reduction New Missed Lines %
src/classes/AiActions/AiMove.js 1 0.0%
Totals Coverage Status
Change from base Build 1026: 1.2%
Covered Lines: 531
Relevant Lines: 1832

💛 - Coveralls

@johnanvik
Copy link
Collaborator Author

Safety.spec.js provides a template for testing the expected behaviour of the AIs

@johnanvik johnanvik requested a review from JaceRiehl July 9, 2018 18:40
Copy link
Collaborator

@JaceRiehl JaceRiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those tests make a lot more sense I didn't realize you could call them in that way. I tried the sinon-chai way but it gave me constant errors.

let card = new Card(55, 3, 'I', 'f')
let card2 = new Card(34, 2, 'R', 'v')
describe('test store.js getters', () => {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These spaces might gives ESLint errors, I might have to change them back if they do.

@johnanvik johnanvik merged commit c9eaa4d into master Jul 9, 2018
@johnanvik johnanvik deleted the testingCoverage branch June 15, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants