literate-jasmine
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "literate-jasmine", | ||
"description": "write tests in markdown that are parsed to specification files to run with jasmine-node", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"bin": { | ||
@@ -6,0 +6,0 @@ "literate-jasmine": "./bin/literate-jasmine" |
@@ -6,5 +6,5 @@ describe("literate-jasmine ", function() { | ||
b = 2; | ||
console.log(a, b, a + b); | ||
expect(a + b).toBe(3); | ||
@@ -19,3 +19,3 @@ }); | ||
var text = "abc"; | ||
expect(text + "d").toBe("abcd"); | ||
@@ -27,3 +27,3 @@ }); | ||
var text = "abc"; | ||
expect(text + "d").toBe("abcd"); | ||
@@ -30,0 +30,0 @@ }); |
var fs = require('fs'); | ||
var indentLine = function(text, numberOfSpaces) { | ||
for (var i=0; i < numberOfSpaces; i++) { | ||
text = ' ' + text; | ||
if (text.replace(/\s+/, '') !== '') { | ||
for (var i=0; i < numberOfSpaces; i++) { | ||
text = ' ' + text; | ||
} | ||
} | ||
@@ -20,5 +22,8 @@ return text; | ||
var lines = []; | ||
lines.push('describe("' + parserOutput.name + '", function() {'); | ||
parserOutput.describes.forEach(function(describe) { | ||
lines.push(indentLine('describe("' + describe.name + '", function() {', 2)); | ||
describe.it.forEach(function(it) { | ||
@@ -29,4 +34,6 @@ lines.push(indentLine('it("' + it.name + '", function() {', 4)); | ||
}); | ||
lines.push(indentLine('});', 2)); | ||
}); | ||
lines.push('});'); | ||
@@ -33,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12048
252
2