Skip to content

Commit

Permalink
chore(ci): start using Mocha for #41
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jul 10, 2017
1 parent 5dce4bf commit 6fed809
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 36 deletions.
5 changes: 1 addition & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
complexity: {
default: grunt.file.readJSON('complexity.json')
},
'nice-package': {
all: {
options: {}
Expand All @@ -22,5 +19,5 @@ module.exports = function(grunt) {
var plugins = require('matchdep').filterDev('grunt-*');
plugins.forEach(grunt.loadNpmTasks);

grunt.registerTask('default', ['nice-package', 'complexity', 'filenames']);
grunt.registerTask('default', ['nice-package', 'filenames']);
};
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"grunt-nice-package": "0.10.3",
"gt": "0.10.0",
"matchdep": "1.0.1",
"mocha": "3.4.2",
"pkgfiles": "2.3.0",
"pre-git": "3.12.0",
"proxyquire": "1.7.10",
Expand All @@ -68,6 +69,7 @@
"files": [
"src/",
"!src/test",
"!src/*-spec.js",
"bin"
],
"homepage": "https://github.com/bahmutov/npm-utils",
Expand All @@ -94,9 +96,11 @@
"issues": "git-issues",
"lint": "standard --verbose --fix src/*.js",
"pkgfiles": "pkgfiles",
"posttest": "npm run unit",
"pretest": "npm run lint",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
"test": "gt src/test/*.js --output"
"test": "gt src/test/*.js --output",
"unit": "mocha src/*-spec.js"
}
}
40 changes: 40 additions & 0 deletions src/module-install-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const la = require('lazy-ass')
const is = require('check-more-types')

/* global describe, it */
describe('module install', () => {
const install = require('./module-install')
// const path = require('path')

it('is a function', () => {
la(is.fn(install))
})

// it('install into tmp folder', function () {
// gt.func(install, 'install is a function');
// var options = {
// name: 'lodash',
// prefix: '/tmp/lodash-prefix/',
// registry: 'http://registry.npmjs.org/'
// };
// install(options).then(function () {
// return path.join(options.prefix, '/lib/node_modules/' + options.name);
// })
// .finally(gt.start)
// .done();
// });

// gt.async('passes command line flags', function () {
// var options = {
// name: 'lodash',
// prefix: '/tmp/lodash-prefix/',
// registry: 'http://registry.npmjs.org/',
// flags: ['--verbose']
// };
// install(options).then(function () {
// return path.join(options.prefix, '/lib/node_modules/' + options.name);
// })
// .finally(gt.start)
// .done();
// });
})
31 changes: 0 additions & 31 deletions src/test/module-install.js

This file was deleted.

0 comments on commit 6fed809

Please sign in to comment.