Socket
Socket
Sign inDemoInstall

baset-cli

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baset-cli - npm Package Compare versions

Comparing version 0.13.4 to 0.13.6

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.13.6"></a>
## [0.13.6](https://github.com/Igmat/baset/compare/v0.13.5...v0.13.6) (2018-06-10)
### Bug Fixes
* **cli:** better initial output ([cff1126](https://github.com/Igmat/baset/commit/cff1126))
<a name="0.13.4"></a>

@@ -8,0 +19,0 @@ ## [0.13.4](https://github.com/Igmat/baset/compare/v0.13.3...v0.13.4) (2018-06-08)

15

dist/commands/test.js

@@ -51,3 +51,2 @@ "use strict";

const [allSpecs, allBaselines] = yield Promise.all([glob_promise_1.default(argv.specs), glob_promise_1.default(argv.bases)]);
const tester = new baset_core_1.Tester(argv.plugins, argv.options, argv.isolateContext);
const specs = allSpecs.filter(filterNodeModules);

@@ -63,8 +62,10 @@ const baselines = allBaselines.filter(filterNodeModules);

try {
const { tapStream, finish } = TAP_1.getTapStream(tester.test(specs, baselines));
if (reporterIsSkipped)
tapStream.pipe(process.stdout);
else
tapStream.pipe(require(argv.reporter)()).pipe(process.stdout);
const results = yield finish;
const outStream = (reporterIsSkipped)
? process.stdout
: require(argv.reporter)();
if (!reporterIsSkipped)
outStream.pipe(process.stdout);
const { finish } = TAP_1.getTapStream(specs.length, outStream);
const tester = new baset_core_1.Tester(argv.plugins, argv.options, argv.isolateContext);
const results = yield finish(() => tester.test(specs, baselines));
isSucceeded = !(results.failed) && !(results.crashed);

@@ -71,0 +72,0 @@ }

/// <reference types="node" />
import { tap } from 'baset-core';
import { Readable } from 'stream';
export declare function getTapStream(results: Promise<{
name: string;
options: tap.Options;
}>[]): {
tapStream: Readable;
finish: Promise<tap.IStats>;
import { Writable } from 'stream';
export declare function getTapStream(count: number, outStream: Writable): {
finish: (getResults: () => Promise<{
name: string;
options: tap.Options;
}>[]) => Promise<tap.IStats>;
};

@@ -30,2 +30,5 @@ "use strict";

}
function plan(count) {
return `1..${count}\n`;
}
function test(title, options) {

@@ -70,3 +73,3 @@ let directive = '';

return [
`\n1..${stats.passed + stats.failed + stats.skipped + stats.todo}`,
// `\n1..${stats.passed + stats.failed + stats.skipped + stats.todo}`,
`# tests ${stats.passed + stats.failed + stats.skipped}`,

@@ -78,3 +81,6 @@ `# pass ${stats.passed}`,

}
function getTapStream(results) {
function diagnostic(message) {
return `# ${message}\n`;
}
function getTapStream(count, outStream) {
const tapStream = new stream_1.Readable({

@@ -84,33 +90,40 @@ objectMode: true,

});
const finish = (() => __awaiter(this, void 0, void 0, function* () {
const stats = {
crashed: 0,
failed: 0,
passed: 0,
skipped: 0,
todo: 0,
};
tapStream.push(start());
for (const result of results) {
const { name, options } = yield result;
if (options.passed) {
stats.passed++;
if (options.skip)
stats.skipped++;
function finish(getResults) {
return __awaiter(this, void 0, void 0, function* () {
const stats = {
crashed: 0,
failed: 0,
passed: 0,
skipped: 0,
todo: 0,
};
outStream.write(start());
outStream.write(plan(count));
outStream.write(diagnostic('Preparing test environment...'));
const results = getResults();
outStream.write(diagnostic('Test environment is ready'));
for (const result of results) {
const { name, options } = yield result;
if (options.passed) {
stats.passed++;
if (options.skip)
stats.skipped++;
}
else {
stats.failed++;
if (options.todo)
stats.todo++;
}
tapStream.push(test(name, options));
}
else {
stats.failed++;
if (options.todo)
stats.todo++;
}
tapStream.push(test(name, options));
}
tapStream.push(end(stats));
tapStream.emit('end');
tapStream.emit('close');
return stats;
}))();
return { tapStream, finish };
tapStream.push(end(stats));
tapStream.emit('end');
tapStream.emit('close');
return stats;
});
}
tapStream.pipe(outStream);
return { finish };
}
exports.getTapStream = getTapStream;
//# sourceMappingURL=TAP.js.map
{
"name": "baset-cli",
"version": "0.13.4",
"version": "0.13.6",
"description": "CLI for BaseT project.",

@@ -35,3 +35,3 @@ "keywords": [

"@types/yargs": "^11.0.0",
"baset": "^0.13.4",
"baset": "^0.13.6",
"doctoc": "^1.3.0",

@@ -42,3 +42,3 @@ "tslint": "^5.9.1",

"dependencies": {
"baset-core": "^0.13.4",
"baset-core": "^0.13.6",
"find-up": "^2.1.0",

@@ -45,0 +45,0 @@ "glob": "^7.1.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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