From 971c5a2654ded69fc5544611b1bb6fda02c3629d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Mon, 9 Mar 2015 20:12:38 -0400 Subject: [PATCH 01/16] Add assert function documentation for the plugins --- data/codex.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/codex.json b/data/codex.json index 6d7d08bf..106349da 100644 --- a/data/codex.json +++ b/data/codex.json @@ -27,6 +27,11 @@ , "description": "" , "render-file": false } + , { "name": "plugins" + , "title": "utility : assert" + , "file": "../chai/lib/chai/assertion.js" + , "description": "" + , "render-file": false } , { "name": "plugins" , "title": "utility : addMethod" , "file": "../chai/lib/chai/utils/addMethod.js" From 3125b0a69eaebe35e7b65a739c9b9a1981ebca0b Mon Sep 17 00:00:00 2001 From: Camille Roussel Date: Wed, 8 Apr 2015 16:16:44 -0700 Subject: [PATCH 02/16] Updated should.md Adjusted wording for clarity --- data/guide/styles/should.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/guide/styles/should.md b/data/guide/styles/should.md index b678d05a..60112ab7 100644 --- a/data/guide/styles/should.md +++ b/data/guide/styles/should.md @@ -8,7 +8,7 @@ The `should` style allows for the same chainable assertions as the `expect` interface, however it extends each object with a `should` -property to start your chain. This style has some issues when used Internet +property to start your chain. This style has some issues when used with Internet Explorer, so be aware of browser compatibility. var should = require('chai').should() //actually call the function From 68c58b9bcb986c60f338d3332296465725f79557 Mon Sep 17 00:00:00 2001 From: Aaron Sofaly Date: Fri, 17 Apr 2015 21:03:31 -0700 Subject: [PATCH 03/16] ran make to update a broken link --- out/api/assert/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/api/assert/index.html b/out/api/assert/index.html index f5e48340..7fdc1a49 100644 --- a/out/api/assert/index.html +++ b/out/api/assert/index.html @@ -68,7 +68,7 @@

Chai Assertion Library

Assert

The assert style is very similar to node.js' included assert module, with a bit of extra sugar. Of the three style options, assert is the only one that is not chainable. Check out -the Style Guide for a comparison.

+the Style Guide for a comparison.

API Reference

From 0ad66f80767ae6337b3d39f49dc4654232e74bbc Mon Sep 17 00:00:00 2001 From: Stephen Davidson Date: Thu, 21 May 2015 10:59:51 +0200 Subject: [PATCH 04/16] Add chai-signals plugin. Adds the chai signals plugin to the plugin.js. Chai signals adds assertions for the [js-signals](https://github.com/millermedeiros/js-signals) library. --- plugins.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins.js b/plugins.js index d87a65c3..70aea525 100644 --- a/plugins.js +++ b/plugins.js @@ -304,4 +304,15 @@ module.exports = [ , markdown: 'https://raw.githubusercontent.com/astorije/chai-immutable/master/README.md' , browser: false } + + , { name: 'Chai Signals' + , desc: 'Assertions for signaling using the js-signals library.' + , url: 'chai-signals' + , link: 'https://github.com/StephenDavidson/chai-signals' + , tags: [ 'js-signals, signals' ] + , pkg: 'https://raw.githubusercontent.com/StephenDavidson/chai-signals/master/package.json' + , markdown: 'https://raw.githubusercontent.com/StephenDavidson/chai-signals/master/README.md' + , browser: + { 'chai-signals.js': 'https://raw.githubusercontent.com/StephenDavidson/chai-signals/master/chai-signals.js' } + } ]; From a5bd8bd51910b01bfb0fcb4e8530148b4cb919e0 Mon Sep 17 00:00:00 2001 From: John Wright Date: Fri, 22 May 2015 15:43:06 +0100 Subject: [PATCH 05/16] Adding the chai-match plugin. --- plugins.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins.js b/plugins.js index 70aea525..9395fc93 100644 --- a/plugins.js +++ b/plugins.js @@ -315,4 +315,12 @@ module.exports = [ , browser: { 'chai-signals.js': 'https://raw.githubusercontent.com/StephenDavidson/chai-signals/master/chai-signals.js' } } + + , { name: 'Chai Match' + , desc: 'Advanced RegExp assertions for Chai.js', + , url: 'chai-match' + , link: 'https://github.com/johngeorgewright/chai-match' + , tags: [ 'assertion', 'string' ] + , pkg: 'https://github.com/johngeorgewright/chai-match/blob/master/package.json' + , markdown: 'https://raw.githubusercontent.com/johngeorgewright/chai-match/master/README.md' } ]; From 322ea610a1b324b2c4b471f05efc3f93bdd52ae3 Mon Sep 17 00:00:00 2001 From: John Wright Date: Fri, 22 May 2015 15:45:32 +0100 Subject: [PATCH 06/16] :bug: Fixing syntax error. --- plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 9395fc93..15b10974 100644 --- a/plugins.js +++ b/plugins.js @@ -317,7 +317,7 @@ module.exports = [ } , { name: 'Chai Match' - , desc: 'Advanced RegExp assertions for Chai.js', + , desc: 'Advanced RegExp assertions for Chai.js' , url: 'chai-match' , link: 'https://github.com/johngeorgewright/chai-match' , tags: [ 'assertion', 'string' ] From 4aadf7362765f43297423a93f3fc8579e668e8f7 Mon Sep 17 00:00:00 2001 From: John Wright Date: Fri, 22 May 2015 16:16:53 +0100 Subject: [PATCH 07/16] Added browser support. --- plugins.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 15b10974..1a501f02 100644 --- a/plugins.js +++ b/plugins.js @@ -322,5 +322,8 @@ module.exports = [ , link: 'https://github.com/johngeorgewright/chai-match' , tags: [ 'assertion', 'string' ] , pkg: 'https://github.com/johngeorgewright/chai-match/blob/master/package.json' - , markdown: 'https://raw.githubusercontent.com/johngeorgewright/chai-match/master/README.md' } + , markdown: 'https://raw.githubusercontent.com/johngeorgewright/chai-match/master/README.md' + , browser: + { 'chai-match.js': 'https://raw.github.com/johngeorgewright/chai-match/master/chai-match.js' } + } ]; From 58b65749fe59450cc2ab212542d247e65888622b Mon Sep 17 00:00:00 2001 From: Adam Hull Date: Wed, 8 Jul 2015 16:31:19 -0700 Subject: [PATCH 08/16] Add chai-json-equal plugin --- plugins.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins.js b/plugins.js index 1a501f02..0a87745e 100644 --- a/plugins.js +++ b/plugins.js @@ -190,6 +190,17 @@ module.exports = [ { 'chai-json-schema.js': 'https://raw.github.com/Bartvds/chai-json-schema/master/index.js' } } + , { name: 'Chai Json Equal' + , desc: 'Assert on equality of json representations' + , url: 'chai-json-equal' + , link 'https://github.com/hurrymaplelad/chai-json-equal' + , tags: ['objects', 'array', 'assertion', 'equality'] + , pkg: 'https://raw.githubusercontent.com/hurrymaplelad/chai-json-equal/master/package.json' + , markdown: 'https://raw.githubusercontent.com/hurrymaplelad/chai-json-equal/master/README.md' + , browser: + {'chai-json-equal.js': 'https://raw.githubusercontent.com/hurrymaplelad/chai-json-equal/master/chai_json_equal.js'} + } + , { name: 'Chai Date Time' , desc: 'Extend chai with common date equality assertions against JavaScript Date objects.' , url: 'chai-datetime' From 5d1453cbf389a5a1ad4a076d822a6a3f4817555c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 16 Aug 2015 22:39:13 +0200 Subject: [PATCH 09/16] Specify that browser is supported for chai-immutable This is true since version 1.3.0: https://github.com/astorije/chai-immutable/releases/tag/v1.3.0 --- plugins.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 0a87745e..6738f482 100644 --- a/plugins.js +++ b/plugins.js @@ -313,7 +313,8 @@ module.exports = [ , tags: [ 'assertion', 'immutable', 'equality' ] , pkg: 'https://raw.githubusercontent.com/astorije/chai-immutable/master/package.json' , markdown: 'https://raw.githubusercontent.com/astorije/chai-immutable/master/README.md' - , browser: false + , browser: + { 'chai-immutable.js': 'https://raw.githubusercontent.com/astorije/chai-immutable/master/chai-immutable.js' } } , { name: 'Chai Signals' From d7e2038edbb5fd3fc95cfb5135b32597beef65b0 Mon Sep 17 00:00:00 2001 From: Nathan Black Date: Tue, 15 Sep 2015 01:18:14 -0700 Subject: [PATCH 10/16] Add chai-dom to the list of plugins --- plugins.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins.js b/plugins.js index 6738f482..3a2615eb 100644 --- a/plugins.js +++ b/plugins.js @@ -76,6 +76,18 @@ module.exports = [ { 'chai-jq.js': 'https://raw.github.com/FormidableLabs/chai-jq/master/chai-jq.js' } } + , { name: 'Chai DOM' + , desc: 'DOM assertions for the Chai assertion library using vanilla JavaScript' + , url: 'chai-dom' + , link: 'https://github.com/FormidableLabs/chai-dom' + , tags: [ 'vendor', 'dom' ] + , pkg: 'https://raw.github.com/nathanboktae/chai-dom/master/package.json' + , markdown: 'https://raw.github.com/nathanboktae/chai-dom/master/README.md' + , node: true + , browser: + { 'chai-dom.js': 'https://raw.github.com/nathanboktae/chai-dom/master/chai-dom.js' } + } + , { name: 'Chai Timers' , desc: 'Timers, stopwatches, and other time-based assertions for the Chai Assertion Library.' , url: 'chai-timers' From 209c9afbc6e93044a229008503caccfa34f2f70a Mon Sep 17 00:00:00 2001 From: Jake Luer Date: Sat, 24 Oct 2015 17:16:42 +0000 Subject: [PATCH 11/16] emergency patch: bad plugins.json token --- plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.js b/plugins.js index 3a2615eb..a3496a61 100644 --- a/plugins.js +++ b/plugins.js @@ -205,7 +205,7 @@ module.exports = [ , { name: 'Chai Json Equal' , desc: 'Assert on equality of json representations' , url: 'chai-json-equal' - , link 'https://github.com/hurrymaplelad/chai-json-equal' + , link: 'https://github.com/hurrymaplelad/chai-json-equal' , tags: ['objects', 'array', 'assertion', 'equality'] , pkg: 'https://raw.githubusercontent.com/hurrymaplelad/chai-json-equal/master/package.json' , markdown: 'https://raw.githubusercontent.com/hurrymaplelad/chai-json-equal/master/README.md' From b6abd3a998c8912b61e0c72079743e24a1a0a0ab Mon Sep 17 00:00:00 2001 From: Burk Hufnagel Date: Fri, 30 Oct 2015 22:38:47 -0400 Subject: [PATCH 12/16] Fixed typos in the Getting Started Guide Found some spelling errors and fixed them. --- data/guide/helpers/add_method_as_property.md | 4 ++-- data/guide/helpers/overwrite_property.md | 4 ++-- data/guide/index.md | 4 ++-- data/guide/plugins/use.md | 2 +- data/guide/styles/assert.md | 2 +- data/guide/styles/expect.md | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/guide/helpers/add_method_as_property.md b/data/guide/helpers/add_method_as_property.md index 7d243b7b..2680d8d6 100644 --- a/data/guide/helpers/add_method_as_property.md +++ b/data/guide/helpers/add_method_as_property.md @@ -24,7 +24,7 @@ expect(arr).to.contain(2); expect(obj).to.contain.key('a'); ``` -For this to work, two seperate functions are needed. One that will be invoked when the +For this to work, two separate functions are needed. One that will be invoked when the chain is used as either a property or a method, and one that will be invoked when only used as a method. @@ -97,7 +97,7 @@ function assertModelAge (n) { } ``` -By now, that should be self-explanitory. Now for our property function. +By now, that should be self-explanatory. Now for our property function. ```javascript function chainModelAge () { diff --git a/data/guide/helpers/overwrite_property.md b/data/guide/helpers/overwrite_property.md index bed8bb75..c76928ea 100644 --- a/data/guide/helpers/overwrite_property.md +++ b/data/guide/helpers/overwrite_property.md @@ -57,12 +57,12 @@ arthur.set('id', 'dont panic'); expect(arthur).to.not.be.ok; ``` -We would expect this expection to pass as well, as our statement is +We would expect this expectation to pass as well, as our statement is negated and the id is not a number. Unfortunately, the negation flag was not passed to our number assertion, so it still expects the value to be a number. -##### Transfering Flags +##### Transferring Flags For this we will expand on this assertion by transfering all of the flags from the original assertion to our new assertion. The final diff --git a/data/guide/index.md b/data/guide/index.md index 11d349d6..71fd9c6f 100644 --- a/data/guide/index.md +++ b/data/guide/index.md @@ -4,7 +4,7 @@ # Welcome to Chai -We are glad that you have decided to give Chai.js a try! If this is your first visit, get aquainted with +We are glad that you have decided to give Chai.js a try! If this is your first visit, get acquainted with the basics, such as installation and our included assertion styles. ## The Basics @@ -20,4 +20,4 @@ you want to achieve. The Plugin API is also intended as a way to simplify testin a way to encapsulate common assertions for repeat use. - [Core Plugin Concepts](/guide/plugins/) covers the basics of using the Chai Plugin API. -- [Building a Helper](/guide/helpers/) is a walkthrough for writing your first plugin. +- [Building a Helper](/guide/helpers/) is a walk-through for writing your first plugin. diff --git a/data/guide/plugins/use.md b/data/guide/plugins/use.md index e598d954..8266d704 100644 --- a/data/guide/plugins/use.md +++ b/data/guide/plugins/use.md @@ -4,7 +4,7 @@ render-file: false --- -## Accessing Utilties +## Accessing Utilities Chai comes with a number of utilities to assist in the construction of assertions, but it does not provide these directly on the `chai` export. These can be accessed diff --git a/data/guide/styles/assert.md b/data/guide/styles/assert.md index 18e529e7..c6f6cfdb 100644 --- a/data/guide/styles/assert.md +++ b/data/guide/styles/assert.md @@ -9,7 +9,7 @@ View full Assert API The assert style is exposed through `assert` interface. This provides -the classic assert-dot notation, similiar to that packaged with +the classic assert-dot notation, similar to that packaged with node.js. This assert module, however, provides several additional tests and is browser compatible. diff --git a/data/guide/styles/expect.md b/data/guide/styles/expect.md index 3ab3704c..224dc371 100644 --- a/data/guide/styles/expect.md +++ b/data/guide/styles/expect.md @@ -38,5 +38,5 @@ assertions that might occur. // AssertionError: topic [answer]: expected 43 to equal 42. expect(answer, 'topic [answer]').to.equal(42); -This comes in handy when being used with non-descript topics such as +This comes in handy when being used with nondescript topics such as booleans or numbers. From 43d62a279525fc3bb71c59350fa4175e29547408 Mon Sep 17 00:00:00 2001 From: Antonio Marques Date: Sun, 1 Nov 2015 19:03:08 +0000 Subject: [PATCH 13/16] Add chai-bignumber plugin --- plugins.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins.js b/plugins.js index a3496a61..b8482e64 100644 --- a/plugins.js +++ b/plugins.js @@ -350,4 +350,12 @@ module.exports = [ , browser: { 'chai-match.js': 'https://raw.github.com/johngeorgewright/chai-match/master/chai-match.js' } } + + , { name: 'Chai BigNumber' + , desc: 'Assertions for comparing arbitrary-precision decimals using the bignumber.js library.' + , url: 'chai-bignumber' + , link: 'https://github.com/asmarques/chai-bignumber' + , tags: [ 'assertion', 'math' ] + , pkg: 'https://raw.githubusercontent.com/asmarques/chai-bignumber/master/package.json' + , markdown: 'https://raw.githubusercontent.com/asmarques/chai-bignumber/master/README.md' } ]; From d6f9a530d2d8638a695eac30e8b948f6414913c0 Mon Sep 17 00:00:00 2001 From: strawbrary Date: Fri, 22 Jan 2016 14:43:23 -0800 Subject: [PATCH 14/16] Update Chai submodule --- chai | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chai b/chai index 09e17b9e..5fc5114a 160000 --- a/chai +++ b/chai @@ -1 +1 @@ -Subproject commit 09e17b9e090c02d38cd5ee441881dd2691635124 +Subproject commit 5fc5114a2420c4a6903e15febbc232a51e8dfb2a From 6435c2620105c1fb62b008a87a6704ed58f52d84 Mon Sep 17 00:00:00 2001 From: strawbrary Date: Fri, 22 Jan 2016 14:43:47 -0800 Subject: [PATCH 15/16] Bump Chai version in codex.json --- data/codex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/codex.json b/data/codex.json index 106349da..8dc5973a 100644 --- a/data/codex.json +++ b/data/codex.json @@ -9,7 +9,7 @@ "tweeturl": "http://chaijs.com", "tweetvia": "jakeluer", "tweetrelated": "jakeluer", - "version": "2.1.0", + "version": "3.4.2", "hasdownloads": false, "description": "Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that can be delightfully paired with any javascript testing framework." }, From c0d7de7cdae707f00cb0ccc9d11e668cd3d64cac Mon Sep 17 00:00:00 2001 From: strawbrary Date: Fri, 22 Jan 2016 14:43:58 -0800 Subject: [PATCH 16/16] Generate docs from updated Chai --- out/api/assert/index.html | 241 +- out/api/bdd/index.html | 177 +- out/api/index.html | 6 +- out/api/plugins/index.html | 143 +- out/api/test/index.html | 6 +- out/chai.js | 8517 ++++++++++++++------------ out/guide/helpers/index.html | 14 +- out/guide/index.html | 10 +- out/guide/installation/index.html | 6 +- out/guide/plugins/index.html | 10 +- out/guide/resources/index.html | 6 +- out/guide/styles/index.html | 12 +- out/index.html | 8 +- out/public/js/tests/assert.js | 479 +- out/public/js/tests/configuration.js | 41 +- out/public/js/tests/expect.js | 270 +- out/public/js/tests/should.js | 193 +- out/public/js/tests/utilities.js | 12 + 18 files changed, 5979 insertions(+), 4172 deletions(-) diff --git a/out/api/assert/index.html b/out/api/assert/index.html index 7fdc1a49..fe09bab0 100644 --- a/out/api/assert/index.html +++ b/out/api/assert/index.html @@ -10,9 +10,9 @@ - - - + + + - - - + + + - - - + + + - - - + + + - + @@ -40,8 +40,8 @@ }; - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + +