Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coffee

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

8

HISTORY.md

@@ -1,4 +0,8 @@

# History
## 1.1.0 / 2015-05-23
---
- feat: expect error
- chore: use pkg.files
- chore: use pkg.scripts
- feat: Write data to process.stdout and process.stderr for debug
- fix coveralls image

@@ -5,0 +9,0 @@ ## 1.0.1 / 2015-05-15

@@ -13,2 +13,7 @@ 'use strict';

if (rule instanceof Error) {
debug('error object %j', rule);
rule = rule.message;
}
debug('actual: `%s`, expected: `%s`', show(actual), show(rule));

@@ -15,0 +20,0 @@

@@ -21,4 +21,9 @@ 'use strict';

Coffee.prototype.debug = function() {
this._debug = true;
return this;
};
// Only accept these type below for assertion
var acceptType = ['stdout', 'stderr', 'code'];
var acceptType = ['stdout', 'stderr', 'code', 'error'];
Coffee.prototype.expect = function(type, value) {

@@ -49,2 +54,3 @@ assert(!this._isEndCalled, 'can\'t call expect after end');

debug('output stdout `%s`', show(buf));
self._debug && process.stdout.write(buf);
self.stdout += buf;

@@ -56,2 +62,3 @@ });

debug('output stderr `%s`', show(buf));
self._debug && process.stderr.write(buf);
self.stderr += buf;

@@ -68,4 +75,9 @@ });

cmd.on('close', function (code) {
debug('output code `%s`', show(self.code));
cmd.once('error', function(err) {
self._debug && console.info(err);
self.error = err;
});
cmd.once('close', function (code) {
debug('output code `%s`', show(code));
self.code = code;

@@ -76,2 +88,3 @@ try {

assertion(self.waitAssert.code, self.code, 'should match code');
self.error && assertion(self.waitAssert.error, self.error.message, 'should match error message');
done();

@@ -99,2 +112,3 @@ } catch(err) {

this.code = null;
this.error = null;

@@ -105,6 +119,8 @@ // cache expected output

stdout: [],
code: []
code: [],
error: []
};
this.complete = false;
this._isEndCalled = false;
this._debug = false;
return this;

@@ -111,0 +127,0 @@ };

{
"name": "coffee",
"version": "1.0.1",
"version": "1.1.0",
"description": "Test command line on nodejs",

@@ -10,11 +10,12 @@ "main": "index",

"devDependencies": {
"autod": "2",
"jshint": "2",
"istanbul": "0",
"coveralls": "2",
"istanbul": "0",
"jshint": "*",
"mocha": "1",
"should": "~4.6.0"
"mocha": "2",
"should": "6"
},
"repository": {
"type": "git",
"url": "https://github.com/popomore/coffee"
"url": "git://github.com/popomore/coffee.git"
},

@@ -33,4 +34,12 @@ "homepage": "https://github.com/popomore/coffee",

"scripts": {
"test": "make test"
}
"lint": "jshint .",
"test": "_mocha -R spec -t 20000",
"cov": "jshint . && istanbul cover node_modules/mocha/bin/_mocha -- -R spec -t 20000",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"autod": "autod -e test/fixtures -f ~ -w"
},
"files": [
"index.js",
"lib"
]
}

@@ -9,3 +9,3 @@ # Coffee

[![Build Status](https://img.shields.io/travis/popomore/coffee.svg?style=flat)](https://travis-ci.org/popomore/coffee)
[![Build Status](https://img.shields.io/coveralls/popomore/coffee?style=flat)](https://coveralls.io/r/popomore/coffee)
[![Build Status](https://img.shields.io/coveralls/popomore/coffee.svg?style=flat)](https://coveralls.io/r/popomore/coffee)
[![NPM downloads](http://img.shields.io/npm/dm/coffee.svg?style=flat)](https://npmjs.org/package/coffee)

@@ -84,3 +84,3 @@

Accept type: `stdout`, `stderr`, `code`
Accept type: `stdout`, `stderr`, `code`, `error`

@@ -95,4 +95,8 @@ #### coffee.write(data)

#### coffee.debug()
Write data to process.stdout and process.stderr for debug
## LISENCE
Copyright (c) 2015 popomore. Licensed under the MIT license.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc