[Pkg-javascript-commits] [node-stack-utils] 42/67: Ensure tests pass in Node.js 0.10

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:53:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-stack-utils.

commit f4abec31adfd0a0c27eda49bea7c2db75f77cd4a
Author: Mark Wubben <mark at novemberborn.net>
Date:   Tue Mar 21 17:10:09 2017 +0000

    Ensure tests pass in Node.js 0.10
---
 test/long-stack-traces.js | 176 ++++++++++++++++++++++--------------------
 test/test.js              | 190 +++++++++++++++++++++++-----------------------
 2 files changed, 188 insertions(+), 178 deletions(-)

diff --git a/test/long-stack-traces.js b/test/long-stack-traces.js
index c77d6da..90615c2 100644
--- a/test/long-stack-traces.js
+++ b/test/long-stack-traces.js
@@ -1,10 +1,11 @@
-const t = require('tap');
-const StackUtils = require('../');
-const longStackTraces = require('./fixtures/long-stack-traces');
-const pify = require('pify');
-const nestedErrors = pify(require('./fixtures/nested-errors'), Promise);
+var t = require('tap');
+var StackUtils = require('../');
+var longStackTraces = require('./fixtures/long-stack-traces');
+var pify = require('pify');
+var Promise = require('bluebird');
+var nestedErrors = pify(require('./fixtures/nested-errors'), Promise);
 
