Skip to content

Commit

Permalink
Bumped standard to v16 (#46)
Browse files Browse the repository at this point in the history
* Bumped standard to v16

* Added v14 and v15 to github actions
  • Loading branch information
mcollina authored Feb 22, 2021
1 parent e1afdd3 commit d3deb8c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 13.x]
node-version: [10.x, 12.x, 13.x, 14.x, 15.x]

steps:
- uses: actions/checkout@v1
Expand Down
20 changes: 10 additions & 10 deletions abstractTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'use strict'

module.exports = function abstractTests (opts) {
var builder = opts.builder
var test = opts.test
const builder = opts.builder
const test = opts.test

test('support on and emit', function (t) {
t.plan(4)
Expand Down Expand Up @@ -93,7 +93,7 @@ module.exports = function abstractTests (opts) {
topic: 'hello world',
payload: { my: 'message' }
}
var toRemoveCalled = false
let toRemoveCalled = false

function toRemove (message, cb) {
toRemoveCalled = true
Expand Down Expand Up @@ -395,7 +395,7 @@ module.exports = function abstractTests (opts) {

test('close support', function (t) {
const e = builder()
var check = false
let check = false

t.notOk(e.closed, 'must have a false closed property')

Expand Down Expand Up @@ -425,8 +425,8 @@ module.exports = function abstractTests (opts) {
topic: 'hello/world',
payload: { my: 'message' }
}
var firstCalled = false
var secondCalled = false
let firstCalled = false
let secondCalled = false

e.on('hello/#', function (message, cb) {
t.notOk(firstCalled, 'first subscriber must only be called once')
Expand All @@ -453,8 +453,8 @@ module.exports = function abstractTests (opts) {
topic: 'hello/my/world',
payload: { my: 'message' }
}
var firstCalled = false
var secondCalled = false
let firstCalled = false
let secondCalled = false

e.on('hello/#', function (message, cb) {
t.notOk(firstCalled, 'first subscriber must only be called once')
Expand Down Expand Up @@ -500,10 +500,10 @@ module.exports = function abstractTests (opts) {
const total = 10000
const topic = 'test'

var received = 0
let received = 0

e.on(topic, function (msg, cb) {
var fail = false
let fail = false
if (received !== msg.payload) {
t.fail(`leak detected. Count: ${received} - Payload: ${msg.payload}`)
fail = true
Expand Down
4 changes: 2 additions & 2 deletions bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
const mqemitter = require('./')
const emitter = mqemitter({ concurrency: 10 })
const total = 1000000
var written = 0
var received = 0
let written = 0
let received = 0
const timerKey = 'time for sending ' + total + ' messages'

function write () {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"lint": "npm run lint:standard && npm run lint:typescript && npm run lint:markdown",
"lint:standard": "standard --verbose | snazzy",
"lint:typescript": "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin test/types/*.ts mqemitter.d.ts",
"lint:typescript": "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin test/types/*.ts types/mqemitter.d.ts",
"lint:markdown": "markdownlint README.md",
"unit": "tape test/*.js",
"unit:report": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/*.js",
Expand Down Expand Up @@ -51,7 +51,7 @@
"nyc": "^15.0.0",
"pre-commit": "^1.2.2",
"snazzy": "^9.0.0",
"standard": "^15.0.0",
"standard": "^16.0.0",
"tape": "^5.0.1",
"tsd": "^0.14.0",
"typescript": "^4.0.2"
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test('queue concurrency', function (t) {
t.plan(3)

const e = mq({ concurrency: 1 })
var completed1 = false
let completed1 = false

t.equal(e.concurrency, 1)

Expand Down Expand Up @@ -54,7 +54,7 @@ test('queue concurrency with overlapping subscriptions', function (t) {
t.plan(3)

const e = mq({ concurrency: 1 })
var completed1 = false
let completed1 = false

t.equal(e.concurrency, 1)

Expand Down
2 changes: 1 addition & 1 deletion test/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MQEmitter, { Message } from '../../types/mqemitter'

const noop = function () {}

var mq = MQEmitter()
let mq = MQEmitter()
mq = MQEmitter({
concurrency: 100
})
Expand Down

0 comments on commit d3deb8c

Please sign in to comment.