From 9950c02ca47aed811dcc34e379f09ea966e3bc97 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 16 Aug 2016 17:26:44 +0300 Subject: [PATCH] Fix uninstall API function, test the API --- index.js | 2 +- test/index.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ed8695a3cc..31917dbc28 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict' const install = require('./lib/api/install') -const uninstall = require('./lib/api/install') +const uninstall = require('./lib/api/uninstall') module.exports = { install, diff --git a/test/index.js b/test/index.js index b887cfe170..02dd9130d1 100644 --- a/test/index.js +++ b/test/index.js @@ -33,6 +33,15 @@ function isExecutable (t, filePath) { t.ok(isexe(filePath), filePath + ' is executable') } +test('API', t => { + const pnpm = require('..') + + t.equal(typeof pnpm.install, 'function', 'exports install()') + t.equal(typeof pnpm.install, 'function', 'exports installPkgDeps()') + t.equal(typeof pnpm.uninstall, 'function', 'exports uninstall()') + t.end() +}) + test('small with dependencies (rimraf)', function (t) { prepare() install(['rimraf@2.5.1'], { quiet: true })