-const {join, fixtureDir} = require('./_utils');
+var utils = require('./_utils');
 
 function internals() {
   return StackUtils.nodeInternals().concat([
@@ -15,84 +16,93 @@ function internals() {
   ]);
 }
 
-const stackUtils = new StackUtils({internals: internals(), cwd: fixtureDir});
-
-t.test('indents lines after first "From previous event:"', async t => {
-  const cleanedStack = stackUtils.clean(await longStackTraces.bluebird);
-  const expected = join([
-    'mostInner (produce-long-stack-traces.js:10:5)',
-    'From previous event:',
-    '    evenMoreInner (produce-long-stack-traces.js:9:29)',
-    'From previous event:',
-    '    inner (produce-long-stack-traces.js:8:28)',
-    'From previous event:',
-    '    outer (produce-long-stack-traces.js:7:27)',
-    'From previous event:',
-    '    Object.<anonymous> (produce-long-stack-traces.js:6:36)'
-  ]);
-
-  t.is(cleanedStack, expected);
+var stackUtils = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+
+t.test('indents lines after first "From previous event:"', function (t) {
+  return longStackTraces.bluebird
+    .then(function (stack) {
+      var cleanedStack = stackUtils.clean(stack);
+      var expected = utils.join([
+        'mostInner (produce-long-stack-traces.js:10:5)',
+        'From previous event:',
+        '    evenMoreInner (produce-long-stack-traces.js:9:29)',
+        'From previous event:',
+        '    inner (produce-long-stack-traces.js:8:28)',
+        'From previous event:',
+        '    outer (produce-long-stack-traces.js:7:27)',
+        'From previous event:',
+        '    Object.<anonymous> (produce-long-stack-traces.js:6:36)'
+      ]);
+
+      t.is(cleanedStack, expected);
+    });
 });
 
-t.test('removes empty "From previous event:" sections from the bottom', async t => {
-  const stack = await longStackTraces.bluebird.bottom;
-  const cleanedStack = stackUtils.clean(stack);
-
-  const expected = join([
-    'mostInner (produce-long-stack-traces.js:43:6)',
-    'From previous event:',
-    '    evenMoreInner (produce-long-stack-traces.js:42:30)',
-    'From previous event:',
-    '    inner (produce-long-stack-traces.js:41:29)',
-    'From previous event:',
-    '    outer (produce-long-stack-traces.js:40:28)'
-  ]);
-
-  t.is(cleanedStack, expected);
+t.test('removes empty "From previous event:" sections from the bottom', function (t) {
+  return longStackTraces.bluebird.bottom
+    .then(function (stack) {
+      var cleanedStack = stackUtils.clean(stack);
+
+      var expected = utils.join([
+        'mostInner (produce-long-stack-traces.js:43:6)',
+        'From previous event:',
+        '    evenMoreInner (produce-long-stack-traces.js:42:30)',
+        'From previous event:',
+        '    inner (produce-long-stack-traces.js:41:29)',
+        'From previous event:',
+        '    outer (produce-long-stack-traces.js:40:28)'
+      ]);
+
+      t.is(cleanedStack, expected);
+    });
 });
 
-t.test('removes empty "From previous event:" sections from the top', async t => {
-  const stack = await longStackTraces.bluebird.top;
-  const cleanedStack = stackUtils.clean(stack);
-
-  const expected = join([
-    'From previous event:',
-    '    evenMoreInner (produce-long-stack-traces.js:33:29)',
-    'From previous event:',
-    '    inner (produce-long-stack-traces.js:32:28)',
-    'From previous event:',
-    '    outer (produce-long-stack-traces.js:31:27)',
-    'From previous event:',
-    '    Object.<anonymous> (produce-long-stack-traces.js:30:40)'
-  ]);
-
-  t.is(cleanedStack, expected);
+t.test('removes empty "From previous event:" sections from the top', function (t) {
+  return longStackTraces.bluebird.top
+    then(function (stack) {
+      var cleanedStack = stackUtils.clean(stack);
+
+      var expected = utils.join([
+        'From previous event:',
+        '    evenMoreInner (produce-long-stack-traces.js:33:29)',
+        'From previous event:',
+        '    inner (produce-long-stack-traces.js:32:28)',
+        'From previous event:',
+        '    outer (produce-long-stack-traces.js:31:27)',
+        'From previous event:',
+        '    Object.<anonymous> (produce-long-stack-traces.js:30:40)'
+      ]);
+
+      t.is(cleanedStack, expected);
+    });
 });
 
-t.test('removes empty "From previous event:" sections from the middle', async t => {
-  const stack = await longStackTraces.bluebird.middle;
-  const cleanedStack = stackUtils.clean(stack);
-
-  const expected = join([
-    'mostInner (produce-long-stack-traces.js:22:5)',
-    'From previous event:',
-    '    evenMoreInner (produce-long-stack-traces.js:21:29)',
-    'From previous event:',
-    '    inner (produce-long-stack-traces.js:20:10)',
-    'From previous event:',
-    '    outer (produce-long-stack-traces.js:19:27)',
-    'From previous event:',
-    '    Object.<anonymous> (produce-long-stack-traces.js:18:43)'
-  ]);
-
-  t.match(cleanedStack, expected);
+t.test('removes empty "From previous event:" sections from the middle', function (t) {
+  return longStackTraces.bluebird.middle
+    then(function (stack) {
+      var cleanedStack = stackUtils.clean(stack);
+
+      var expected = utils.join([
+        'mostInner (produce-long-stack-traces.js:22:5)',
+        'From previous event:',
+        '    evenMoreInner (produce-long-stack-traces.js:21:29)',
+        'From previous event:',
+        '    inner (produce-long-stack-traces.js:20:10)',
+        'From previous event:',
+        '    outer (produce-long-stack-traces.js:19:27)',
+        'From previous event:',
+        '    Object.<anonymous> (produce-long-stack-traces.js:18:43)'
+      ]);
+
+      t.match(cleanedStack, expected);
+    });
 });
 
-t.test('removes empty "Caused by:" sections from the top', t => {
-  nestedErrors.top(stack => {
-    const cleanedStack = stackUtils.clean(stack);
+t.test('removes empty "Caused by:" sections from the top', function (t) {
+  nestedErrors.top(function (stack) {
+    var cleanedStack = stackUtils.clean(stack);
 
-    const expected = join([
+    var expected = utils.join([
       'Caused By: Error: baz',
       '    Object.module.exports.top (nested-errors.js:36:5)'
     ]);
@@ -102,11 +112,11 @@ t.test('removes empty "Caused by:" sections from the top', t => {
   });
 });
 
-t.test('removes empty "Caused by:" sections from the bottom', t => {
-  nestedErrors.bottom(stack => {
-    const cleanedStack = stackUtils.clean(stack);
+t.test('removes empty "Caused by:" sections from the bottom', function (t) {
+  nestedErrors.bottom(function (stack) {
+    var cleanedStack = stackUtils.clean(stack);
 
-    const expected = join([
+    var expected = utils.join([
       'nested (nested-errors.js:9:6)',
       'moreNested (nested-errors.js:15:3)',
       'Caused By: BarError: bar: internal',
@@ -118,11 +128,11 @@ t.test('removes empty "Caused by:" sections from the bottom', t => {
   });
 });
 
-t.test('removes empty "Caused by:" sections from the middle', t => {
-  nestedErrors.middle(stack => {
-    const cleanedStack = stackUtils.clean(stack);
+t.test('removes empty "Caused by:" sections from the middle', function (t) {
+  nestedErrors.middle(function (stack) {
+    var cleanedStack = stackUtils.clean(stack);
 
-    const expected = join([
+    var expected = utils.join([
       'nested-errors.js:41:6',
       'Caused By: Error: bar',
       '    Object.module.exports.middle (nested-errors.js:42:5)'
diff --git a/test/test.js b/test/test.js
index 6bb8634..23aa57d 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,8 +1,8 @@
-const path = require('path');
-const t = require('tap');
-const StackUtils = require('../');
-const CaptureFixture = require('./fixtures/capture-fixture');
-const {join, fixtureDir} = require('./_utils');
+var path = require('path');
+var t = require('tap');
+var StackUtils = require('../');
+var CaptureFixture = require('./fixtures/capture-fixture');
+var utils = require('./_utils');
 
 // Use a fixed known set of native modules, since this changes
 // depending on the version of Node we're testing with.
@@ -96,22 +96,22 @@ StackUtils.natives = [
   'node'
 ];
 
-const LinuxStack1 = join(linuxStack1(), internalStack());
-const WindowsStack1 = join(windowsStack1(), internalStack());
+var LinuxStack1 = utils.join(linuxStack1(), internalStack());
+var WindowsStack1 = utils.join(windowsStack1(), internalStack());
 
-const version = process.version.slice(1).split('.').map(function (val) {
+var version = process.version.slice(1).split('.').map(function (val) {
   return parseInt(val, 10);
 });
 
-t.test('must be called with new', t => {
+t.test('must be called with new', function (t) {
   t.is(typeof StackUtils, 'function');
-  const stackUtils = StackUtils;
-  t.throws(() => stackUtils());
+  var stackUtils = StackUtils;
+  t.throws(function () { stackUtils() });
   t.end()
 });
 
-t.test('clean: truncates cwd', t => {
-  const expected = join([
+t.test('clean: truncates cwd', function (t) {
+  var expected = utils.join([
     'foo (foo.js:3:8)',
     'bar (foo.js:7:2)',
     'bar (bar.js:4:2)',
@@ -133,7 +133,7 @@ t.test('clean: truncates cwd', t => {
     'startup (node.js:141:18)'
   ]);
 
-  let stack = new StackUtils({cwd: '/user/dev/project'});
+  var stack = new StackUtils({cwd: '/user/dev/project'});
   t.is(stack.clean(LinuxStack1), expected, 'accepts a linux string');
   t.is(stack.clean(LinuxStack1.split('\n')), expected, 'accepts an array');
   t.is(stack.clean(LinuxStack1.split('\n').slice(1)), expected, 'slices off the message line');
@@ -143,9 +143,9 @@ t.test('clean: truncates cwd', t => {
   t.end()
 });
 
-t.test('clean: eliminates internals', t => {
-  let stack = new StackUtils({cwd: '/user/dev', internals: StackUtils.nodeInternals()});
-  var expected = join([
+t.test('clean: eliminates internals', function (t) {
+  var stack = new StackUtils({cwd: '/user/dev', internals: StackUtils.nodeInternals()});
+  var expected = utils.join([
     'foo (project/foo.js:3:8)',
     'bar (project/foo.js:7:2)',
     'bar (project/bar.js:4:2)',
@@ -158,18 +158,18 @@ t.test('clean: eliminates internals', t => {
   t.end()
 });
 
-t.test('clean: returns null if it is all internals', t => {
-  const stack = new StackUtils({internals: StackUtils.nodeInternals()});
-  t.is(stack.clean(join(internalStack())), '');
+t.test('clean: returns null if it is all internals', function (t) {
+  var stack = new StackUtils({internals: StackUtils.nodeInternals()});
+  t.is(stack.clean(utils.join(internalStack())), '');
   t.end()
 });
 
-t.test('captureString: two redirects', t => {
-  const stack = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stack);
+t.test('captureString: two redirects', function (t) {
+  var stack = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stack);
 
-  const capturedString = capture.redirect1('redirect2', 'call', 'captureString');
-  t.is(capturedString, join([
+  var capturedString = capture.redirect1('redirect2', 'call', 'captureString');
+  t.is(capturedString, utils.join([
     'CaptureFixture.call (capture-fixture.js:23:28)',
     'CaptureFixture.redirect2 (capture-fixture.js:17:22)',
     'CaptureFixture.redirect1 (capture-fixture.js:11:22)'
@@ -177,79 +177,79 @@ t.test('captureString: two redirects', t => {
   t.end()
 });
 
-t.test('captureString: with startStack function', t => {
-  const stack = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stack);
+t.test('captureString: with startStack function', function (t) {
+  var stack = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stack);
 
-  const capturedString = capture.redirect1('redirect2', 'call', 'captureString', capture.call);
-  t.is(capturedString, join([
+  var capturedString = capture.redirect1('redirect2', 'call', 'captureString', capture.call);
+  t.is(capturedString, utils.join([
     'CaptureFixture.redirect2 (capture-fixture.js:17:22)',
     'CaptureFixture.redirect1 (capture-fixture.js:11:22)'
   ]));
   t.end()
 });
 
-t.test('captureString: with limit', t => {
-  const stack = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stack);
+t.test('captureString: with limit', function (t) {
+  var stack = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stack);
 
-  const capturedString = capture.redirect1('redirect2', 'call', 'captureString', 1);
-  t.is(capturedString, join([
+  var capturedString = capture.redirect1('redirect2', 'call', 'captureString', 1);
+  t.is(capturedString, utils.join([
     'CaptureFixture.call (capture-fixture.js:23:28)'
   ]));
   t.end()
 });
 
-t.test('captureString: with limit and startStack', t => {
-  const stack = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stack);
+t.test('captureString: with limit and startStack', function (t) {
+  var stack = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stack);
 
-  const capturedString = capture.redirect1('redirect2', 'call', 'captureString', 1, capture.call);
-  t.is(capturedString, join([
+  var capturedString = capture.redirect1('redirect2', 'call', 'captureString', 1, capture.call);
+  t.is(capturedString, utils.join([
     'CaptureFixture.redirect2 (capture-fixture.js:17:22)'
   ]));
   t.end()
 });
 
-t.test('capture returns an array of call sites', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
-  const stack = capture.redirect1('call', 'capture').slice(0, 2);
-  t.is(stack[0].getFileName(), path.join(fixtureDir, 'capture-fixture.js'));
+t.test('capture returns an array of call sites', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
+  var stack = capture.redirect1('call', 'capture').slice(0, 2);
+  t.is(stack[0].getFileName(), path.join(utils.fixtureDir, 'capture-fixture.js'));
   t.is(stack[0].getFunctionName(), 'CaptureFixture.call');
   t.is(stack[1].getFunctionName(), 'CaptureFixture.redirect1');
   t.end()
 });
 
-t.test('capture: with limit', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
-  const stack = capture.redirect1('redirect2', 'call', 'capture', 1);
+t.test('capture: with limit', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
+  var stack = capture.redirect1('redirect2', 'call', 'capture', 1);
   t.is(stack.length, 1);
   t.is(stack[0].getFunctionName(), 'CaptureFixture.call');
   t.end()
 });
 
-t.test('capture: with stackStart function', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
-  const stack = capture.redirect1('redirect2', 'call', 'capture', capture.call);
+t.test('capture: with stackStart function', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
+  var stack = capture.redirect1('redirect2', 'call', 'capture', capture.call);
   t.true(stack.length > 1);
   t.is(stack[0].getFunctionName(), 'CaptureFixture.redirect2');
   t.end()
 });
 
-t.test('capture: with limit and stackStart function', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
-  const stack = capture.redirect1('redirect2', 'call', 'capture', 1, capture.call);
+t.test('capture: with limit and stackStart function', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
+  var stack = capture.redirect1('redirect2', 'call', 'capture', 1, capture.call);
   t.is(stack.length, 1);
   t.is(stack[0].getFunctionName(), 'CaptureFixture.redirect2');
   t.end()
 });
 
-t.test('capture: with wrapCallSite function', t => {
-  const wrapper = function (callsite) {
+t.test('capture: with wrapCallSite function', function (t) {
+  var wrapper = function (callsite) {
     return {
       getMethodName: function () {
         return callsite.getMethodName();
@@ -259,19 +259,19 @@ t.test('capture: with wrapCallSite function', t => {
       }
     };
   };
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir, wrapCallSite: wrapper});
-  const capture = new CaptureFixture(stackUtil);
-  const stack = capture.redirect1('redirect2', 'call', 'capture', 1, capture.call);
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir, wrapCallSite: wrapper});
+  var capture = new CaptureFixture(stackUtil);
+  var stack = capture.redirect1('redirect2', 'call', 'capture', 1, capture.call);
   t.is(stack.length, 1);
   t.is(stack[0].getFunctionName(), 'testOverrideFunctionName');
   t.is(stack[0].getMethodName(), 'redirect2');
   t.end()
 });
 
-t.test('at', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
-  const at = capture.redirect1('call', 'at');
+t.test('at', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
+  var at = capture.redirect1('call', 'at');
 
   t.same(at, {
     file: 'capture-fixture.js',
@@ -284,14 +284,14 @@ t.test('at', t => {
   t.end()
 });
 
-t.test('at: with stackStart', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: __dirname});
-  const capture = new CaptureFixture(stackUtil);
+t.test('at: with stackStart', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: __dirname});
+  var capture = new CaptureFixture(stackUtil);
 
-  const at = capture.redirect1('call', 'at', capture.call);
+  var at = capture.redirect1('call', 'at', capture.call);
 
   t.same(at, {
-    file: `fixtures/capture-fixture.js`,
+    file: 'fixtures/capture-fixture.js',
     line: 11,
     column: 22,
     type: 'CaptureFixture',
@@ -301,11 +301,11 @@ t.test('at: with stackStart', t => {
   t.end()
 });
 
-t.test('at: inside a constructor call', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
+t.test('at: inside a constructor call', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
 
-  const at = capture.const('call', 'at', capture.call);
+  var at = capture.const('call', 'at', capture.call);
 
   // TODO: File an issue - if this assert fails, the power assert diagram renderer blows up.
   t.same(at, {
@@ -319,11 +319,11 @@ t.test('at: inside a constructor call', t => {
   t.end()
 });
 
-t.test('at: method on an [Object] instance', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
+t.test('at: method on an [Object] instance', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
 
-  const at = capture.const('obj', 'foo', 'call', 'at', capture.call);
+  var at = capture.const('obj', 'foo', 'call', 'at', capture.call);
 
   t.same(at, {
     file: 'capture-fixture.js',
@@ -335,8 +335,8 @@ t.test('at: method on an [Object] instance', t => {
   t.end()
 });
 
-t.test('at: returns empty object if #capture() returns an empty stack', t => {
-  const stackUtil = new StackUtils();
+t.test('at: returns empty object if #capture() returns an empty stack', function (t) {
+  var stackUtil = new StackUtils();
   stackUtil.capture = function () {
     return [];
   };
@@ -344,12 +344,12 @@ t.test('at: returns empty object if #capture() returns an empty stack', t => {
   t.end()
 });
 
-t.test('at: eval', t => {
-  const stackUtil = new StackUtils({internals: internals(), cwd: fixtureDir});
-  const capture = new CaptureFixture(stackUtil);
+t.test('at: eval', function (t) {
+  var stackUtil = new StackUtils({internals: internals(), cwd: utils.fixtureDir});
+  var capture = new CaptureFixture(stackUtil);
 
-  const at = capture.eval('call', 'at', capture.call);
-  const expected = {
+  var at = capture.eval('call', 'at', capture.call);
+  var expected = {
     line: 1,
     column: 14,
     evalOrigin: /eval at (<anonymous>|CaptureFixture.eval) \(.*capture-fixture.js:57:9\)/,
@@ -366,9 +366,9 @@ t.test('at: eval', t => {
   t.end()
 });
 
-t.test('parseLine', t => {
-  const stack = new StackUtils({internals: internals(), cwd: '/user/dev/project'});
-  const capture = new CaptureFixture(stack);
+t.test('parseLine', function (t) {
+  var stack = new StackUtils({internals: internals(), cwd: '/user/dev/project'});
+  var capture = new CaptureFixture(stack);
 
   t.same(stack.parseLine('foo'), null, 'should not match');
 
@@ -403,16 +403,16 @@ t.test('parseLine', t => {
   });
 
   // EVAL
-  const evalStack = capture.eval('error', 'foo').stack.split('\n');
+  var evalStack = capture.eval('error', 'foo').stack.split('\n');
 
-  const expected = {
+  var expected = {
     file: '<anonymous>',
     line: 1,
     column: 14,
     evalOrigin: /CaptureFixture.eval|<anonymous>/,
     evalLine: 57,
     evalColumn: 9,
-    evalFile: path.join(fixtureDir, 'capture-fixture.js').replace(/\\/g, '/'),
+    evalFile: path.join(utils.fixtureDir, 'capture-fixture.js').replace(/\\/g, '/'),
     function: 'eval'
   };
 
@@ -420,13 +420,13 @@ t.test('parseLine', t => {
     expected.function = 'CaptureFixture.eval';
   }
 
-  const actual = stack.parseLine(evalStack[2]);
+  var actual = stack.parseLine(evalStack[2]);
 
   t.match(actual, expected);
   t.end()
 });
 
-t.test('parseLine: handles native errors', t => {
+t.test('parseLine: handles native errors', function (t) {
   t.same(StackUtils.parseLine('    at Error (native)'), {
     native: true,
     function: 'Error'
@@ -434,7 +434,7 @@ t.test('parseLine: handles native errors', t => {
   t.end()
 });
 
-t.test('parseLine: handles parens', t => {
+t.test('parseLine: handles parens', function (t) {
   var line = '    at X.<anonymous> (/USER/Db (Person)/x/y.js:14:11)';
   t.same(StackUtils.parseLine(line), {
     line: 14,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stack-utils.git



More information about the Pkg-javascript-commits mailing list