You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
test fixup
This commit is contained in:
@@ -1,44 +1,44 @@
|
||||
'use strict'
|
||||
|
||||
var assert = require('assert')
|
||||
var config = require('./lib/config')
|
||||
var fork = require('child_process').fork
|
||||
var redis = config.redis
|
||||
const assert = require('assert')
|
||||
const config = require('./lib/config')
|
||||
const fork = require('child_process').fork
|
||||
const redis = config.redis
|
||||
|
||||
describe('stack traces', function () {
|
||||
it('should return good traces with NODE_ENV=development set', function (done) {
|
||||
var external = fork('./test/lib/good-traces.js', {
|
||||
describe('stack traces', () => {
|
||||
it('should return good traces with NODE_ENV=development set', (done) => {
|
||||
const external = fork('./test/lib/good-traces.js', {
|
||||
env: {
|
||||
NODE_ENV: 'development'
|
||||
}
|
||||
})
|
||||
|
||||
var id = setTimeout(function () {
|
||||
const id = setTimeout(() => {
|
||||
external.kill()
|
||||
done(new Error('Timeout'))
|
||||
}, 6000)
|
||||
|
||||
external.on('close', function (code) {
|
||||
external.on('close', (code) => {
|
||||
clearTimeout(id)
|
||||
assert.strictEqual(code, 0)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should return good traces with NODE_DEBUG=redis env set', function (done) {
|
||||
var external = fork('./test/lib/good-traces.js', {
|
||||
it('should return good traces with NODE_DEBUG=redis env set', (done) => {
|
||||
const external = fork('./test/lib/good-traces.js', {
|
||||
env: {
|
||||
NODE_DEBUG: 'redis'
|
||||
},
|
||||
silent: true
|
||||
})
|
||||
|
||||
var id = setTimeout(function () {
|
||||
const id = setTimeout(() => {
|
||||
external.kill()
|
||||
done(new Error('Timeout'))
|
||||
}, 6000)
|
||||
|
||||
external.on('close', function (code) {
|
||||
external.on('close', (code) => {
|
||||
clearTimeout(id)
|
||||
assert.strictEqual(code, 0)
|
||||
done()
|
||||
@@ -46,11 +46,11 @@ describe('stack traces', function () {
|
||||
})
|
||||
|
||||
// This is always going to return good stack traces
|
||||
it('should always return good stack traces for rejected offline commands', function (done) {
|
||||
var client = redis.createClient({
|
||||
it('should always return good stack traces for rejected offline commands', (done) => {
|
||||
const client = redis.createClient({
|
||||
enableOfflineQueue: false
|
||||
})
|
||||
client.set('foo', function (err, res) {
|
||||
client.set('foo', (err, res) => {
|
||||
assert(/good_traces.spec.js/.test(err.stack))
|
||||
client.quit(done)
|
||||
})
|
||||
|
Reference in New Issue
Block a user