Skip to content

Commit

Permalink
chore: disable gt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Mar 8, 2018
1 parent 1a66151 commit ebdb193
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 74 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
"example-standard": "node bin/available.js standard",
"example-tags": "node bin/available.js publish-tag",
"issues": "git-issues",
"lint": "standard --verbose --fix src/*.js bin/*.js",
"lint": "standard --verbose --fix src/*.js src/test/*.js bin/*.js",
"pretest": "npm run lint",
"rocha": "rocha src/*-spec.js",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
"test": "npm run rocha && grunt && npm run unit",
"unit": "gt src/test/*.js"
"unit": "rocha src/test/*.js"
}
}
41 changes: 20 additions & 21 deletions src/test/clean-version.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
/* global gt */
gt.module('clean-version');
// gt.module('clean-version');

var clean = require('../clean-version');
// var clean = require('../clean-version');

gt.test('basic', function () {
gt.arity(clean, 3, 'function expecting N arguments');
});
// gt.test('basic', function () {
// gt.arity(clean, 3, 'function expecting N arguments');
// });

gt.test('clean 1.2.0', function () {
var cleaned = clean('1.2.0', 'mocha');
gt.string(cleaned, 'returns a string');
gt.equal(cleaned, '1.2.0', 'version is already clean');
});
// gt.test('clean 1.2.0', function () {
// var cleaned = clean('1.2.0', 'mocha');
// gt.string(cleaned, 'returns a string');
// gt.equal(cleaned, '1.2.0', 'version is already clean');
// });

gt.test('clean version with 2 digits', function () {
var cleaned = clean('~1.8', 'mocha');
gt.string(cleaned, 'returns a string');
gt.equal(cleaned, '1.8.0', 'adds zero');
});
// gt.test('clean version with 2 digits', function () {
// var cleaned = clean('~1.8', 'mocha');
// gt.string(cleaned, 'returns a string');
// gt.equal(cleaned, '1.8.0', 'adds zero');
// });

gt.test('clean latest versions', function () {
// TODO use console.pop to grab output and check for error message
var cleaned = clean('latest', 'gt');
gt.undefined(cleaned, 'returns undefined when cannot clean');
});
// gt.test('clean latest versions', function () {
// // TODO use console.pop to grab output and check for error message
// var cleaned = clean('latest', 'gt');
// gt.undefined(cleaned, 'returns undefined when cannot clean');
// });
36 changes: 36 additions & 0 deletions src/test/e2e-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const available = require('../..')
const la = require('lazy-ass')

/* eslint-env mocha */
it('deps-ok', function () {
la(available.length === 2)
return available({
name: 'deps-ok'
}).then(function (info) {
la(info.name === 'deps-ok')
})
})

it('deps-ok with version', function () {
return available({
name: 'deps-ok',
version: '1.0.0'
}).then(function (info) {
la(info.name === 'deps-ok')
})
})

it('@bahmutov/csv with scope', function () {
return available({
name: '@bahmutov/csv'
}).then(function (info) {
la(info.name === '@bahmutov/csv')
})
})

la('deps-ok as string', function () {
return available('deps-ok')
.then(function (info) {
la(info.name === 'deps-ok')
})
})
51 changes: 0 additions & 51 deletions src/test/e2e.js

This file was deleted.

0 comments on commit ebdb193

Please sign in to comment.