Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

todomvc-api

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

todomvc-api

Validate your TodoMVC backend.

npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

TodoMVC API

Validate your TodoMVC backend.

TodoMVC API contains the apiblueprint spec and a dredd wrapper to run validation tests against TasteStack TodoMVC backends.

Install

$ npm install --save-dev todomvc-api

Use with gulp.js and Express

var todomvc = require('todomvc-api');

gulp.task('test', function(done) {

	// Start your API server.
	var server = app.listen(8080, function() {

		// Run the TodoMVC validation test suite.
		todomvc.validate(function(err, stats) {

			// Shut down the server & pass a helpful message to Gulp.
			server.close(function() {
				if (stats && (stats.errors || stats.failures)) {
					done('api validation failed');
					return;
				}
				done(err);
			});
		});
	});
});

API

validate([url,] callback)

url

  • (optional)
  • Type: String
  • Default: http://localhost:8080

The base location to ping your API.

callback

  • Type: Function

This callback is executed with the results of our test suite against your API server.

FAQs

Package last updated on 18 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts