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

literate-jasmine

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

literate-jasmine - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

4

package.json
{
"name": "literate-jasmine",
"description": "write tests in markdown that are parsed and then run using jasmine",
"version": "0.0.18",
"description": "write jasmine tests in markdown",
"version": "0.0.19",
"bin": {

@@ -6,0 +6,0 @@ "literate-jasmine": "./bin/literate-jasmine"

@@ -9,2 +9,18 @@ require('jasmine-node');

var isHeader = function(node) {
return node[0] === 'header';
};
var isCodeBlock = function(node) {
return node[0] === 'code_block';
};
var getName = function(node) {
return node[2];
};
var getLevel = function(node) {
return node[1].level;
};
parser = {

@@ -15,3 +31,3 @@ parse: function(text) {

complete = {
name: root[2],
name: getName(root),
describes: []

@@ -50,3 +66,3 @@ };

parsedDescribe = {
name: node[2],
name: getName(node),
it: []

@@ -62,3 +78,3 @@ };

if (!child || child[0] === 'header' && child[1].level < IT_LEVEL) {
if (!child || isHeader(child) && getLevel(child) < IT_LEVEL) {
break;

@@ -86,3 +102,3 @@ }

it = {
name: node[2]
name: getName(node)
};

@@ -104,7 +120,7 @@

if (!child || child[0] === 'header') {
if (!child || isHeader(child)) {
break;
}
if (child[0] === 'code_block') {
if (isCodeBlock(child)) {
code_blocks.push(child[1]);

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

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