Skip to content

Commit

Permalink
greenkeeper: completed set of safe upgrades and supporting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Jul 19, 2018
1 parent 64a9949 commit a655f42
Show file tree
Hide file tree
Showing 44 changed files with 15,580 additions and 914 deletions.
7 changes: 3 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ module.exports = (grunt) => {
nodeunit: {
tests: [
'test/unit/*.js',
'!test/unit/cargo-tessel.js',
'test/unit/deployment/*.js',
'test/unit/deployment/*.js'
]
},
jshint: {
Expand Down Expand Up @@ -96,8 +95,8 @@ module.exports = (grunt) => {
grunt.loadNpmTasks('grunt-jsbeautifier');


grunt.registerTask('test', ['jshint', 'jscs', 'nodeunit', 'nodeunit:files:cargo-tessel']);
grunt.registerTask('all', ['jsbeautifier', 'jshint', 'jscs', 'nodeunit', 'nodeunit:files:cargo-tessel']);
grunt.registerTask('test', ['jshint', 'jscs', 'nodeunit']);
grunt.registerTask('all', ['jsbeautifier', 'jshint', 'jscs', 'nodeunit']);

// Default task.
grunt.registerTask('default', ['all']);
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# t2-cli

[![Greenkeeper badge](https://badges.greenkeeper.io/tessel/t2-cli.svg)](https://greenkeeper.io/)

[![Code of Conduct](https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg?style=flat)](https://github.com/tessel/project/blob/master/CONDUCT.md)
[![Slack](http://tessel-slack.herokuapp.com/badge.svg)](https://tessel-slack.herokuapp.com/)
[![Travis-CI Build Status](https://travis-ci.org/tessel/t2-cli.svg?branch=master)](https://travis-ci.org/tessel/t2-cli)
Expand Down Expand Up @@ -81,7 +83,7 @@ Unit tests are found in the [`test/unit/`](https://github.com/tessel/t2-cli/tree
// The module name is usually the name of the function being tested, i.e. Tessel.prototype.findAvailableNetworks
exports['functionName'] = {
// this is called before the each test is run
setUp: function(done) {
setUp(done) {
// sinon is used to watch and mock parts of the Tessel codebase used by the tested function
this.sandbox = sinon.sandbox.create();
this.functionName = this.sandbox.spy(Tessel.prototype, 'functionName');
Expand All @@ -93,14 +95,14 @@ exports['functionName'] = {
},

// this is called after each test is run, should cleanup all mocks
tearDown: function(done) {
tearDown(done) {
this.tessel.mockClose();
this.sandbox.restore();
done();
},

// this should be something recognizable and clearly states what outcome of the function is being tested
testName: function(test) {
testName(test) {
// the number of assertions the test should expect
test.expect(1);

Expand Down
3 changes: 3 additions & 0 deletions bin/cargo-tessel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var parser = require('nomnom');
var log = require('../lib/log');
var rust = require('../lib/install/rust');

/* istanbul ignore next */
function closeCommand(error) {
// TODO: refactor into closeSuccessfulCommand and closeFailedCommand,
// similar to tessel-2.js
Expand Down Expand Up @@ -61,6 +62,7 @@ module.exports = function(args) {
parser.parse(args);
};

/* istanbul ignore if */
if (require.main === module) {
if (process.argv[2] === 'tessel') {
/*
Expand Down Expand Up @@ -96,6 +98,7 @@ if (require.main === module) {
}
}

/* istanbul ignore else */
if (global.IS_TEST_ENV) {
module.exports.nomnom = parser;
}

0 comments on commit a655f42

Please sign in to comment.