Skip to content

Commit

Permalink
upgrades deps
Browse files Browse the repository at this point in the history
  • Loading branch information
chrvadala committed Jun 1, 2020
1 parent fe474df commit 048adf9
Show file tree
Hide file tree
Showing 6 changed files with 2,616 additions and 2,279 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
node_modules
node_modules
coverage
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"scripts": {
"test": "jest",
"standard": "standard",
"coveralls": "jest --coverage --coveragePathIgnorePatterns autogenerated --coverageReporters=text-lcov | coveralls",
"test:ci": "jest && standard && yarn coveralls",
"version": "yarn test && yarn standard"
"coverage": "jest --coverage",
"ci": "npm-run-all standard coverage",
"build": "exit 0"
},
"devDependencies": {
"@types/jest": "^23.3.10",
"coveralls": "^3.0.2",
"jest": "^23.6.0",
"standard": "^12.0.1"
"@types/jest": "^25.2.3",
"jest": "^26.0.1",
"npm-run-all": "^4.1.5",
"standard": "^14.3.4"
}
}
2 changes: 1 addition & 1 deletion src/SlidingWindowMax.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SlidingWindowMax {
this.list = []
this.windowSize = windowSize

this.waitFullRange = options.hasOwnProperty('waitFullRange') ? options.waitFullRange : true
this.waitFullRange = 'waitFullRange' in options ? options.waitFullRange : true
const comparator = options.comparator ? options.comparator : DEFAULT_COMPARATOR
this.lowerThan = (a, b) => comparator(a, b) > 0
}
Expand Down
6 changes: 3 additions & 3 deletions test/SlidingWindowMax.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ test.each([
for (let i = 0; i < dataset.length; i++) {
const cur = dataset[i]
const res = expectedResults[i]
let max = slidingWindowMax.add(cur)
const max = slidingWindowMax.add(cur)
expect(max).toEqual(res)
}
})

test('sliding window max with big data', () => {
const windowSize = 100

let dataset = fs
const dataset = fs
.readFileSync(path.join(__dirname, '__artifacts/sample-1.txt'))
.toString()
.trim()
Expand All @@ -93,7 +93,7 @@ test('sliding window max with big data', () => {
for (let i = 0; i < dataset.length; i++) {
const cur = dataset[i]
const res = expectedResults[i]
let max = slidingWindowMax.add(cur)
const max = slidingWindowMax.add(cur)
expect(max).toEqual(res)
}
})
Expand Down
Loading

0 comments on commit 048adf9

Please sign in to comment.