From 2e1d0c465d029578e451dd8697e255e8e2cf3cf7 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 7 Sep 2015 23:51:32 +0200 Subject: [PATCH] Update unexpected to 9.9.0. --- .../assertions/Buffer/when-piped-through.md | 3 ++- .../assertions/Stream/when-piped-through.md | 3 ++- .../assertions/array/when-piped-through.md | 3 ++- .../assertions/string/when-piped-through.md | 3 ++- documentation/index.md | 3 ++- package.json | 2 +- test/documentation.spec.js | 15 ++++++++++----- test/unexpectedStream.js | 5 +++-- 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/documentation/assertions/Buffer/when-piped-through.md b/documentation/assertions/Buffer/when-piped-through.md index d8ca96c..d2132d4 100644 --- a/documentation/assertions/Buffer/when-piped-through.md +++ b/documentation/assertions/Buffer/when-piped-through.md @@ -34,7 +34,8 @@ return expect( ```output expected Buffer([0x79, 0x61, 0x64, 0x64, 0x61]) when piped through [ Gzip, Gunzip ], 'to yield output satisfying', Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61]) - expected Gunzip to yield output satisfying Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61]) + expected Gunzip + to yield output satisfying Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61]) expected Buffer([0x79, 0x61, 0x64, 0x64, 0x61]) to satisfy Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61]) diff --git a/documentation/assertions/Stream/when-piped-through.md b/documentation/assertions/Stream/when-piped-through.md index 1a7fdd5..2db8c3f 100644 --- a/documentation/assertions/Stream/when-piped-through.md +++ b/documentation/assertions/Stream/when-piped-through.md @@ -33,7 +33,8 @@ return expect( ```output expected ReadStream when piped through [ Gzip, Gunzip ], 'to yield output satisfying', 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES' - expected Gunzip to yield output satisfying 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES' + expected Gunzip + to yield output satisfying 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES' expected Buffer([0x43, 0x6F, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30 /* 1478 more */ ]) when decoded as 'ascii' not to contain 'IMPLIED WARRANTIES' diff --git a/documentation/assertions/array/when-piped-through.md b/documentation/assertions/array/when-piped-through.md index 9a535aa..53b7ecf 100644 --- a/documentation/assertions/array/when-piped-through.md +++ b/documentation/assertions/array/when-piped-through.md @@ -35,7 +35,8 @@ return expect( expected [ Buffer([0x01, 0x02]), Buffer([0x03, 0x04]) ] when piped through [ Gzip, Gunzip ], 'to yield output satisfying', Buffer([0x01, 0x02, 0x03, 0x04, 0x05]) expected Gunzip to yield output satisfying Buffer([0x01, 0x02, 0x03, 0x04, 0x05]) - expected Buffer([0x01, 0x02, 0x03, 0x04]) to satisfy Buffer([0x01, 0x02, 0x03, 0x04, 0x05]) + expected Buffer([0x01, 0x02, 0x03, 0x04]) + to satisfy Buffer([0x01, 0x02, 0x03, 0x04, 0x05]) -01 02 03 04 │....│ +01 02 03 04 05 │.....│ diff --git a/documentation/assertions/string/when-piped-through.md b/documentation/assertions/string/when-piped-through.md index fef5b1b..e218b9d 100644 --- a/documentation/assertions/string/when-piped-through.md +++ b/documentation/assertions/string/when-piped-through.md @@ -32,7 +32,8 @@ return expect( ```output expected 'How about that' when piped through [ Gzip, Gunzip ], 'to yield output satisfying', 'when decoded as', 'utf-8', 'not to contain', 'about' - expected Gunzip to yield output satisfying 'when decoded as', 'utf-8', 'not to contain', 'about' + expected Gunzip + to yield output satisfying 'when decoded as', 'utf-8', 'not to contain', 'about' expected Buffer([0x48, 0x6F, 0x77, 0x20, 0x61, 0x62, 0x6F, 0x75, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74]) when decoded as 'utf-8' not to contain 'about' diff --git a/documentation/index.md b/documentation/index.md index 30ce8f8..c144da3 100644 --- a/documentation/index.md +++ b/documentation/index.md @@ -27,7 +27,8 @@ return expect( ``` ```output -expected [ 'abc', 'def' ] when piped through Gzip, 'to yield output satisfying', Buffer([0x04, 0x08]) +expected [ 'abc', 'def' ] +when piped through Gzip, 'to yield output satisfying', Buffer([0x04, 0x08]) expected Gzip to yield output satisfying Buffer([0x04, 0x08]) expected Buffer([0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4B, 0x4C, 0x4A, 0x4E, 0x49, 0x4D /* 10 more */ ]) to satisfy Buffer([0x04, 0x08]) diff --git a/package.json b/package.json index 01aacec..f125b72 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "istanbul": "0.3.13", "jshint": "2.6.3", "mocha": "2.2.5", - "unexpected": "9.0.0", + "unexpected": "9.9.0", "unexpected-documentation-site-generator": "2.6.2" }, "scripts": { diff --git a/test/documentation.spec.js b/test/documentation.spec.js index d7c535d..bccf566 100644 --- a/test/documentation.spec.js +++ b/test/documentation.spec.js @@ -63,7 +63,8 @@ describe("documentation tests", function () { expect(e, "to have message", "expected Buffer([0x79, 0x61, 0x64, 0x64, 0x61])\n" + "when piped through [ Gzip, Gunzip ], 'to yield output satisfying', Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61])\n" + - " expected Gunzip to yield output satisfying Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61])\n" + + " expected Gunzip\n" + + " to yield output satisfying Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61])\n" + " expected Buffer([0x79, 0x61, 0x64, 0x64, 0x61])\n" + " to satisfy Buffer([0x79, 0x61, 0x64, 0x64, 0x61, 0x79, 0x61, 0x64, 0x64, 0x61])\n" + "\n" + @@ -147,7 +148,8 @@ describe("documentation tests", function () { expect(e, "to have message", "expected ReadStream\n" + "when piped through [ Gzip, Gunzip ], 'to yield output satisfying', 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES'\n" + - " expected Gunzip to yield output satisfying 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES'\n" + + " expected Gunzip\n" + + " to yield output satisfying 'when decoded as', 'ascii', 'not to contain', 'IMPLIED WARRANTIES'\n" + " expected Buffer([0x43, 0x6F, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30 /* 1478 more */ ])\n" + " when decoded as 'ascii' not to contain 'IMPLIED WARRANTIES'\n" + "\n" + @@ -233,7 +235,8 @@ describe("documentation tests", function () { "expected [ Buffer([0x01, 0x02]), Buffer([0x03, 0x04]) ]\n" + "when piped through [ Gzip, Gunzip ], 'to yield output satisfying', Buffer([0x01, 0x02, 0x03, 0x04, 0x05])\n" + " expected Gunzip to yield output satisfying Buffer([0x01, 0x02, 0x03, 0x04, 0x05])\n" + - " expected Buffer([0x01, 0x02, 0x03, 0x04]) to satisfy Buffer([0x01, 0x02, 0x03, 0x04, 0x05])\n" + + " expected Buffer([0x01, 0x02, 0x03, 0x04])\n" + + " to satisfy Buffer([0x01, 0x02, 0x03, 0x04, 0x05])\n" + "\n" + " -01 02 03 04 │....│\n" + " +01 02 03 04 05 │.....│" @@ -289,7 +292,8 @@ describe("documentation tests", function () { expect(e, "to have message", "expected 'How about that'\n" + "when piped through [ Gzip, Gunzip ], 'to yield output satisfying', 'when decoded as', 'utf-8', 'not to contain', 'about'\n" + - " expected Gunzip to yield output satisfying 'when decoded as', 'utf-8', 'not to contain', 'about'\n" + + " expected Gunzip\n" + + " to yield output satisfying 'when decoded as', 'utf-8', 'not to contain', 'about'\n" + " expected Buffer([0x48, 0x6F, 0x77, 0x20, 0x61, 0x62, 0x6F, 0x75, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74])\n" + " when decoded as 'utf-8' not to contain 'about'\n" + "\n" + @@ -327,7 +331,8 @@ describe("documentation tests", function () { }); }).caught(function (e) { expect(e, "to have message", - "expected [ 'abc', 'def' ] when piped through Gzip, 'to yield output satisfying', Buffer([0x04, 0x08])\n" + + "expected [ 'abc', 'def' ]\n" + + "when piped through Gzip, 'to yield output satisfying', Buffer([0x04, 0x08])\n" + " expected Gzip to yield output satisfying Buffer([0x04, 0x08])\n" + " expected Buffer([0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4B, 0x4C, 0x4A, 0x4E, 0x49, 0x4D /* 10 more */ ])\n" + " to satisfy Buffer([0x04, 0x08])\n" + diff --git a/test/unexpectedStream.js b/test/unexpectedStream.js index 54c9e42..cc8fd83 100644 --- a/test/unexpectedStream.js +++ b/test/unexpectedStream.js @@ -9,6 +9,8 @@ describe('unexpected-stream', function () { var expect = unexpected.clone().installPlugin(require('../lib/unexpectedStream')), fooTxtPath = pathModule.resolve(__dirname, '..', 'testdata', 'foo.txt'); + expect.output.preferredWidth = 150; + describe('to yield output', function () { it('should buffer up the output of a readable stream that outputs buffers', function () { return expect(fs.createReadStream(fooTxtPath), 'to yield output satisfying', new Buffer('foobarquux\n', 'utf-8')); @@ -145,8 +147,7 @@ describe('unexpected-stream', function () { ), 'to be rejected with', - "expected [ 'f', 'oo' ]\n" + - "when piped through Gzip, 'to yield output satisfying', Buffer([0x03, 0x4B, 0xCB, 0xCF, 0x4F, 0x4A, 0x2C])\n" + + "expected [ 'f', 'oo' ] when piped through Gzip, 'to yield output satisfying', Buffer([0x03, 0x4B, 0xCB, 0xCF, 0x4F, 0x4A, 0x2C])\n" + " expected Gzip to yield output satisfying Buffer([0x03, 0x4B, 0xCB, 0xCF, 0x4F, 0x4A, 0x2C])\n" + " expected Buffer([0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4B, 0xCB, 0xCF, 0x07, 0x00, 0x21 /* 7 more */ ])\n" + " to satisfy Buffer([0x03, 0x4B, 0xCB, 0xCF, 0x4F, 0x4A, 0x2C])\n" +