todomvc-api editorconfig npm

Validate your TodoMVC API implementation.

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

Type: string Default: http://localhost:8080

The base location to ping your API.

callback

Required Type: function

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

Related Repositories

realtime-tasks

realtime-tasks

A simple collaborative task list based on TodoMVC. Built with AngularJS and the Drive Realtime API ...

VSReact

VSReact

React TodoMVC app with ASP.NET Web Api backend, developed with Visual Studio ...

spray-akka-todomvc

spray-akka-todomvc

Demo fully asynchronous JSMVC/RESTful API application ...

flask-ember-todo

flask-ember-todo

Ember version of the TodoMVC application, backed by a Flask API ...

todomvc-api

todomvc-api

Validate your TodoMVC API implementation. ...


Top Contributors

stephenplusplus proppy sindresorhus webmaven addyosmani

Releases

-   v0.2.1 zip tar
-   v0.2.0 zip tar
-   v0.1.1 zip tar
-   v0.1.0 zip tar