Skip to content

Commit

Permalink
Update unexpected to 9.9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Sep 7, 2015
1 parent 6e6ea87 commit 2e1d0c4
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 13 deletions.
3 changes: 2 additions & 1 deletion documentation/assertions/Buffer/when-piped-through.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
3 changes: 2 additions & 1 deletion documentation/assertions/Stream/when-piped-through.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion documentation/assertions/array/when-piped-through.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 │.....│
Expand Down
3 changes: 2 additions & 1 deletion documentation/assertions/string/when-piped-through.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
15 changes: 10 additions & 5 deletions test/documentation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down Expand Up @@ -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" +
Expand Down Expand Up @@ -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 │.....│"
Expand Down Expand Up @@ -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" +
Expand Down Expand Up @@ -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" +
Expand Down
5 changes: 3 additions & 2 deletions test/unexpectedStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -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" +
Expand Down

0 comments on commit 2e1d0c4

Please sign in to comment.