0.1.1 • Published 9 years ago

server-framework v0.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Kombucha v 0.1.0

A framework that compiles and runs tests written simply in JavaScript comments.

GitHub: https://github.com/haverchuck/server-framework

Getting started

Using npm

Install globally:

npm install —g kombucha

Install locally:

npm install kombucha

Install locally and save to dev dependencies:
npm install kombucha —save -dev

Add to node.js file:

var kombucha = require(‘kombucha’);

Documentation

API Docs

Features

Reads comments and automates test.js file based on user’s criteria Creates describe block and it statements from comments Does not yet handle nested describe blocks Follows semantic versioning for releases

Support

Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28

Uses object properties to create describe and it statements in a test file

var Router = require(__dirname + '/lib/router');
var http = require('http');

var myRouter = new Router();

//<d:[GET]route to return awesome>
myRouter.get('/awesome', function(req, res) {

Use of // to add comments and attribute to add test criteria for describe blocks Add additional comment with attribute to detail if tests

  res.writeHead(
    //<i: should have a [.status][eql]>
    200, //<:i>
    //<i: should have a [][have.header]>

Version 0.1.1 will include automation for expect parameters, however please add an expect for each if statement for the current version Close the test block with <:d> and <:i> tags

    {'Content-Type':'text/html'}); //<:i>
  res.write('wow, such an awesome router');
  res.end();
});
//<:d>

Dev dependencies chai: ^3.4.0 chai-http: ^1.0.0 gulp: ^3.9.0 jshint: ^2.8.0

License: MIT