Skip to content

Commit

Permalink
v0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
MisumiRize committed Jun 22, 2015
1 parent cbdb4c8 commit f1d6304
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 1 deletion.
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
TasteSpoon
==========

[![Circle CI](https://circleci.com/gh/MisumiRize/tastespoon.svg?style=svg)](https://circleci.com/gh/MisumiRize/tastespoon)
[![Dependency Status](https://david-dm.org/MisumiRize/tastespoon.svg)](https://david-dm.org/MisumiRize/tastespoon)
[![devDependency Status](https://david-dm.org/MisumiRize/tastespoon/dev-status.svg)](https://david-dm.org/MisumiRize/tastespoon#info=devDependencies)

Micro infrastracture behavior testing framework inspired by [Infrataster](http://infrataster.net/).

## Concept

* NPM/CommonJS based plugin system
* Pluggable with any JavaScript testing framework
* Mocha integration is ready

## Usage

```bash
$ npm install tastespoon --save-dev
```

## Running with Docker and Mocha

```bash
$ npm install mocha tastespoon --save-dev
$ docker run -t -i -d -p 8000:80 nginx
```

```javascript
import TasteSpoon from "tastespoon"
import assert from "assert"

TasteSpoon.define("http", "127.0.0.1")

let server = TasteSpoon.server("http")
describe(server, () => {

let http = TasteSpoon.http("http://example.com:8000")
describe(http, () => {
it("returns 200", () => {
return http(server).result().then((response) => {
assert(response.statusCode == 200)
})
})
})
})
```

```bash
$ mocha test/http_test.js
```

## Mocha Integration

```javascript
import TasteSpoon from "tastespoon"
import assert from "assert"
let http = TasteSpoon.http

TasteSpoon.define("http", "127.0.0.1")

describe(server("http"), () => {
describe(http("http://example.com:8000"), () => {
it("returns 200", () => {
return this.result().then((response) => {
assert(response.statusCode == 200)
})
})
})
})
```

```bash
$ mocha -u tastespoon/mocha test/http_test.js
```
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
{
"name": "tastespoon",
"version": "0.1.0",
"description": "",
"description": "Infrastructure behavior testing framework",
"main": "index.js",
"files": [
"lib",
"index.js",
"mocha.js",
"tastespoon.d.ts"
],
"scripts": {
"prepublish": "tsd reinstall && tsd rebundle && tsc -m commonjs -t ES5 --outDir lib src/index.ts src/mocha.ts",
"test:integration": "mocha --compilers ts:espower-typescript/guess test/integration/*.test.ts"
},
"author": "Rize MISUMI",
"repository": {
"type": "git",
"url": "https://github.com/MisumiRize/tastespoon"
},
"license": "MIT",
"devDependencies": {
"espower-typescript": "^0.1.0",
Expand Down

0 comments on commit f1d6304

Please sign in to comment.