Skip to content

Commit

Permalink
Start doc site.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Jan 17, 2016
1 parent b317ab6 commit 2b5724f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/coverage/
/node_modules/
/site-build/
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Unexpected-set
==============
# Unexpected-set

Add support to [Unexpected](http://unexpected.js.org) for testing [Set](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set) instances.

[![NPM version](https://badge.fury.io/js/unexpected-set.svg)](http://badge.fury.io/js/unexpected-set)
[![Build Status](https://travis-ci.org/unexpectedjs/unexpected-set.svg?branch=master)](https://travis-ci.org/unexpectedjs/unexpected-set)
[![Coverage Status](https://coveralls.io/repos/unexpectedjs/unexpected-set/badge.svg)](https://coveralls.io/r/unexpectedjs/unexpected-set)
[![Dependency Status](https://david-dm.org/unexpectedjs/unexpected-set.svg)](https://david-dm.org/unexpectedjs/unexpected-express)

License
-------
[![Dependency Status](https://david-dm.org/unexpectedjs/unexpected-set.svg)](https://david-dm.org/unexpectedjs/unexpected-set)

Unexpected-set is licensed under a standard 3-clause BSD license
-- see the `LICENSE` file for details.
Read [the documentation](http://unexpected.js.org/unexpected-set/).
6 changes: 6 additions & 0 deletions bootstrap-unexpected-markdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*global unexpected:true*/
unexpected = require('unexpected');
unexpected.use(require('./lib/unexpected-set'));
unexpected.output.preferredWidth = 80;

require('es6-set/implement');
42 changes: 42 additions & 0 deletions documentation/assertions/Set/to-satisfy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Asserts that a Set instance has at least one element satisfying each given
spec.

```js
expect(new Set([1, 2, 3]), 'to satisfy', [
1,
expect.it('to be less than or equal to', 1),
expect.it('to be greater than', 10)
]);
```

```output
expected Set([ 1, 2, 3 ]) to satisfy
[
1,
expect.it('to be less than or equal to', 1),
expect.it('to be greater than', 10)
]
Set([
1,
2,
3
// missing: should be greater than 10
])
```

If the subject should not contain additional elements, use the `exhaustively`
flag:

```js
expect(new Set([1, 2]), 'to exhaustively satisfy', [2]);
```

```output
expected Set([ 1, 2 ]) to exhaustively satisfy [ 2 ]
Set([
1, // should be removed
2
])
```
28 changes: 28 additions & 0 deletions documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
template: default.ejs
theme: dark
title: Unexpected-set
repository: https://github.com/unexpectedjs/unexpected-set
---

Add support to [Unexpected](http://unexpected.js.org) for testing [Set](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set) instances.

[![NPM version](https://badge.fury.io/js/unexpected-set.svg)](http://badge.fury.io/js/unexpected-set)
[![Build Status](https://travis-ci.org/unexpectedjs/unexpected-set.svg?branch=master)](https://travis-ci.org/unexpectedjs/unexpected-set)
[![Coverage Status](https://coveralls.io/repos/unexpectedjs/unexpected-set/badge.svg)](https://coveralls.io/r/unexpectedjs/unexpected-set)
[![Dependency Status](https://david-dm.org/unexpectedjs/unexpected-set.svg)](https://david-dm.org/unexpectedjs/unexpected-set)

```js
expect(new Set([1, 2, 3]), 'to satisfy', [3, 4]);
```

```output
expected Set([ 1, 2, 3 ]) to satisfy [ 3, 4 ]
Set([
1,
2,
3
// missing 4
])
```
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"lint": "jshint .",
"test": "mocha && npm run lint",
"travis": "npm test && npm run coverage && (<coverage/lcov.info coveralls || true)",
"coverage": "NODE_ENV=development istanbul cover _mocha -- --reporter dot && echo google-chrome coverage/lcov-report/index.html"
"coverage": "NODE_ENV=development istanbul cover _mocha -- --reporter dot && echo google-chrome coverage/lcov-report/index.html",
"generate-site": "generate-site --require ./bootstrap-unexpected-markdown.js",
"update-examples": "generate-site --require ./bootstrap-unexpected-markdown.js --update-examples"
},
"repository": {
"type": "git",
Expand All @@ -25,13 +27,15 @@
"bugs": {
"url": "https://github.com/unexpectedjs/unexpected-set/issues"
},
"homepage": "https://github.com/unexpectedjs/unexpected-set#readme",
"homepage": "https://unexpected.js.org/unexpected-set",
"devDependencies": {
"coveralls": "2.11.6",
"istanbul": "0.4.2",
"jshint": "2.9.1",
"mocha": "2.3.4",
"unexpected": "10.5.1"
"unexpected": "10.5.1",
"unexpected-documentation-site-generator": "4.0.0",
"unexpected-markdown": "1.3.1"
},
"dependencies": {
"es6-set": "0.1.3"
Expand Down

0 comments on commit 2b5724f

Please sign in to comment.