diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-06-26 04:11:39 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-07-02 05:49:45 +0400 |
commit | 2793877f5b412c200a249f928f81b4d1bc03a35f (patch) | |
tree | d580faf024533cf3098536b543f2b644359d14aa /test | |
parent | 0c007eefb50baa7dc41b5f13e565595217e64563 (diff) |
opportunistic linting
Diffstat (limited to 'test')
-rw-r--r-- | test/common-tap.js | 2 | ||||
-rw-r--r-- | test/tap/outdated-notarget.js | 44 |
2 files changed, 23 insertions, 23 deletions
diff --git a/test/common-tap.js b/test/common-tap.js index d6d09ed9b..3a1f584a7 100644 --- a/test/common-tap.js +++ b/test/common-tap.js @@ -26,7 +26,7 @@ exports.npm = function (cmd, opts, cb) { child.on("error", cb) - child.on("close", function (code, signal) { + child.on("close", function (code) { cb(null, code, stdout, stderr) }) } diff --git a/test/tap/outdated-notarget.js b/test/tap/outdated-notarget.js index 79fb88c67..782f6f7d5 100644 --- a/test/tap/outdated-notarget.js +++ b/test/tap/outdated-notarget.js @@ -1,23 +1,23 @@ // Fixes Issue #1770 -var common = require('../common-tap.js') -var test = require('tap').test -var npm = require('../../') -var osenv = require('osenv') -var path = require('path') -var fs = require('fs') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'outdated-notarget') -var cache = path.resolve(pkg, 'cache') -var mr = require('npm-registry-mock') +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var pkg = path.resolve(__dirname, "outdated-notarget") +var cache = path.resolve(pkg, "cache") +var mr = require("npm-registry-mock") -test('outdated-target: if no viable version is found, show error', function(t) { +test("outdated-target: if no viable version is found, show error", function(t) { t.plan(1) setup() mr({port: common.port}, function(s) { npm.load({ cache: cache, registry: common.registry}, function() { - npm.commands.update(function(er, d) { - t.equal(er.code, 'ETARGET') + npm.commands.update(function(er) { + t.equal(er.code, "ETARGET") s.close() t.end() }) @@ -25,7 +25,7 @@ test('outdated-target: if no viable version is found, show error', function(t) { }) }) -test('cleanup', function(t) { +test("cleanup", function(t) { process.chdir(osenv.tmpdir()) rimraf.sync(pkg) t.end() @@ -34,14 +34,14 @@ test('cleanup', function(t) { function setup() { mkdirp.sync(pkg) mkdirp.sync(cache) - fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ - author: 'Evan Lucas', - name: 'outdated-notarget', - version: '0.0.0', - description: 'Test for outdated-target', + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + author: "Evan Lucas", + name: "outdated-notarget", + version: "0.0.0", + description: "Test for outdated-target", dependencies: { - underscore: '~199.7.1' + underscore: "~199.7.1" } - }), 'utf8') + }), "utf8") process.chdir(pkg) } |