Skip to content

Commit

Permalink
fixed comments from PullRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Schwan authored and Simon Schwan committed Feb 6, 2017
1 parent ddff4c5 commit 72a3391
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
16 changes: 15 additions & 1 deletion docs/examples/pipes/day-of-month.md
Expand Up @@ -27,5 +27,19 @@
### Response

```javascript
{
"success": true,
"result": [
{
"check-time": 0,
"id": 1486386390706,
"total": 0
},
{
"check-time": 1,
"id": 1486386390707,
"total": 1
}
]
}
```
16 changes: 8 additions & 8 deletions test/plugins/compare-numbers-plugin-test.js
Expand Up @@ -6,38 +6,38 @@ buster.testCase('compare-numbers-plugin', {
buster.assert.exception(() => plugin('asd', 123, { operator: '=' }))
buster.assert.exception(() => plugin(1, 'asd', { operator: '=' }))
},
'throw an exception if not known operator': function () {
'should throw an exception if not known operator': function () {
buster.assert.exception(() => plugin(123, 123, {}))
buster.assert.exception(() => plugin(123, 123, { operator: 'abc' }))
},
'= works as expected': function () {
'should work as expected: =': function () {
buster.assert.equals(1.0, plugin(10, 10, { operator: '=' }))
buster.assert.equals(0.0, plugin(10, 1, { operator: '=' }))
},
'<= works as expected': function () {
'should work as expected: <=': function () {
buster.assert.equals(1.0, plugin(10, 10, { operator: '<=' }))
buster.assert.equals(1.0, plugin(9, 10, { operator: '<=' }))
buster.assert.equals(0.0, plugin(10, 9, { operator: '<=' }))
},
'< works as expected': function () {
'should work as expected: <': function () {
buster.assert.equals(0.0, plugin(10, 10, { operator: '<' }))
buster.assert.equals(1.0, plugin(9, 10, { operator: '<' }))
buster.assert.equals(0.0, plugin(10, 9, { operator: '<' }))
},
'>= works as expected': function () {
'should work as expected: >=': function () {
buster.assert.equals(1.0, plugin(10, 10, { operator: '>=' }))
buster.assert.equals(0.0, plugin(9, 10, { operator: '>=' }))
buster.assert.equals(1.0, plugin(10, 9, { operator: '>=' }))
},
'> works as expected': function () {
'should work as expected: >': function () {
buster.assert.equals(0.0, plugin(10, 10, { operator: '>' }))
buster.assert.equals(0.0, plugin(9, 10, { operator: '>' }))
buster.assert.equals(1.0, plugin(10, 9, { operator: '>' }))
},
'does not accept number formated in strings': function () {
'should not accept number formated in strings': function () {
buster.assert.exception(() => plugin('10', 10, { operator: '=' }))
},
'works on floating point': function () {
'should work on floating point': function () {
buster.assert.equals(1.0, plugin(10.001, 10.02, { operator: '<' }))
}
})

0 comments on commit 72a3391

Please sign in to comment.