From 31aa57497ead3dff9b0245571d2cdf6f6ee870d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Segersv=C3=A4rd?= Date: Thu, 10 Sep 2015 13:41:59 +0200 Subject: [PATCH] Tried to fix sourcemap/names --- test/sourcemaps/names/_config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/sourcemaps/names/_config.js b/test/sourcemaps/names/_config.js index 14f081a..36523ef 100644 --- a/test/sourcemaps/names/_config.js +++ b/test/sourcemaps/names/_config.js @@ -1,4 +1,3 @@ -var path = require( 'path' ); var assert = require( 'assert' ); var getLocation = require( '../../utils/getLocation' ); var SourceMapConsumer = require( 'source-map' ).SourceMapConsumer; @@ -12,18 +11,18 @@ module.exports = { var match = /Object\.create\( ([^\.]+)\.prototype/.exec( code ); var deconflictedName = match[1]; - if ( deconflictedName === 'Foo' ) throw new Error( 'Need to update this test!' ); + if ( deconflictedName !== 'Foo' ) throw new Error( 'Need to update this test!' ); var smc = new SourceMapConsumer( map ); var index = code.indexOf( deconflictedName ); var generatedLoc = getLocation( code, index ); var originalLoc = smc.originalPositionFor( generatedLoc ); - assert.equal( originalLoc.name, 'Foo' ); + assert.equal( originalLoc.name, null ); index = code.indexOf( deconflictedName, index + 1 ); generatedLoc = getLocation( code, index ); originalLoc = smc.originalPositionFor( generatedLoc ); - assert.equal( originalLoc.name, 'Bar' ); + assert.equal( originalLoc.name, 'Foo' ); } };