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

acquit

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquit - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

4

History.md

@@ -0,1 +1,5 @@

0.6.0 / 2018-01-15
==================
* fix: only take last comment from each block to avoid esprima pulling incorrect comments
0.5.0 / 2017-07-17

@@ -2,0 +6,0 @@ ==================

4

lib/parse.js

@@ -27,3 +27,3 @@ var _ = require('lodash');

blocks: [],
comments: _.map(node.leadingComments || [], 'value')
comments: _.takeRight(_.map(node.leadingComments || [], 'value'))
};

@@ -39,3 +39,3 @@ context.push(block);

contents: node.expression.arguments[0].value,
comments: _.map(node.leadingComments || [], 'value'),
comments: _.takeRight(_.map(node.leadingComments || [], 'value')),
code: contents.substring(node.expression.arguments[1].body.range[0] + 1, node.expression.arguments[1].body.range[1] - 1)

@@ -42,0 +42,0 @@ };

{
"name": "acquit",
"version": "0.5.1",
"version": "0.6.0",
"description": "Parse BDD-style tests (Mocha, Jasmine) to generate documentation",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,2 +10,20 @@ var assert = require('assert');

});
it('handles trailing comments', function() {
var ret = acquit.parse(`
it('test 1', function() {
assert.equal('A', 'A');
// Trail comment
});
/* Header comment */
it('test 2', function() {
assert.equal('A', 'A');
});
`);
assert.equal(ret.length, 2);
assert.equal(ret[1].comments.length, 1);
assert.equal(ret[1].comments[0].trim(), 'Header comment');
});
});

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