Skip to content

Commit df770a4

Browse files
author
Cache Hamm
committed
upgrade dev dependencies to latest
1 parent a98983f commit df770a4

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@
4545
"homepage": "https://github.com/cachecontrol/json-rules-engine",
4646
"devDependencies": {
4747
"babel-cli": "^6.4.5",
48-
"babel-core": "~6.9.1",
48+
"babel-core": "~6.24.1",
4949
"babel-eslint": "^7.1.1",
50-
"babel-loader": "~6.2.4",
50+
"babel-loader": "~6.4.1",
5151
"babel-plugin-transform-async-to-generator": "^6.4.6",
52-
"babel-polyfill": "~6.7.4",
53-
"babel-preset-es2015": "~6.9.0",
54-
"babel-preset-stage-0": "~6.5.0",
52+
"babel-polyfill": "~6.23.0",
53+
"babel-preset-es2015": "~6.24.1",
54+
"babel-preset-stage-0": "~6.24.1",
5555
"babel-register": "^6.4.3",
5656
"chai": "^3.5.0",
5757
"chai-as-promised": "^6.0.0",
5858
"colors": "~1.1.2",
5959
"dirty-chai": "1.2.2",
6060
"mocha": "^3.2.0",
61-
"regenerator": "~0.8.46",
62-
"sinon": "^1.17.2",
61+
"regenerator": "~0.9.7",
62+
"sinon": "^2.1.0",
6363
"sinon-chai": "^2.8.0",
64-
"snazzy": "^2.0.1",
65-
"standard": "^9.0.0"
64+
"snazzy": "^7.0.0",
65+
"standard": "^10.0.1"
6666
},
6767
"dependencies": {
6868
"debug": "~2.6.3",

src/almanac.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict'
22

3+
import Fact from './fact'
4+
import { UndefinedFactError } from './errors'
5+
36
let debug = require('debug')('json-rules-engine')
47
let verbose = require('debug')('json-rules-engine-verbose')
58
let selectn = require('selectn')
69
let isPlainObject = require('lodash.isplainobject')
710
let warn = require('debug')('json-rules-engine:warn')
811

9-
import Fact from './fact'
10-
import { UndefinedFactError } from './errors'
11-
1212
/**
1313
* Fact results lookup
1414
* Triggers fact computations and saves the results

test/engine-cache.test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
import engineFactory from '../src/index'
43
import sinon from 'sinon'
4+
import engineFactory from '../src/index'
55

66
describe('Engine: cache', () => {
77
let engine
@@ -16,8 +16,12 @@ describe('Engine: cache', () => {
1616
}]
1717
}
1818

19-
let factSpy = sinon.stub().returns(22)
19+
let factSpy = sinon.spy()
2020
let eventSpy = sinon.spy()
21+
let ageFact = () => {
22+
factSpy()
23+
return 22
24+
}
2125
function setup (factOptions) {
2226
factSpy.reset()
2327
eventSpy.reset()
@@ -28,7 +32,7 @@ describe('Engine: cache', () => {
2832
engine.addRule(determineCollegeSenior)
2933
let over20 = factories.rule({ conditions, event: collegeSeniorEvent, priority: 50 })
3034
engine.addRule(over20)
31-
engine.addFact('age', factSpy, factOptions)
35+
engine.addFact('age', ageFact, factOptions)
3236
engine.on('success', eventSpy)
3337
}
3438

0 commit comments

Comments
 (0)