@jghennes/snap
A small CLI tool to compare RESTful API json responses
Last updated 8 months ago by jghennes .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @jghennes/snap 
SYNC missed versions from official npm registry.

snap

snap is a cli tool intended to make automated snapshot testing of api endpoints easier.

Syntax

Generate a new snapshot

    snapshot take <endpoint_file_path> [-n output file name] [-e config to use]

Options:

-n --fileName : A name for the generated snapshot file. Defaults to the file name of the endpoint file provided.

-e --envConf : Environment (host, port) to run the snapshots against. Defaults to ./host-config.json

Run a test against a snapshot

    snapshot compare <snap_file_path> [-e config to use]

Options:

-e --envConf : Environment (host, port) to run the snapshots against. Defaults to ./host-config.json

File Format

Both the endpoint_file and snap_file needed to be formated as a json object in a file like so:

    {
        "[api path]": JSON result
    }

Current Tags

  • 1.0.0                                ...           latest (8 months ago)

1 Versions

  • 1.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |