Skip to content

Commit

Permalink
clear stupid jasmine warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Oct 8, 2018
1 parent 5659f33 commit 20785c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/plain-html/test/math-problem-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MathProblem.prototype.generate = function () {
var savedProblem = this.savesProblem.save(problem)

this.submitProblem(savedProblem)
return 'neat'
}

describe('MathProblem', function () {
Expand All @@ -27,8 +28,9 @@ describe('MathProblem', function () {
td.when(createRandomProblem()).thenReturn('some problem')
td.when(FakeSavesProblem.prototype.save('some problem')).thenReturn('saved problem')

subject.generate()
var result = subject.generate()

td.verify(submitProblem('saved problem'))
expect(result).toEqual('neat')
})
})
4 changes: 3 additions & 1 deletion examples/webpack/test/math-problem-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MathProblem.prototype.generate = function(){
savedProblem = this.savesProblem.save(problem)

this.submitProblem(savedProblem)
return 'neat'
}

var td = require('testdouble')
Expand All @@ -28,8 +29,9 @@ describe('MathProblem', function(){
td.when(createRandomProblem()).thenReturn('some problem')
td.when(FakeSavesProblem.prototype.save('some problem')).thenReturn('saved problem')

subject.generate()
var result = subject.generate()

td.verify(submitProblem('saved problem'))
expect(result).toEqual('neat')
})
})

0 comments on commit 20785c7

Please sign in to comment.