Socket
Socket
Sign inDemoInstall

literapi

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

literapi - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

5

CHANGELOG.md
# 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 @@

1

lib/cli.js
var runner = require('./runner')
, LiterAPI = require('./')

@@ -3,0 +4,0 @@ var usageMessage =

10

lib/compilers/vows.js

@@ -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"]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc