From ea938bd37b98e939ab051ed31bbb062caa306052 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jul 2015 19:54:47 -0700 Subject: [PATCH 1/5] adds support for must --- index.js | 3 ++- package.json | 1 + test/assertassert-test.js | 10 +++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 3d8d4af..a33c2ea 100644 --- a/index.js +++ b/index.js @@ -4,5 +4,6 @@ module.exports = { }, chai: require('chai'), assert: require('assert'), - Code: require('code') + Code: require('code'), + must: require('must') } diff --git a/package.json b/package.json index 5463bae..b9d41ae 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "dependencies": { "chai": "^3.2.0", "code": "^1.5.0", + "must": "^0.12.0", "should": "^7.0.2" } } diff --git a/test/assertassert-test.js b/test/assertassert-test.js index 8382615..0f5453a 100644 --- a/test/assertassert-test.js +++ b/test/assertassert-test.js @@ -3,11 +3,11 @@ var assertassert = require('../') describe('assertassert', function () { - it('provides the code testing framework', function () { + it('provides the code assertion library', function () { assertassert.Code.expect({foo: 'bar'}).to.deep.equal({foo: 'bar'}) }) - it('provides the assert testing framework', function () { + it('provides the assert assertion library', function () { assertassert.assert.deepEqual('foo', 'foo', 'assert library not found') }) @@ -22,7 +22,11 @@ describe('assertassert', function () { }) }) - it('provides the should testing framework', function () { + it('provides the must assertion library', function () { + assertassert.must('foo').to.be('string') + }) + + it('provides the should assertion library', function () { assertassert.should() 'foo'.should.equal('foo') }) From 226fa6e489ae33371e5d60e8d81c0d853f7fad37 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jul 2015 19:55:31 -0700 Subject: [PATCH 2/5] update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index f4e9099..31622c8 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ assertassert.should() "foo".should.deep.equal("foo") ``` +### must + +```js +assertassert.must('foo').to.be('string') +``` + That's all there is to it. assertassert is guranteed to be the last assertion library you'll ever need. From 1351f3c53b14a36f91296a39784b9ce01e637894 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jul 2015 19:56:51 -0700 Subject: [PATCH 3/5] README.md nits --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31622c8..8a83a87 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,20 @@ assertassert.chai.should() "foo".should.deep.equal("foo") ``` -### assert +### Assert ```js assertassert.assert.deepEqual('foo', 'foo', 'assert library not found') ``` -### should +### Should ```js assertassert.should() "foo".should.deep.equal("foo") ``` -### must +### Must ```js assertassert.must('foo').to.be('string') From a6c7663769a44319c9e8beb7f311ca359b846472 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jul 2015 19:58:33 -0700 Subject: [PATCH 4/5] fix must test --- test/assertassert-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/assertassert-test.js b/test/assertassert-test.js index 0f5453a..88b07ab 100644 --- a/test/assertassert-test.js +++ b/test/assertassert-test.js @@ -23,7 +23,7 @@ describe('assertassert', function () { }) it('provides the must assertion library', function () { - assertassert.must('foo').to.be('string') + assertassert.must('foo').to.be('foo') }) it('provides the should assertion library', function () { From 4328744fd63aaf3ecfdf25d4b777716f1a243618 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Thu, 30 Jul 2015 20:00:49 -0700 Subject: [PATCH 5/5] add coveralls bin --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b9d41ae..f88bb94 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ }, "homepage": "https://github.com/bcoe/assertassert#readme", "devDependencies": { + "coveralls": "^2.11.3", "mocha": "^2.2.5", "nyc": "^3.0.1", "standard": "^4.5.4"