Comparing version 0.1.3 to 0.2.0
# Changelog | ||
## 0.1.4 | ||
* Add support for 'pending' tag (you can add it to fenced code blocks) | ||
* Fix -v version output | ||
## 0.1.3 | ||
@@ -4,0 +9,0 @@ |
var runner = require('./runner') | ||
, LiterAPI = require('./') | ||
@@ -3,0 +4,0 @@ var usageMessage = |
@@ -93,5 +93,7 @@ var request = require('request') | ||
vowsCompiler.prototype.matchers = function (batch, params) { | ||
var pending = (params.token && params.token.tags && params.token.tags.match(/\bpending\b/)) ? 'pending' : null | ||
var self = this | ||
batch[params.label] = function(error, result) { | ||
batch[params.label] = pending || function(error, result) { | ||
assert.equal(result.statusCode, params.code, "Got status code: " + result.statusCode) | ||
@@ -102,3 +104,3 @@ } | ||
for (var key in headers) { | ||
batch[key + ": " + headers[key]] = function(key) { | ||
batch[key + ": " + headers[key]] = pending || function(key) { | ||
return function(error, result) { | ||
@@ -122,3 +124,3 @@ var pattern, header = self.substitute(headers[key]) | ||
if (params.body) { | ||
batch[params.body.replace(/\s+/g, " ")] = function(error, result) { | ||
batch[params.body.replace(/\s+/g, " ")] = pending || function(error, result) { | ||
try { | ||
@@ -147,3 +149,3 @@ var exp = new JSONExp(params.body) | ||
} else { | ||
batch["Empty response body"] = function(error, result) { | ||
batch["Empty response body"] = pending || function(error, result) { | ||
assert.ok(!result.body, "Body should be empty, but was actually: '" + result.body + "'") | ||
@@ -150,0 +152,0 @@ } |
@@ -19,4 +19,5 @@ var LiterAPI = require('literapi') | ||
token.tags = 'ok' | ||
if (batch.broken || batch.errored) token.tags = 'fail' | ||
else token.tags = 'ok' | ||
if (batch.pending) token.tags = 'pending' | ||
@@ -23,0 +24,0 @@ token.refresh() |
{ "name": "literapi" | ||
, "version": "0.1.3" | ||
, "version": "0.2.0" | ||
, "description": "Literate testing for HTTP APIs using markdown" | ||
@@ -4,0 +4,0 @@ , "keywords": ["testing", "test", "api", "rest", "http", "documentation", "docs", "literate"] |
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
35969
601