summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/node-gyp/test/test-configure-python.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/node-gyp/test/test-configure-python.js')
-rw-r--r--deps/npm/node_modules/node-gyp/test/test-configure-python.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/deps/npm/node_modules/node-gyp/test/test-configure-python.js b/deps/npm/node_modules/node-gyp/test/test-configure-python.js
index f235bdbba1..41b8c70427 100644
--- a/deps/npm/node_modules/node-gyp/test/test-configure-python.js
+++ b/deps/npm/node_modules/node-gyp/test/test-configure-python.js
@@ -1,21 +1,23 @@
'use strict'
-var test = require('tape')
-var path = require('path')
-var gyp = require('../lib/node-gyp')
-var requireInject = require('require-inject')
-var configure = requireInject('../lib/configure', {
+const test = require('tap').test
+const path = require('path')
+const gyp = require('../lib/node-gyp')
+const requireInject = require('require-inject')
+const configure = requireInject('../lib/configure', {
'graceful-fs': {
- 'openSync': function (file, mode) { return 0; },
- 'closeSync': function (fd) { },
+ 'openSync': function () { return 0 },
+ 'closeSync': function () { },
'writeFile': function (file, data, cb) { cb() },
'stat': function (file, cb) { cb(null, {}) }
}
})
-var EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib')
-var SEPARATOR = process.platform == 'win32' ? ';' : ':'
-var SPAWN_RESULT = { on: function () { } }
+const EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib')
+const SEPARATOR = process.platform === 'win32' ? ';' : ':'
+const SPAWN_RESULT = { on: function () { } }
+
+require('npmlog').level = 'warn'
test('configure PYTHONPATH with no existing env', function (t) {
t.plan(1)
@@ -40,11 +42,10 @@ test('configure PYTHONPATH with existing env of one dir', function (t) {
var prog = gyp()
prog.parseArgv([])
prog.spawn = function () {
-
- t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR))
+ t.equal(process.env.PYTHONPATH, [ EXPECTED_PYPATH, existingPath ].join(SEPARATOR))
var dirs = process.env.PYTHONPATH.split(SEPARATOR)
- t.deepEqual(dirs, [EXPECTED_PYPATH, existingPath])
+ t.deepEqual(dirs, [ EXPECTED_PYPATH, existingPath ])
return SPAWN_RESULT
}
@@ -56,17 +57,16 @@ test('configure PYTHONPATH with existing env of multiple dirs', function (t) {
var pythonDir1 = path.join('a', 'b')
var pythonDir2 = path.join('b', 'c')
- var existingPath = [pythonDir1, pythonDir2].join(SEPARATOR)
+ var existingPath = [ pythonDir1, pythonDir2 ].join(SEPARATOR)
process.env.PYTHONPATH = existingPath
var prog = gyp()
prog.parseArgv([])
prog.spawn = function () {
-
- t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR))
+ t.equal(process.env.PYTHONPATH, [ EXPECTED_PYPATH, existingPath ].join(SEPARATOR))
var dirs = process.env.PYTHONPATH.split(SEPARATOR)
- t.deepEqual(dirs, [EXPECTED_PYPATH, pythonDir1, pythonDir2])
+ t.deepEqual(dirs, [ EXPECTED_PYPATH, pythonDir1, pythonDir2 ])
return SPAWN_RESULT
}