1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/test/lib/good-traces.js
2017-05-06 01:49:05 +02:00

21 lines
581 B
JavaScript

// Spawned by the goodStacks.spec.js tests
'use strict';
var assert = require('assert');
var redis = require('../../index');
var client = redis.createClient();
// Both error cases would normally return bad stack traces
client.set('foo', function (err, res) {
assert(/good-traces.js:9:8/.test(err.stack));
client.set('foo', 'bar', function (err, res) {
assert(/good-traces.js:11:12/.test(err.stack));
client.quit(function () {
process.exit(0);
});
});
process.nextTick(function () {
client.stream.destroy();
});
});