From c33851afa75d5d75fdd2143bdd8e0c582b570d58 Mon Sep 17 00:00:00 2001 From: donjuandem Date: Thu, 24 Nov 2016 14:12:46 +0100 Subject: [PATCH] extraction completed --- .gitignore | 37 + AUTHORS | 4 + CONTRIBUTING.md | 10 + ExpectStreamBak/.gitignore | 37 + ExpectStreamBak/AUTHORS | 4 + ExpectStreamBak/CONTRIBUTING.md | 10 + ExpectStreamBak/ISSUE_TEMPLATE.md | 1 + ExpectStreamBak/LICENSE | 674 + ExpectStreamBak/Makefile | 139 + .../docs/ast/source/AssertStream.js.json | 2233 ++ .../docs/ast/source/Expected.js.json | 4876 ++++ .../docs/ast/source/StreamHelper.js.json | 8549 +++++++ .../source/__tests__/AssertStreamTest.js.json | 10938 +++++++++ .../source/__tests__/ExpectStreamTest.js.json | 18568 ++++++++++++++++ .../ast/source/__tests__/ExpectedTest.js.json | 7435 +++++++ .../docs/ast/source/examples/test.js.json | 17 + ExpectStreamBak/docs/ast/source/index.js.json | 376 + ExpectStreamBak/docs/badge.svg | 17 + .../src/AssertStream.js~AssertStream.html | 464 + .../docs/class/src/Expected.js~Expected.html | 983 + ExpectStreamBak/docs/coverage.json | 33 + .../docs/css/prettify-tomorrow.css | 132 + ExpectStreamBak/docs/css/style.css | 944 + ExpectStreamBak/docs/dump.json | 1582 ++ .../docs/file/src/AssertStream.js.html | 106 + .../docs/file/src/Expected.js.html | 145 + .../docs/file/src/StreamHelper.js.html | 130 + .../src/__tests__/AssertStreamTest.js.html | 173 + .../src/__tests__/ExpectStreamTest.js.html | 308 + .../file/src/__tests__/ExpectedTest.js.html | 128 + .../docs/file/src/examples/test.js.html | 59 + ExpectStreamBak/docs/file/src/index.js.html | 66 + ExpectStreamBak/docs/function/index.html | 157 + ExpectStreamBak/docs/identifiers.html | 153 + ExpectStreamBak/docs/image/badge.svg | 17 + ExpectStreamBak/docs/image/github.png | Bin 0 -> 4268 bytes ExpectStreamBak/docs/image/search.png | Bin 0 -> 12704 bytes ExpectStreamBak/docs/index.html | 264 + ExpectStreamBak/docs/package.json | 638 + .../docs/script/inherited-summary.js | 28 + ExpectStreamBak/docs/script/inner-link.js | 31 + ExpectStreamBak/docs/script/manual.js | 13 + .../docs/script/patch-for-local.js | 8 + .../script/prettify/Apache-License-2.0.txt | 202 + .../docs/script/prettify/prettify.js | 28 + ExpectStreamBak/docs/script/pretty-print.js | 25 + ExpectStreamBak/docs/script/search.js | 117 + ExpectStreamBak/docs/script/search_index.js | 488 + ExpectStreamBak/docs/script/test-summary.js | 54 + ExpectStreamBak/docs/source.html | 137 + ExpectStreamBak/esdoc.json | 8 + ExpectStreamBak/examples/test | 4 + ExpectStreamBak/index.js | 1 + ExpectStreamBak/lib/AssertStream.js | 100 + ExpectStreamBak/lib/Expected.js | 156 + ExpectStreamBak/lib/StreamHelper.js | 98 + .../lib/__tests__/AssertStreamTest.js | 132 + .../lib/__tests__/ExpectStreamTest.js | 309 + ExpectStreamBak/lib/__tests__/ExpectedTest.js | 86 + ExpectStreamBak/lib/examples/test.js | 3 + ExpectStreamBak/lib/index.js | 15 + ISSUE_TEMPLATE.md | 1 + LICENSE | 674 + Makefile | 139 + PULL_REQUEST_TEMPLATE.md | 8 + README.md | 169 + docs/ast/source/AssertStream.js.json | 2233 ++ docs/ast/source/Expected.js.json | 4876 ++++ docs/ast/source/StreamHelper.js.json | 8549 +++++++ .../source/__tests__/AssertStreamTest.js.json | 10938 +++++++++ .../source/__tests__/ExpectStreamTest.js.json | 18568 ++++++++++++++++ .../ast/source/__tests__/ExpectedTest.js.json | 7435 +++++++ docs/ast/source/examples/test.js.json | 17 + docs/ast/source/index.js.json | 376 + docs/badge.svg | 17 + .../src/AssertStream.js~AssertStream.html | 464 + docs/class/src/Expected.js~Expected.html | 983 + docs/coverage.json | 33 + docs/css/prettify-tomorrow.css | 132 + docs/css/style.css | 944 + docs/dump.json | 1582 ++ docs/file/src/AssertStream.js.html | 106 + docs/file/src/Expected.js.html | 145 + docs/file/src/StreamHelper.js.html | 130 + .../src/__tests__/AssertStreamTest.js.html | 173 + .../src/__tests__/ExpectStreamTest.js.html | 308 + docs/file/src/__tests__/ExpectedTest.js.html | 128 + docs/file/src/examples/test.js.html | 59 + docs/file/src/index.js.html | 66 + docs/function/index.html | 157 + docs/identifiers.html | 153 + docs/image/badge.svg | 17 + docs/image/github.png | Bin 0 -> 4268 bytes docs/image/search.png | Bin 0 -> 12704 bytes docs/index.html | 264 + docs/package.json | 642 + docs/script/inherited-summary.js | 28 + docs/script/inner-link.js | 31 + docs/script/manual.js | 13 + docs/script/patch-for-local.js | 8 + docs/script/prettify/Apache-License-2.0.txt | 202 + docs/script/prettify/prettify.js | 28 + docs/script/pretty-print.js | 25 + docs/script/search.js | 117 + docs/script/search_index.js | 488 + docs/script/test-summary.js | 54 + docs/source.html | 137 + esdoc.json | 8 + examples/test | 4 + index.js | 1 + lib/AssertStream.js | 100 + lib/Expected.js | 156 + lib/StreamHelper.js | 98 + lib/__tests__/AssertStreamTest.js | 132 + lib/__tests__/ExpectStreamTest.js | 309 + lib/__tests__/ExpectedTest.js | 86 + lib/examples/test.js | 3 + lib/index.js | 15 + package.json | 642 + setupfile | 1 + src/AssertStream.js | 47 + src/Expected.js | 86 + src/StreamHelper.js | 71 + src/__tests__/AssertStreamTest.js | 114 + src/__tests__/ExpectStreamTest.js | 249 + src/__tests__/ExpectedTest.js | 69 + src/examples/test.js | 0 src/index.js | 7 + 128 files changed, 126265 insertions(+) create mode 100644 .gitignore create mode 100644 AUTHORS create mode 100644 CONTRIBUTING.md create mode 100644 ExpectStreamBak/.gitignore create mode 100644 ExpectStreamBak/AUTHORS create mode 100644 ExpectStreamBak/CONTRIBUTING.md create mode 100644 ExpectStreamBak/ISSUE_TEMPLATE.md create mode 100644 ExpectStreamBak/LICENSE create mode 100644 ExpectStreamBak/Makefile create mode 100644 ExpectStreamBak/docs/ast/source/AssertStream.js.json create mode 100644 ExpectStreamBak/docs/ast/source/Expected.js.json create mode 100644 ExpectStreamBak/docs/ast/source/StreamHelper.js.json create mode 100644 ExpectStreamBak/docs/ast/source/__tests__/AssertStreamTest.js.json create mode 100644 ExpectStreamBak/docs/ast/source/__tests__/ExpectStreamTest.js.json create mode 100644 ExpectStreamBak/docs/ast/source/__tests__/ExpectedTest.js.json create mode 100644 ExpectStreamBak/docs/ast/source/examples/test.js.json create mode 100644 ExpectStreamBak/docs/ast/source/index.js.json create mode 100644 ExpectStreamBak/docs/badge.svg create mode 100644 ExpectStreamBak/docs/class/src/AssertStream.js~AssertStream.html create mode 100644 ExpectStreamBak/docs/class/src/Expected.js~Expected.html create mode 100644 ExpectStreamBak/docs/coverage.json create mode 100644 ExpectStreamBak/docs/css/prettify-tomorrow.css create mode 100644 ExpectStreamBak/docs/css/style.css create mode 100644 ExpectStreamBak/docs/dump.json create mode 100644 ExpectStreamBak/docs/file/src/AssertStream.js.html create mode 100644 ExpectStreamBak/docs/file/src/Expected.js.html create mode 100644 ExpectStreamBak/docs/file/src/StreamHelper.js.html create mode 100644 ExpectStreamBak/docs/file/src/__tests__/AssertStreamTest.js.html create mode 100644 ExpectStreamBak/docs/file/src/__tests__/ExpectStreamTest.js.html create mode 100644 ExpectStreamBak/docs/file/src/__tests__/ExpectedTest.js.html create mode 100644 ExpectStreamBak/docs/file/src/examples/test.js.html create mode 100644 ExpectStreamBak/docs/file/src/index.js.html create mode 100644 ExpectStreamBak/docs/function/index.html create mode 100644 ExpectStreamBak/docs/identifiers.html create mode 100644 ExpectStreamBak/docs/image/badge.svg create mode 100644 ExpectStreamBak/docs/image/github.png create mode 100644 ExpectStreamBak/docs/image/search.png create mode 100644 ExpectStreamBak/docs/index.html create mode 100644 ExpectStreamBak/docs/package.json create mode 100644 ExpectStreamBak/docs/script/inherited-summary.js create mode 100644 ExpectStreamBak/docs/script/inner-link.js create mode 100644 ExpectStreamBak/docs/script/manual.js create mode 100644 ExpectStreamBak/docs/script/patch-for-local.js create mode 100644 ExpectStreamBak/docs/script/prettify/Apache-License-2.0.txt create mode 100644 ExpectStreamBak/docs/script/prettify/prettify.js create mode 100644 ExpectStreamBak/docs/script/pretty-print.js create mode 100644 ExpectStreamBak/docs/script/search.js create mode 100644 ExpectStreamBak/docs/script/search_index.js create mode 100644 ExpectStreamBak/docs/script/test-summary.js create mode 100644 ExpectStreamBak/docs/source.html create mode 100644 ExpectStreamBak/esdoc.json create mode 100755 ExpectStreamBak/examples/test create mode 100644 ExpectStreamBak/index.js create mode 100644 ExpectStreamBak/lib/AssertStream.js create mode 100644 ExpectStreamBak/lib/Expected.js create mode 100644 ExpectStreamBak/lib/StreamHelper.js create mode 100644 ExpectStreamBak/lib/__tests__/AssertStreamTest.js create mode 100644 ExpectStreamBak/lib/__tests__/ExpectStreamTest.js create mode 100644 ExpectStreamBak/lib/__tests__/ExpectedTest.js create mode 100644 ExpectStreamBak/lib/examples/test.js create mode 100644 ExpectStreamBak/lib/index.js create mode 100644 ISSUE_TEMPLATE.md create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 PULL_REQUEST_TEMPLATE.md create mode 100644 README.md create mode 100644 docs/ast/source/AssertStream.js.json create mode 100644 docs/ast/source/Expected.js.json create mode 100644 docs/ast/source/StreamHelper.js.json create mode 100644 docs/ast/source/__tests__/AssertStreamTest.js.json create mode 100644 docs/ast/source/__tests__/ExpectStreamTest.js.json create mode 100644 docs/ast/source/__tests__/ExpectedTest.js.json create mode 100644 docs/ast/source/examples/test.js.json create mode 100644 docs/ast/source/index.js.json create mode 100644 docs/badge.svg create mode 100644 docs/class/src/AssertStream.js~AssertStream.html create mode 100644 docs/class/src/Expected.js~Expected.html create mode 100644 docs/coverage.json create mode 100644 docs/css/prettify-tomorrow.css create mode 100644 docs/css/style.css create mode 100644 docs/dump.json create mode 100644 docs/file/src/AssertStream.js.html create mode 100644 docs/file/src/Expected.js.html create mode 100644 docs/file/src/StreamHelper.js.html create mode 100644 docs/file/src/__tests__/AssertStreamTest.js.html create mode 100644 docs/file/src/__tests__/ExpectStreamTest.js.html create mode 100644 docs/file/src/__tests__/ExpectedTest.js.html create mode 100644 docs/file/src/examples/test.js.html create mode 100644 docs/file/src/index.js.html create mode 100644 docs/function/index.html create mode 100644 docs/identifiers.html create mode 100644 docs/image/badge.svg create mode 100644 docs/image/github.png create mode 100644 docs/image/search.png create mode 100644 docs/index.html create mode 100644 docs/package.json create mode 100644 docs/script/inherited-summary.js create mode 100644 docs/script/inner-link.js create mode 100644 docs/script/manual.js create mode 100644 docs/script/patch-for-local.js create mode 100644 docs/script/prettify/Apache-License-2.0.txt create mode 100644 docs/script/prettify/prettify.js create mode 100644 docs/script/pretty-print.js create mode 100644 docs/script/search.js create mode 100644 docs/script/search_index.js create mode 100644 docs/script/test-summary.js create mode 100644 docs/source.html create mode 100644 esdoc.json create mode 100755 examples/test create mode 100644 index.js create mode 100644 lib/AssertStream.js create mode 100644 lib/Expected.js create mode 100644 lib/StreamHelper.js create mode 100644 lib/__tests__/AssertStreamTest.js create mode 100644 lib/__tests__/ExpectStreamTest.js create mode 100644 lib/__tests__/ExpectedTest.js create mode 100644 lib/examples/test.js create mode 100644 lib/index.js create mode 100644 package.json create mode 100644 setupfile create mode 100644 src/AssertStream.js create mode 100644 src/Expected.js create mode 100644 src/StreamHelper.js create mode 100644 src/__tests__/AssertStreamTest.js create mode 100644 src/__tests__/ExpectStreamTest.js create mode 100644 src/__tests__/ExpectedTest.js create mode 100644 src/examples/test.js create mode 100644 src/index.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd687be --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Logs +build +*.swp +logs +*.log +npm-debug.log* +build +.swp + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +node_modules + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..7e3de68 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,4 @@ +# Authors ordered by the time of their first contribution + +Marco Sliwa +Pascal Schuler diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c226410 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contributing + +If you want to contribute to this repository, please ensure ... + - to use ```make``` for development (it validates the source code and transpiles it to ```/lib```). + - to follow the existing coding style. + - to use the linting tools that are listed in the ```package.json``` (which you get for free when using ```make```). + - to add and/or customize unit tests for any changed code. + - to reference the corresponding issue in your pull request with a small description of your changes. + +All contributors are listed in the ```AUTHORS``` file, sorted by the time of their first contribution. diff --git a/ExpectStreamBak/.gitignore b/ExpectStreamBak/.gitignore new file mode 100644 index 0000000..fd687be --- /dev/null +++ b/ExpectStreamBak/.gitignore @@ -0,0 +1,37 @@ +# Logs +build +*.swp +logs +*.log +npm-debug.log* +build +.swp + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +node_modules + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/ExpectStreamBak/AUTHORS b/ExpectStreamBak/AUTHORS new file mode 100644 index 0000000..7e3de68 --- /dev/null +++ b/ExpectStreamBak/AUTHORS @@ -0,0 +1,4 @@ +# Authors ordered by the time of their first contribution + +Marco Sliwa +Pascal Schuler diff --git a/ExpectStreamBak/CONTRIBUTING.md b/ExpectStreamBak/CONTRIBUTING.md new file mode 100644 index 0000000..c226410 --- /dev/null +++ b/ExpectStreamBak/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contributing + +If you want to contribute to this repository, please ensure ... + - to use ```make``` for development (it validates the source code and transpiles it to ```/lib```). + - to follow the existing coding style. + - to use the linting tools that are listed in the ```package.json``` (which you get for free when using ```make```). + - to add and/or customize unit tests for any changed code. + - to reference the corresponding issue in your pull request with a small description of your changes. + +All contributors are listed in the ```AUTHORS``` file, sorted by the time of their first contribution. diff --git a/ExpectStreamBak/ISSUE_TEMPLATE.md b/ExpectStreamBak/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ExpectStreamBak/ISSUE_TEMPLATE.md @@ -0,0 +1 @@ + diff --git a/ExpectStreamBak/LICENSE b/ExpectStreamBak/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/ExpectStreamBak/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ExpectStreamBak/Makefile b/ExpectStreamBak/Makefile new file mode 100644 index 0000000..b516189 --- /dev/null +++ b/ExpectStreamBak/Makefile @@ -0,0 +1,139 @@ +.PHONY: test, build, setup, docs, install, clean + +## +# use bash as shell +# +SHELL:=/bin/bash + +## +# root directory (Makefile location) +# +WORKING_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +## +# default value for installdir (= working dir) +# +ifeq ($(INSTALLDIR),) +INSTALLDIR=$(WORKING_DIR) +endif + +## +# find all relevant sources (sources that end with .js) +# and get their path relative to working dir +# +SOURCES_RELATIVE:= \ + $(shell cd $(WORKING_DIR) && find src -type f -iname '*.js') + +## +# save the relative sources to a new variable that holds al SOURCES +# with absolute paths +# +SOURCES:= \ + $(foreach x, $(SOURCES_RELATIVE), $(WORKING_DIR)/$(x)) + +## +# these are our "object"-files - the files that are transpiled from +# es6 to es5 +# +OBJECTS:= \ + $(foreach x, $(SOURCES_RELATIVE), $(WORKING_DIR)/build/$(x)) + +## +# these are our "object"-files - the files that are transpiled from +# es6 to es5 +# +INSTALLED_OBJECTS:= \ + $(foreach x, $(shell cd $(WORKING_DIR)/src && find . -type f -iname '*.js'), $(INSTALLDIR)/lib/$(x)) \ + +## +# These are our example files - they will be moved to a separate +# examples dir in root folder +# +EXAMPLES:= \ + $(foreach x, $(shell cd $(WORKING_DIR)/src && find examples -type f -iname '*.js'), $(INSTALLDIR)/$(basename $(x))) + +all: install + +setup: $(WORKING_DIR)/setupfile + +build: $(OBJECTS) + @+make -s $(WORKING_DIR)/build/src/lib + +test: build + $(WORKING_DIR)/node_modules/.bin/istanbul cover --root $(WORKING_DIR)/build/src -x "**/__tests__/**" $(WORKING_DIR)/node_modules/.bin/_mocha $(shell find $(WORKING_DIR)/build/src -name "*Test.js") -- -R spec --require source-map-support/register + $(WORKING_DIR)/node_modules/.bin/remap-istanbul -i $(WORKING_DIR)/coverage/coverage.json -o $(WORKING_DIR)/coverage/lcov-report -t html + +docs: build + $(WORKING_DIR)/node_modules/.bin/esdoc -c esdoc.json + +install: docs test + @+make -s $(INSTALLED_OBJECTS) + @+make -s $(EXAMPLES) + $(info Copied $(INSTALLED_OBJECTS) to $(INSTALLDIR)) + +clean: + rm -rf $(WORKING_DIR)/build + rm -rf $(WORKING_DIR)/docs + rm -rf $(WORKING_DIR)/lib + rm -rf $(WORKING_DIR)/coverage + rm -rf $(WORKING_DIR)/setupfile + +## +# file to save setup status +# +$(WORKING_DIR)/setupfile: + @echo "setup done" > $(WORKING_DIR)/setupfile + +## +# this targets are necessary to not always trigger a rebuild of +# transpiled files, even if they exist. if the no-op is removed +# this will trigger a rebuild too +# +$(WORKING_DIR)/src/%.js: + @echo "" > /dev/null + +## +# target to create build/src. Used as precondition +# for linking a ne dir lib recursively to src +# +$(WORKING_DIR)/build/src: + mkdir -p $@ + +## +# links a directory "lib" located in build/src to src. +# Used to be able to test binaries, because they use +# the lib after compiling has finished +# +$(WORKING_DIR)/build/src/lib: $(WORKING_DIR)/build/src + ln -s $< $@ + +## +# every transpiled file requires a matching source file +# to be created. +# +$(WORKING_DIR)/build/src/%.js: $(WORKING_DIR)/src/%.js $(WORKING_DIR)/setupfile + mkdir -p $(dir $@) + $(WORKING_DIR)/node_modules/.bin/eslint $< + $(WORKING_DIR)/node_modules/.bin/babel $< --out-file $@ --source-maps --presets stage-0,es2015 --plugins transform-decorators-legacy,transform-runtime,transform-class-properties + +## +# every destination file needs a transpiled +# source that is tested +# +$(INSTALLDIR)/lib/%.js: $(WORKING_DIR)/build/src/%.js + mkdir -p $(dir $@) + cp $< $@ + +$(WORKING_DIR)/build/src/%.png: $(WORKING_DIR)/src/%.png + mkdir -p $(dir $@) + cp $< $@ + +## +# every destination file needs a transpiled +# source that is tested +# +$(INSTALLDIR)/examples/%: $(WORKING_DIR)/build/src/examples/%.js + mkdir -p $(dir $@) + echo "#!/usr/bin/env node" > $@ + cat $< >> $@ + chmod +x $@ diff --git a/ExpectStreamBak/docs/ast/source/AssertStream.js.json b/ExpectStreamBak/docs/ast/source/AssertStream.js.json new file mode 100644 index 0000000..a4782be --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/AssertStream.js.json @@ -0,0 +1,2233 @@ +{ + "type": "Program", + "start": 0, + "end": 1405, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 48, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "Writable" + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "Writable" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": "stream", + "rawValue": "stream", + "raw": "\"stream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 35, + "end": 69, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 42, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 42, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "Expected" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 56, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 33 + } + }, + "value": "./Expected", + "rawValue": "./Expected", + "raw": "\"./Expected\"" + } + }, + { + "type": "ImportDeclaration", + "start": 70, + "end": 111, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 77, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 77, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "defaults" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 91, + "end": 110, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 40 + } + }, + "value": "set-default-value", + "rawValue": "set-default-value", + "raw": "\"set-default-value\"" + }, + "trailingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ] + }, + { + "type": "ExportDefaultDeclaration", + "start": 253, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "declaration": { + "type": "ClassDeclaration", + "start": 268, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 274, + "end": 286, + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "name": "AssertStream", + "leadingComments": null + }, + "superClass": { + "type": "Identifier", + "start": 295, + "end": 303, + "loc": { + "start": { + "line": 11, + "column": 42 + }, + "end": { + "line": 11, + "column": 50 + } + }, + "name": "Writable" + }, + "body": { + "type": "ClassBody", + "start": 304, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 512, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 512, + "end": 523, + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 15 + } + }, + "name": "constructor", + "leadingComments": null + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 523, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 524, + "end": 532, + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 24 + } + }, + "name": "expected" + }, + { + "type": "Identifier", + "start": 534, + "end": 541, + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 33 + } + }, + "name": "options" + } + ], + "body": { + "type": "BlockStatement", + "start": 543, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 601, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 23, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 600, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 23, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 553, + "end": 558, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 559, + "end": 599, + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 23, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 573, + "end": 589, + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 573, + "end": 583, + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 585, + "end": 589, + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 611, + "end": 658, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 55 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 611, + "end": 657, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 54 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 611, + "end": 624, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 611, + "end": 615, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 616, + "end": 624, + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 627, + "end": 657, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 627, + "end": 638, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 636, + "end": 638, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 639, + "end": 647, + "loc": { + "start": { + "line": 25, + "column": 36 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "name": "expected" + }, + { + "type": "Identifier", + "start": 649, + "end": 656, + "loc": { + "start": { + "line": 25, + "column": 46 + }, + "end": { + "line": 25, + "column": 53 + } + }, + "name": "options" + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 667, + "end": 721, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 62 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 667, + "end": 720, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 61 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 667, + "end": 678, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 667, + "end": 671, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 672, + "end": 678, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 683, + "end": 720, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 683, + "end": 710, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 683, + "end": 707, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 683, + "end": 691, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 692, + "end": 706, + "loc": { + "start": { + "line": 26, + "column": 33 + }, + "end": { + "line": 26, + "column": 47 + } + }, + "object": { + "type": "Identifier", + "start": 692, + "end": 699, + "loc": { + "start": { + "line": 26, + "column": 33 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "name": "options" + }, + "property": { + "type": "Identifier", + "start": 700, + "end": 706, + "loc": { + "start": { + "line": 26, + "column": 41 + }, + "end": { + "line": 26, + "column": 47 + } + }, + "name": "tapper" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 708, + "end": 710, + "loc": { + "start": { + "line": 26, + "column": 49 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 711, + "end": 719, + "loc": { + "start": { + "line": 26, + "column": 52 + }, + "end": { + "line": 26, + "column": 60 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 717, + "end": 719, + "loc": { + "start": { + "line": 26, + "column": 58 + }, + "end": { + "line": 26, + "column": 60 + } + }, + "body": [] + } + } + ] + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * constructor for this stream\n *\n * @constructor\n * @param {*} expected value\n * @param {object} options configuring the behaviour of AssertSream\n ", + "start": 311, + "end": 507, + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 7 + } + }, + "range": [ + 311, + 507 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n ", + "start": 733, + "end": 1066, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "range": [ + 733, + 1066 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1071, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1071, + "end": 1077, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 10 + } + }, + "name": "_write", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1077, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 10 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1078, + "end": 1083, + "loc": { + "start": { + "line": 39, + "column": 11 + }, + "end": { + "line": 39, + "column": 16 + } + }, + "name": "chunk" + }, + { + "type": "Identifier", + "start": 1085, + "end": 1088, + "loc": { + "start": { + "line": 39, + "column": 18 + }, + "end": { + "line": 39, + "column": 21 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 1090, + "end": 1092, + "loc": { + "start": { + "line": 39, + "column": 23 + }, + "end": { + "line": 39, + "column": 25 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 1094, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 27 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1104, + "end": 1169, + "loc": { + "start": { + "line": 40, + "column": 8 + }, + "end": { + "line": 40, + "column": 73 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1110, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "id": { + "type": "Identifier", + "start": 1110, + "end": 1114, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 18 + } + }, + "name": "data" + }, + "init": { + "type": "ConditionalExpression", + "start": 1119, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "test": { + "type": "CallExpression", + "start": 1119, + "end": 1141, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 45 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1119, + "end": 1134, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 1119, + "end": 1125, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 29 + } + }, + "name": "Buffer" + }, + "property": { + "type": "Identifier", + "start": 1126, + "end": 1134, + "loc": { + "start": { + "line": 40, + "column": 30 + }, + "end": { + "line": 40, + "column": 38 + } + }, + "name": "isBuffer" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1135, + "end": 1140, + "loc": { + "start": { + "line": 40, + "column": 39 + }, + "end": { + "line": 40, + "column": 44 + } + }, + "name": "chunk" + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 1144, + "end": 1160, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 64 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1144, + "end": 1158, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 62 + } + }, + "object": { + "type": "Identifier", + "start": 1144, + "end": 1149, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 53 + } + }, + "name": "chunk" + }, + "property": { + "type": "Identifier", + "start": 1150, + "end": 1158, + "loc": { + "start": { + "line": 40, + "column": 54 + }, + "end": { + "line": 40, + "column": 62 + } + }, + "name": "toString" + }, + "computed": false + }, + "arguments": [] + }, + "alternate": { + "type": "Identifier", + "start": 1163, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 67 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "name": "chunk" + } + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1178, + "end": 1219, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 49 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1184, + "end": 1218, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 1184, + "end": 1190, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "result" + }, + "init": { + "type": "CallExpression", + "start": 1193, + "end": 1218, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1193, + "end": 1212, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 42 + } + }, + "object": { + "type": "MemberExpression", + "start": 1193, + "end": 1206, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "object": { + "type": "ThisExpression", + "start": 1193, + "end": 1197, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 27 + } + } + }, + "property": { + "type": "Identifier", + "start": 1198, + "end": 1206, + "loc": { + "start": { + "line": 41, + "column": 28 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1207, + "end": 1212, + "loc": { + "start": { + "line": 41, + "column": 37 + }, + "end": { + "line": 41, + "column": 42 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1213, + "end": 1217, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 47 + } + }, + "name": "data" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1229, + "end": 1255, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 34 + } + }, + "expression": { + "type": "CallExpression", + "start": 1229, + "end": 1254, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1229, + "end": 1240, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1229, + "end": 1233, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1234, + "end": 1240, + "loc": { + "start": { + "line": 43, + "column": 13 + }, + "end": { + "line": 43, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1241, + "end": 1245, + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 24 + } + }, + "name": "data" + }, + { + "type": "Identifier", + "start": 1247, + "end": 1253, + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 43, + "column": 32 + } + }, + "name": "result" + } + ] + } + }, + { + "type": "ReturnStatement", + "start": 1265, + "end": 1396, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 139 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 1272, + "end": 1395, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 138 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1272, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "left": { + "type": "Identifier", + "start": 1272, + "end": 1278, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 21 + } + }, + "name": "result" + }, + "operator": "===", + "right": { + "type": "UnaryExpression", + "start": 1283, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 26 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 1284, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + }, + "consequent": { + "type": "CallExpression", + "start": 1288, + "end": 1332, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 75 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1288, + "end": 1297, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 40 + } + }, + "object": { + "type": "ThisExpression", + "start": 1288, + "end": 1292, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 35 + } + } + }, + "property": { + "type": "Identifier", + "start": 1293, + "end": 1297, + "loc": { + "start": { + "line": 45, + "column": 36 + }, + "end": { + "line": 45, + "column": 40 + } + }, + "name": "emit" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1298, + "end": 1305, + "loc": { + "start": { + "line": 45, + "column": 41 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "CallExpression", + "start": 1307, + "end": 1331, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 74 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1307, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 72 + } + }, + "object": { + "type": "MemberExpression", + "start": 1307, + "end": 1320, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 63 + } + }, + "object": { + "type": "ThisExpression", + "start": 1307, + "end": 1311, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 54 + } + } + }, + "property": { + "type": "Identifier", + "start": 1312, + "end": 1320, + "loc": { + "start": { + "line": 45, + "column": 55 + }, + "end": { + "line": 45, + "column": 63 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1321, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 64 + }, + "end": { + "line": 45, + "column": 72 + } + }, + "name": "getError" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "alternate": { + "type": "CallExpression", + "start": 1335, + "end": 1395, + "loc": { + "start": { + "line": 45, + "column": 78 + }, + "end": { + "line": 45, + "column": 138 + } + }, + "callee": { + "type": "Identifier", + "start": 1335, + "end": 1345, + "loc": { + "start": { + "line": 45, + "column": 78 + }, + "end": { + "line": 45, + "column": 88 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1346, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 89 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "ConditionalExpression", + "start": 1352, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1352, + "end": 1364, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 107 + } + }, + "left": { + "type": "Identifier", + "start": 1352, + "end": 1358, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 101 + } + }, + "name": "result" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1363, + "end": 1364, + "loc": { + "start": { + "line": 45, + "column": 106 + }, + "end": { + "line": 45, + "column": 107 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + }, + "consequent": { + "type": "CallExpression", + "start": 1367, + "end": 1384, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 127 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1367, + "end": 1376, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 119 + } + }, + "object": { + "type": "ThisExpression", + "start": 1367, + "end": 1371, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 114 + } + } + }, + "property": { + "type": "Identifier", + "start": 1372, + "end": 1376, + "loc": { + "start": { + "line": 45, + "column": 115 + }, + "end": { + "line": 45, + "column": 119 + } + }, + "name": "emit" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1377, + "end": 1383, + "loc": { + "start": { + "line": 45, + "column": 120 + }, + "end": { + "line": 45, + "column": 126 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + } + ] + }, + "alternate": { + "type": "CallExpression", + "start": 1387, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 130 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "callee": { + "type": "Identifier", + "start": 1387, + "end": 1389, + "loc": { + "start": { + "line": 45, + "column": 130 + }, + "end": { + "line": 45, + "column": 132 + } + }, + "name": "cb" + }, + "arguments": [] + } + } + }, + { + "type": "Literal", + "start": 1393, + "end": 1394, + "loc": { + "start": { + "line": 45, + "column": 136 + }, + "end": { + "line": 45, + "column": 137 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + } + ] + } + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n ", + "start": 733, + "end": 1066, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "range": [ + 733, + 1066 + ] + } + ] + } + ] + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/Expected.js.json b/ExpectStreamBak/docs/ast/source/Expected.js.json new file mode 100644 index 0000000..a5270eb --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/Expected.js.json @@ -0,0 +1,4876 @@ +{ + "type": "Program", + "start": 0, + "end": 2512, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 87, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "isArray" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 20, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": "lodash.isarray", + "rawValue": "lodash.isarray", + "raw": "\"lodash.isarray\"" + } + }, + { + "type": "ImportDeclaration", + "start": 38, + "end": 75, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 45, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 45, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "name": "isEqual" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 58, + "end": 74, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 36 + } + }, + "value": "lodash.isequal", + "rawValue": "lodash.isequal", + "raw": "\"lodash.isequal\"" + } + }, + { + "type": "ImportDeclaration", + "start": 76, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 83, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "local": { + "type": "Identifier", + "start": 83, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "isFunction" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 99, + "end": 118, + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 42 + } + }, + "value": "lodash.isfunction", + "rawValue": "lodash.isfunction", + "raw": "\"lodash.isfunction\"" + } + }, + { + "type": "ImportDeclaration", + "start": 120, + "end": 153, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 127, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 127, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "name": "isNil" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 138, + "end": 152, + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 32 + } + }, + "value": "lodash.isnil", + "rawValue": "lodash.isnil", + "raw": "\"lodash.isnil\"" + } + }, + { + "type": "ImportDeclaration", + "start": 154, + "end": 191, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "name": "isMatch" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 174, + "end": 190, + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 36 + } + }, + "value": "lodash.ismatch", + "rawValue": "lodash.ismatch", + "raw": "\"lodash.ismatch\"" + } + }, + { + "type": "ImportDeclaration", + "start": 192, + "end": 222, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 215, + "end": 221, + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExportDefaultDeclaration", + "start": 224, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "declaration": { + "type": "ClassDeclaration", + "start": 239, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 245, + "end": 253, + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "name": "Expected" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 254, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 475, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 482, + "end": 484, + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "of" + }, + "static": true, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 484, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 485, + "end": 492, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 21 + } + }, + "argument": { + "type": "Identifier", + "start": 488, + "end": 492, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 494, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 504, + "end": 533, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 37 + } + }, + "argument": { + "type": "NewExpression", + "start": 511, + "end": 532, + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 515, + "end": 523, + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 27 + } + }, + "name": "Expected" + }, + "arguments": [ + { + "type": "SpreadElement", + "start": 524, + "end": 531, + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 35 + } + }, + "argument": { + "type": "Identifier", + "start": 527, + "end": 531, + "loc": { + "start": { + "line": 19, + "column": 31 + }, + "end": { + "line": 19, + "column": 35 + } + }, + "name": "args" + } + } + ] + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Creates an ExpectationClass, that checks,\n * whether an incoming value matches the\n * expectations\n *\n * @param {*} args needed for creation\n * @return {Expected}\n ", + "start": 261, + "end": 470, + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 17, + "column": 7 + } + }, + "range": [ + 261, + 470 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n ", + "start": 545, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 28, + "column": 7 + } + }, + "range": [ + 545, + 744 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 749, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 749, + "end": 760, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 15 + } + }, + "name": "constructor", + "leadingComments": null + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 760, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 761, + "end": 769, + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 24 + } + }, + "name": "expected" + }, + { + "type": "ObjectPattern", + "start": 771, + "end": 801, + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 56 + } + }, + "properties": [ + { + "type": "Property", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "name": "filter" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "name": "filter" + } + }, + { + "type": "Property", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "name": "eventually" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "name": "eventually" + } + }, + { + "type": "Property", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "name": "strict" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "name": "strict" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 803, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 58 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 813, + "end": 834, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 813, + "end": 833, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 813, + "end": 826, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 813, + "end": 817, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 818, + "end": 826, + "loc": { + "start": { + "line": 30, + "column": 13 + }, + "end": { + "line": 30, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 831, + "end": 833, + "loc": { + "start": { + "line": 30, + "column": 26 + }, + "end": { + "line": 30, + "column": 28 + } + }, + "elements": [] + } + } + }, + { + "type": "ExpressionStatement", + "start": 843, + "end": 910, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 75 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 843, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 843, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "object": { + "type": "ThisExpression", + "start": 843, + "end": 847, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 848, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "expection" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 861, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "test": { + "type": "CallExpression", + "start": 861, + "end": 878, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 43 + } + }, + "callee": { + "type": "Identifier", + "start": 861, + "end": 868, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 33 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "Identifier", + "start": 869, + "end": 877, + "loc": { + "start": { + "line": 31, + "column": 34 + }, + "end": { + "line": 31, + "column": 42 + } + }, + "name": "expected" + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 881, + "end": 898, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 881, + "end": 895, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 60 + } + }, + "object": { + "type": "Identifier", + "start": 881, + "end": 889, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 54 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 890, + "end": 895, + "loc": { + "start": { + "line": 31, + "column": 55 + }, + "end": { + "line": 31, + "column": 60 + } + }, + "name": "slice" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 896, + "end": 897, + "loc": { + "start": { + "line": 31, + "column": 61 + }, + "end": { + "line": 31, + "column": 62 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + }, + "alternate": { + "type": "Identifier", + "start": 901, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 66 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "name": "expected" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 919, + "end": 946, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 919, + "end": 945, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 919, + "end": 932, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 919, + "end": 923, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 924, + "end": 932, + "loc": { + "start": { + "line": 32, + "column": 13 + }, + "end": { + "line": 32, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 937, + "end": 945, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 34 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 955, + "end": 1007, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 60 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 955, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 955, + "end": 967, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 20 + } + }, + "object": { + "type": "ThisExpression", + "start": 955, + "end": 959, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 960, + "end": 967, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 20 + } + }, + "name": "matcher" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 973, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "test": { + "type": "CallExpression", + "start": 973, + "end": 986, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 973, + "end": 978, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 979, + "end": 985, + "loc": { + "start": { + "line": 33, + "column": 32 + }, + "end": { + "line": 33, + "column": 38 + } + }, + "name": "strict" + } + ] + }, + "consequent": { + "type": "Identifier", + "start": 989, + "end": 996, + "loc": { + "start": { + "line": 33, + "column": 42 + }, + "end": { + "line": 33, + "column": 49 + } + }, + "name": "isMatch" + }, + "alternate": { + "type": "Identifier", + "start": 999, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 52 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "name": "isEqual" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 1016, + "end": 1061, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 53 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1016, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1016, + "end": 1031, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "object": { + "type": "ThisExpression", + "start": 1016, + "end": 1020, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1021, + "end": 1031, + "loc": { + "start": { + "line": 34, + "column": 13 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "name": "onMisMatch" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1034, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "test": { + "type": "CallExpression", + "start": 1034, + "end": 1051, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 43 + } + }, + "callee": { + "type": "Identifier", + "start": 1034, + "end": 1039, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1040, + "end": 1050, + "loc": { + "start": { + "line": 34, + "column": 32 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "name": "eventually" + } + ] + }, + "consequent": { + "type": "UnaryExpression", + "start": 1054, + "end": 1056, + "loc": { + "start": { + "line": 34, + "column": 46 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 1055, + "end": 1056, + "loc": { + "start": { + "line": 34, + "column": 47 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + }, + "alternate": { + "type": "Literal", + "start": 1059, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 51 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 1070, + "end": 1124, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 62 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1070, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1070, + "end": 1081, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1070, + "end": 1074, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1075, + "end": 1081, + "loc": { + "start": { + "line": 35, + "column": 13 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "name": "filter" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1088, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "test": { + "type": "CallExpression", + "start": 1088, + "end": 1101, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1088, + "end": 1093, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1094, + "end": 1100, + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 38 + } + }, + "name": "filter" + } + ] + }, + "consequent": { + "type": "ArrowFunctionExpression", + "start": 1104, + "end": 1114, + "loc": { + "start": { + "line": 35, + "column": 42 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "Literal", + "start": 1110, + "end": 1114, + "loc": { + "start": { + "line": 35, + "column": 48 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + }, + "alternate": { + "type": "Identifier", + "start": 1117, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 55 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "name": "filter" + } + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n ", + "start": 545, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 28, + "column": 7 + } + }, + "range": [ + 545, + 744 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1136, + "end": 1277, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 43, + "column": 7 + } + }, + "range": [ + 1136, + 1277 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1282, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1282, + "end": 1290, + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 44, + "column": 12 + } + }, + "name": "includes", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1290, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1291, + "end": 1296, + "loc": { + "start": { + "line": 44, + "column": 13 + }, + "end": { + "line": 44, + "column": 18 + } + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 1298, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 20 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1308, + "end": 1347, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1314, + "end": 1346, + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 1314, + "end": 1322, + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1325, + "end": 1346, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 46 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1325, + "end": 1344, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 1325, + "end": 1338, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "object": { + "type": "ThisExpression", + "start": 1325, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1330, + "end": 1338, + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1339, + "end": 1344, + "loc": { + "start": { + "line": 45, + "column": 39 + }, + "end": { + "line": 45, + "column": 44 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1356, + "end": 1403, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 55 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1362, + "end": 1402, + "loc": { + "start": { + "line": 46, + "column": 14 + }, + "end": { + "line": 46, + "column": 54 + } + }, + "id": { + "type": "Identifier", + "start": 1362, + "end": 1369, + "loc": { + "start": { + "line": 46, + "column": 14 + }, + "end": { + "line": 46, + "column": 21 + } + }, + "name": "matches" + }, + "init": { + "type": "CallExpression", + "start": 1373, + "end": 1402, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1373, + "end": 1385, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "object": { + "type": "ThisExpression", + "start": 1373, + "end": 1377, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1378, + "end": 1385, + "loc": { + "start": { + "line": 46, + "column": 30 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "name": "matcher" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1386, + "end": 1391, + "loc": { + "start": { + "line": 46, + "column": 38 + }, + "end": { + "line": 46, + "column": 43 + } + }, + "name": "value" + }, + { + "type": "Identifier", + "start": 1393, + "end": 1401, + "loc": { + "start": { + "line": 46, + "column": 45 + }, + "end": { + "line": 46, + "column": 53 + } + }, + "name": "expected" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1412, + "end": 1464, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 60 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1418, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 14 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "id": { + "type": "Identifier", + "start": 1418, + "end": 1425, + "loc": { + "start": { + "line": 47, + "column": 14 + }, + "end": { + "line": 47, + "column": 21 + } + }, + "name": "onMatch" + }, + "init": { + "type": "ConditionalExpression", + "start": 1429, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1429, + "end": 1455, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "left": { + "type": "MemberExpression", + "start": 1429, + "end": 1449, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 1429, + "end": 1442, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "object": { + "type": "ThisExpression", + "start": 1429, + "end": 1433, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1434, + "end": 1442, + "loc": { + "start": { + "line": 47, + "column": 30 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1443, + "end": 1449, + "loc": { + "start": { + "line": 47, + "column": 39 + }, + "end": { + "line": 47, + "column": 45 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1454, + "end": 1455, + "loc": { + "start": { + "line": 47, + "column": 50 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "consequent": { + "type": "Literal", + "start": 1458, + "end": 1459, + "loc": { + "start": { + "line": 47, + "column": 54 + }, + "end": { + "line": 47, + "column": 55 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 1462, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 58 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1474, + "end": 1549, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 83 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1474, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1474, + "end": 1487, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 1474, + "end": 1478, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1479, + "end": 1487, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1490, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "test": { + "type": "Identifier", + "start": 1490, + "end": 1497, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 31 + } + }, + "name": "matches" + }, + "consequent": { + "type": "MemberExpression", + "start": 1500, + "end": 1513, + "loc": { + "start": { + "line": 49, + "column": 34 + }, + "end": { + "line": 49, + "column": 47 + } + }, + "object": { + "type": "ThisExpression", + "start": 1500, + "end": 1504, + "loc": { + "start": { + "line": 49, + "column": 34 + }, + "end": { + "line": 49, + "column": 38 + } + } + }, + "property": { + "type": "Identifier", + "start": 1505, + "end": 1513, + "loc": { + "start": { + "line": 49, + "column": 39 + }, + "end": { + "line": 49, + "column": 47 + } + }, + "name": "expected" + }, + "computed": false + }, + "alternate": { + "type": "CallExpression", + "start": 1516, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1516, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 67 + } + }, + "object": { + "type": "ArrayExpression", + "start": 1516, + "end": 1526, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 60 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 1517, + "end": 1525, + "loc": { + "start": { + "line": 49, + "column": 51 + }, + "end": { + "line": 49, + "column": 59 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1527, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 61 + }, + "end": { + "line": 49, + "column": 67 + } + }, + "name": "concat" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1534, + "end": 1547, + "loc": { + "start": { + "line": 49, + "column": 68 + }, + "end": { + "line": 49, + "column": 81 + } + }, + "object": { + "type": "ThisExpression", + "start": 1534, + "end": 1538, + "loc": { + "start": { + "line": 49, + "column": 68 + }, + "end": { + "line": 49, + "column": 72 + } + } + }, + "property": { + "type": "Identifier", + "start": 1539, + "end": 1547, + "loc": { + "start": { + "line": 49, + "column": 73 + }, + "end": { + "line": 49, + "column": 81 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + } + }, + { + "type": "ReturnStatement", + "start": 1559, + "end": 1602, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 51 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 1566, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 15 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "test": { + "type": "Identifier", + "start": 1566, + "end": 1573, + "loc": { + "start": { + "line": 51, + "column": 15 + }, + "end": { + "line": 51, + "column": 22 + } + }, + "name": "matches" + }, + "consequent": { + "type": "Identifier", + "start": 1576, + "end": 1583, + "loc": { + "start": { + "line": 51, + "column": 25 + }, + "end": { + "line": 51, + "column": 32 + } + }, + "name": "onMatch" + }, + "alternate": { + "type": "MemberExpression", + "start": 1586, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 35 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "object": { + "type": "ThisExpression", + "start": 1586, + "end": 1590, + "loc": { + "start": { + "line": 51, + "column": 35 + }, + "end": { + "line": 51, + "column": 39 + } + } + }, + "property": { + "type": "Identifier", + "start": 1591, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 40 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "name": "onMisMatch" + }, + "computed": false + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1136, + "end": 1277, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 43, + "column": 7 + } + }, + "range": [ + 1136, + 1277 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1614, + "end": 1741, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 59, + "column": 7 + } + }, + "range": [ + 1614, + 1741 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1746, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1746, + "end": 1751, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 60, + "column": 9 + } + }, + "name": "match", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1751, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1752, + "end": 1757, + "loc": { + "start": { + "line": 60, + "column": 10 + }, + "end": { + "line": 60, + "column": 15 + } + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 1759, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 17 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1792, + "end": 1818, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "expression": { + "type": "CallExpression", + "start": 1792, + "end": 1817, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1792, + "end": 1810, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 1792, + "end": 1805, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 1792, + "end": 1796, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 12 + } + }, + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1797, + "end": 1805, + "loc": { + "start": { + "line": 61, + "column": 13 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false, + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1806, + "end": 1810, + "loc": { + "start": { + "line": 61, + "column": 22 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "name": "push" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 32 + } + }, + "name": "value" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1761, + "end": 1783, + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 41 + } + }, + "range": [ + 1761, + 1783 + ] + } + ] + }, + { + "type": "IfStatement", + "start": 1828, + "end": 1867, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "test": { + "type": "UnaryExpression", + "start": 1831, + "end": 1850, + "loc": { + "start": { + "line": 63, + "column": 11 + }, + "end": { + "line": 63, + "column": 30 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1832, + "end": 1850, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1832, + "end": 1843, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 23 + } + }, + "object": { + "type": "ThisExpression", + "start": 1832, + "end": 1836, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 1837, + "end": 1843, + "loc": { + "start": { + "line": 63, + "column": 17 + }, + "end": { + "line": 63, + "column": 23 + } + }, + "name": "filter" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1844, + "end": 1849, + "loc": { + "start": { + "line": 63, + "column": 24 + }, + "end": { + "line": 63, + "column": 29 + } + }, + "name": "value" + } + ] + } + }, + "consequent": { + "type": "ReturnStatement", + "start": 1858, + "end": 1867, + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "argument": { + "type": "Literal", + "start": 1865, + "end": 1866, + "loc": { + "start": { + "line": 63, + "column": 45 + }, + "end": { + "line": 63, + "column": 46 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 1876, + "end": 1934, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 66 + } + }, + "test": { + "type": "CallExpression", + "start": 1879, + "end": 1904, + "loc": { + "start": { + "line": 64, + "column": 11 + }, + "end": { + "line": 64, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 1879, + "end": 1889, + "loc": { + "start": { + "line": 64, + "column": 11 + }, + "end": { + "line": 64, + "column": 21 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1890, + "end": 1903, + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1890, + "end": 1894, + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 26 + } + } + }, + "property": { + "type": "Identifier", + "start": 1895, + "end": 1903, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 35 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 1906, + "end": 1934, + "loc": { + "start": { + "line": 64, + "column": 38 + }, + "end": { + "line": 64, + "column": 66 + } + }, + "argument": { + "type": "CallExpression", + "start": 1913, + "end": 1933, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1913, + "end": 1926, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 58 + } + }, + "object": { + "type": "ThisExpression", + "start": 1913, + "end": 1917, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 49 + } + } + }, + "property": { + "type": "Identifier", + "start": 1918, + "end": 1926, + "loc": { + "start": { + "line": 64, + "column": 50 + }, + "end": { + "line": 64, + "column": 58 + } + }, + "name": "expected" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1927, + "end": 1932, + "loc": { + "start": { + "line": 64, + "column": 59 + }, + "end": { + "line": 64, + "column": 64 + } + }, + "name": "value" + } + ] + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 1943, + "end": 2001, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 66 + } + }, + "test": { + "type": "CallExpression", + "start": 1946, + "end": 1968, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 1946, + "end": 1953, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 18 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1954, + "end": 1967, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "object": { + "type": "ThisExpression", + "start": 1954, + "end": 1958, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 23 + } + } + }, + "property": { + "type": "Identifier", + "start": 1959, + "end": 1967, + "loc": { + "start": { + "line": 65, + "column": 24 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 1973, + "end": 2001, + "loc": { + "start": { + "line": 65, + "column": 38 + }, + "end": { + "line": 65, + "column": 66 + } + }, + "argument": { + "type": "CallExpression", + "start": 1980, + "end": 2000, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1980, + "end": 1993, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 58 + } + }, + "object": { + "type": "ThisExpression", + "start": 1980, + "end": 1984, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 49 + } + } + }, + "property": { + "type": "Identifier", + "start": 1985, + "end": 1993, + "loc": { + "start": { + "line": 65, + "column": 50 + }, + "end": { + "line": 65, + "column": 58 + } + }, + "name": "includes" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1994, + "end": 1999, + "loc": { + "start": { + "line": 65, + "column": 59 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "name": "value" + } + ] + } + }, + "alternate": null + }, + { + "type": "ReturnStatement", + "start": 2011, + "end": 2075, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 72 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 2018, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "test": { + "type": "CallExpression", + "start": 2018, + "end": 2052, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2018, + "end": 2030, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 2018, + "end": 2022, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 19 + } + } + }, + "property": { + "type": "Identifier", + "start": 2023, + "end": 2030, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 27 + } + }, + "name": "matcher" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 2031, + "end": 2036, + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 33 + } + }, + "name": "value" + }, + { + "type": "MemberExpression", + "start": 2038, + "end": 2051, + "loc": { + "start": { + "line": 67, + "column": 35 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "object": { + "type": "ThisExpression", + "start": 2038, + "end": 2042, + "loc": { + "start": { + "line": 67, + "column": 35 + }, + "end": { + "line": 67, + "column": 39 + } + } + }, + "property": { + "type": "Identifier", + "start": 2043, + "end": 2051, + "loc": { + "start": { + "line": 67, + "column": 40 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "Literal", + "start": 2055, + "end": 2056, + "loc": { + "start": { + "line": 67, + "column": 52 + }, + "end": { + "line": 67, + "column": 53 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "MemberExpression", + "start": 2059, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 56 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "object": { + "type": "ThisExpression", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 56 + }, + "end": { + "line": 67, + "column": 60 + } + } + }, + "property": { + "type": "Identifier", + "start": 2064, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 61 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "name": "onMisMatch" + }, + "computed": false + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1614, + "end": 1741, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 59, + "column": 7 + } + }, + "range": [ + 1614, + 1741 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n ", + "start": 2087, + "end": 2196, + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 74, + "column": 7 + } + }, + "range": [ + 2087, + 2196 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 2201, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 2201, + "end": 2209, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 75, + "column": 12 + } + }, + "name": "getError", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 2209, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 12 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2212, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 15 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 2222, + "end": 2351, + "loc": { + "start": { + "line": 76, + "column": 8 + }, + "end": { + "line": 76, + "column": 137 + } + }, + "test": { + "type": "CallExpression", + "start": 2225, + "end": 2251, + "loc": { + "start": { + "line": 76, + "column": 11 + }, + "end": { + "line": 76, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 2225, + "end": 2235, + "loc": { + "start": { + "line": 76, + "column": 11 + }, + "end": { + "line": 76, + "column": 21 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2236, + "end": 2250, + "loc": { + "start": { + "line": 76, + "column": 22 + }, + "end": { + "line": 76, + "column": 36 + } + }, + "object": { + "type": "ThisExpression", + "start": 2236, + "end": 2240, + "loc": { + "start": { + "line": 76, + "column": 22 + }, + "end": { + "line": 76, + "column": 26 + } + } + }, + "property": { + "type": "Identifier", + "start": 2241, + "end": 2250, + "loc": { + "start": { + "line": 76, + "column": 27 + }, + "end": { + "line": 76, + "column": 36 + } + }, + "name": "expection" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 2253, + "end": 2351, + "loc": { + "start": { + "line": 76, + "column": 39 + }, + "end": { + "line": 76, + "column": 137 + } + }, + "argument": { + "type": "NewExpression", + "start": 2260, + "end": 2350, + "loc": { + "start": { + "line": 76, + "column": 46 + }, + "end": { + "line": 76, + "column": 136 + } + }, + "callee": { + "type": "Identifier", + "start": 2264, + "end": 2269, + "loc": { + "start": { + "line": 76, + "column": 50 + }, + "end": { + "line": 76, + "column": 55 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "TemplateLiteral", + "start": 2270, + "end": 2349, + "loc": { + "start": { + "line": 76, + "column": 56 + }, + "end": { + "line": 76, + "column": 135 + } + }, + "expressions": [ + { + "type": "CallExpression", + "start": 2286, + "end": 2315, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 101 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2286, + "end": 2300, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 86 + } + }, + "object": { + "type": "Identifier", + "start": 2286, + "end": 2290, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 76 + } + }, + "name": "JSON" + }, + "property": { + "type": "Identifier", + "start": 2291, + "end": 2300, + "loc": { + "start": { + "line": 76, + "column": 77 + }, + "end": { + "line": 76, + "column": 86 + } + }, + "name": "stringify" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2301, + "end": 2314, + "loc": { + "start": { + "line": 76, + "column": 87 + }, + "end": { + "line": 76, + "column": 100 + } + }, + "object": { + "type": "ThisExpression", + "start": 2301, + "end": 2305, + "loc": { + "start": { + "line": 76, + "column": 87 + }, + "end": { + "line": 76, + "column": 91 + } + } + }, + "property": { + "type": "Identifier", + "start": 2306, + "end": 2314, + "loc": { + "start": { + "line": 76, + "column": 92 + }, + "end": { + "line": 76, + "column": 100 + } + }, + "name": "messages" + }, + "computed": false + } + ] + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 2271, + "end": 2284, + "loc": { + "start": { + "line": 76, + "column": 57 + }, + "end": { + "line": 76, + "column": 70 + } + }, + "value": { + "raw": "the messages ", + "cooked": "the messages " + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 2316, + "end": 2348, + "loc": { + "start": { + "line": 76, + "column": 102 + }, + "end": { + "line": 76, + "column": 134 + } + }, + "value": { + "raw": " do not match your expectations.", + "cooked": " do not match your expectations." + }, + "tail": true + } + ] + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 2361, + "end": 2503, + "loc": { + "start": { + "line": 78, + "column": 8 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 2365, + "end": 2460, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 82, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2379, + "end": 2424, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 57 + } + }, + "expression": { + "type": "CallExpression", + "start": 2379, + "end": 2423, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 56 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2379, + "end": 2407, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2379, + "end": 2403, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 36 + } + }, + "object": { + "type": "CallExpression", + "start": 2379, + "end": 2400, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 2379, + "end": 2385, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2386, + "end": 2399, + "loc": { + "start": { + "line": 79, + "column": 19 + }, + "end": { + "line": 79, + "column": 32 + } + }, + "object": { + "type": "ThisExpression", + "start": 2386, + "end": 2390, + "loc": { + "start": { + "line": 79, + "column": 19 + }, + "end": { + "line": 79, + "column": 23 + } + } + }, + "property": { + "type": "Identifier", + "start": 2391, + "end": 2399, + "loc": { + "start": { + "line": 79, + "column": 24 + }, + "end": { + "line": 79, + "column": 32 + } + }, + "name": "messages" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2401, + "end": 2403, + "loc": { + "start": { + "line": 79, + "column": 34 + }, + "end": { + "line": 79, + "column": 36 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2404, + "end": 2407, + "loc": { + "start": { + "line": 79, + "column": 37 + }, + "end": { + "line": 79, + "column": 40 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2408, + "end": 2422, + "loc": { + "start": { + "line": 79, + "column": 41 + }, + "end": { + "line": 79, + "column": 55 + } + }, + "object": { + "type": "ThisExpression", + "start": 2408, + "end": 2412, + "loc": { + "start": { + "line": 79, + "column": 41 + }, + "end": { + "line": 79, + "column": 45 + } + } + }, + "property": { + "type": "Identifier", + "start": 2413, + "end": 2422, + "loc": { + "start": { + "line": 79, + "column": 46 + }, + "end": { + "line": 79, + "column": 55 + } + }, + "name": "expection" + }, + "computed": false + } + ] + } + }, + { + "type": "ReturnStatement", + "start": 2438, + "end": 2450, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 24 + } + }, + "argument": { + "type": "Literal", + "start": 2445, + "end": 2449, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 23 + } + }, + "value": null, + "rawValue": null, + "raw": "null" + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 2461, + "end": 2503, + "loc": { + "start": { + "line": 82, + "column": 10 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 2467, + "end": 2468, + "loc": { + "start": { + "line": 82, + "column": 16 + }, + "end": { + "line": 82, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 2470, + "end": 2503, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 2484, + "end": 2493, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 21 + } + }, + "argument": { + "type": "Identifier", + "start": 2491, + "end": 2492, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 20 + } + }, + "name": "e" + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n ", + "start": 2087, + "end": 2196, + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 74, + "column": 7 + } + }, + "range": [ + 2087, + 2196 + ] + } + ] + } + ] + }, + "leadingComments": [], + "trailingComments": [] + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/StreamHelper.js.json b/ExpectStreamBak/docs/ast/source/StreamHelper.js.json new file mode 100644 index 0000000..e7f9a51 --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/StreamHelper.js.json @@ -0,0 +1,8549 @@ +{ + "type": "Program", + "start": 0, + "end": 2113, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 72, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "isFunction" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 23, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "value": "lodash.isfunction", + "rawValue": "lodash.isfunction", + "raw": "\"lodash.isfunction\"" + } + }, + { + "type": "ImportDeclaration", + "start": 44, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "local": { + "type": "Identifier", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "name": "assert" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 63, + "end": 71, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "value": "assert", + "rawValue": "assert", + "raw": "\"assert\"" + } + }, + { + "type": "ImportDeclaration", + "start": 73, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 80, + "end": 92, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 80, + "end": 92, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "name": "AssertStream" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 98, + "end": 114, + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "value": "./AssertStream", + "rawValue": "./AssertStream", + "raw": "\"./AssertStream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 116, + "end": 157, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 123, + "end": 131, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 123, + "end": 131, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "name": "defaults" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 137, + "end": 156, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 40 + } + }, + "value": "set-default-value", + "rawValue": "set-default-value", + "raw": "\"set-default-value\"" + }, + "trailingComments": [ + { + "type": "Block", + "value": "*\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n ", + "start": 159, + "end": 501, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 16, + "column": 3 + } + }, + "range": [ + 159, + 501 + ] + } + ] + }, + { + "type": "Identifier", + "start": 502, + "end": 2082, + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 508, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "init": { + "type": "FunctionExpression", + "start": 523, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "ObjectPattern", + "start": 532, + "end": 545, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 43 + } + }, + "properties": [ + { + "type": "Property", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 547, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 781, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 780, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 553, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 553, + "end": 562, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 563, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 582, + "end": 591, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 42 + } + }, + "value": "exactly", + "rawValue": "exactly", + "raw": "\"exactly\"" + }, + { + "type": "FunctionExpression", + "start": 593, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 44 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 602, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 53 + }, + "end": { + "line": 18, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 612, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 63 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 622, + "end": 681, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 67 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 622, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 622, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 622, + "end": 626, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 644, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 644, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 644, + "end": 662, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 644, + "end": 652, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 38 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "Identifier", + "start": 653, + "end": 661, + "loc": { + "start": { + "line": 19, + "column": 39 + }, + "end": { + "line": 19, + "column": 47 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 663, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 49 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 666, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "object": { + "type": "ThisExpression", + "start": 666, + "end": 670, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 56 + } + } + }, + "property": { + "type": "Identifier", + "start": 671, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 57 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 690, + "end": 717, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 690, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 690, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 690, + "end": 694, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 695, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 712, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 725, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 736, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 746, + "end": 773, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 746, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 746, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 746, + "end": 750, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 751, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 768, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 787, + "end": 961, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 787, + "end": 960, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 787, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 787, + "end": 796, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 797, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 816, + "end": 825, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "value": "produce", + "rawValue": "produce", + "raw": "\"produce\"" + }, + { + "type": "FunctionExpression", + "start": 827, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 44 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 836, + "end": 844, + "loc": { + "start": { + "line": 25, + "column": 53 + }, + "end": { + "line": 25, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 846, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 63 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 856, + "end": 881, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 856, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 856, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 856, + "end": 860, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 861, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 872, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 890, + "end": 909, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 27 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 890, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 890, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 890, + "end": 894, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 895, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 906, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "elements": [] + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 917, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 928, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 938, + "end": 953, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 23 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 938, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 938, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 938, + "end": 942, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 950, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 20 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "elements": [] + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 967, + "end": 1060, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 967, + "end": 1059, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 967, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "object": { + "type": "Identifier", + "start": 967, + "end": 976, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 977, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 14 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "name": "addProperty" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 989, + "end": 1001, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 38 + } + }, + "value": "eventually", + "rawValue": "eventually", + "raw": "\"eventually\"" + }, + { + "type": "FunctionExpression", + "start": 1003, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 40 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1014, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 51 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1024, + "end": 1052, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 36 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1024, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1024, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "object": { + "type": "ThisExpression", + "start": 1024, + "end": 1028, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 1047, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 31 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1066, + "end": 1158, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1066, + "end": 1157, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1066, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1066, + "end": 1075, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1076, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1086, + "end": 1094, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 32 + } + }, + "value": "filter", + "rawValue": "filter", + "raw": "\"filter\"" + }, + { + "type": "FunctionExpression", + "start": 1096, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 34 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1105, + "end": 1111, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 49 + } + }, + "name": "filter" + } + ], + "body": { + "type": "BlockStatement", + "start": 1113, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 51 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1123, + "end": 1150, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1123, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1123, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 1123, + "end": 1127, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1128, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 13 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1143, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "name": "filter" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1164, + "end": 1654, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1164, + "end": 1653, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1164, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1164, + "end": 1173, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1174, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1184, + "end": 1192, + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "value": "notify", + "rawValue": "notify", + "raw": "\"notify\"" + }, + { + "type": "FunctionExpression", + "start": 1194, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 34 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1203, + "end": 1207, + "loc": { + "start": { + "line": 40, + "column": 43 + }, + "end": { + "line": 40, + "column": 47 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1209, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 49 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1219, + "end": 1447, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 46, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1225, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1225, + "end": 1229, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 18 + } + }, + "name": "sink" + }, + "init": { + "type": "NewExpression", + "start": 1232, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 1236, + "end": 1248, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 37 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1249, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "ThisExpression", + "start": 1249, + "end": 1253, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 42 + } + } + }, + "property": { + "type": "Identifier", + "start": 1254, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "expected" + }, + "computed": false + }, + { + "type": "ObjectExpression", + "start": 1264, + "end": 1445, + "loc": { + "start": { + "line": 41, + "column": 53 + }, + "end": { + "line": 46, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1278, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1278, + "end": 1284, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "MemberExpression", + "start": 1290, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "object": { + "type": "ThisExpression", + "start": 1290, + "end": 1294, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1321, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1321, + "end": 1327, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "MemberExpression", + "start": 1333, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1333, + "end": 1337, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1338, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 29 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "name": "tapper" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1358, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1358, + "end": 1368, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "MemberExpression", + "start": 1370, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "object": { + "type": "ThisExpression", + "start": 1370, + "end": 1374, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1375, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1404, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1404, + "end": 1410, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 18 + } + }, + "name": "strict" + }, + "value": { + "type": "MemberExpression", + "start": 1416, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "object": { + "type": "ThisExpression", + "start": 1416, + "end": 1420, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1421, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1457, + "end": 1566, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 31 + } + }, + "expression": { + "type": "CallExpression", + "start": 1457, + "end": 1565, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1550, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1534, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1520, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1477, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 28 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 1457, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1457, + "end": 1461, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1462, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1467, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "name": "pipe" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1472, + "end": 1476, + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 27 + } + }, + "name": "sink" + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1518, + "end": 1520, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "name": "on", + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1521, + "end": 1527, + "loc": { + "start": { + "line": 49, + "column": 16 + }, + "end": { + "line": 49, + "column": 22 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1529, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 28 + } + }, + "name": "done" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 50, + "column": 13 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 50, + "column": 16 + }, + "end": { + "line": 50, + "column": 23 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "Identifier", + "start": 1560, + "end": 1564, + "loc": { + "start": { + "line": 50, + "column": 25 + }, + "end": { + "line": 50, + "column": 29 + } + }, + "name": "done" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1576, + "end": 1623, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 1576, + "end": 1622, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1576, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "object": { + "type": "MemberExpression", + "start": 1576, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1576, + "end": 1580, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1581, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 13 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1586, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 18 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "name": "forEach" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1594, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1594, + "end": 1597, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 29 + } + }, + "name": "arg" + } + ], + "body": { + "type": "CallExpression", + "start": 1601, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1601, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1601, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "object": { + "type": "ThisExpression", + "start": 1601, + "end": 1605, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 37 + } + } + }, + "property": { + "type": "Identifier", + "start": 1606, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 38 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1611, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 43 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1617, + "end": 1620, + "loc": { + "start": { + "line": 52, + "column": 49 + }, + "end": { + "line": 52, + "column": 52 + } + }, + "name": "arg" + } + ] + } + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1660, + "end": 1743, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1660, + "end": 1742, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1660, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1660, + "end": 1669, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "name": "Assertion", + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1680, + "end": 1685, + "loc": { + "start": { + "line": 55, + "column": 24 + }, + "end": { + "line": 55, + "column": 29 + } + }, + "value": "tap", + "rawValue": "tap", + "raw": "\"tap\"" + }, + { + "type": "FunctionExpression", + "start": 1687, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 31 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1696, + "end": 1702, + "loc": { + "start": { + "line": 55, + "column": 40 + }, + "end": { + "line": 55, + "column": 46 + } + }, + "name": "tapper" + } + ], + "body": { + "type": "BlockStatement", + "start": 1704, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 48 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1714, + "end": 1735, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1714, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1714, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1714, + "end": 1718, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1719, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1728, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "name": "tapper" + } + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1749, + "end": 2079, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1749, + "end": 2078, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1749, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1749, + "end": 1758, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1759, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1769, + "end": 1773, + "loc": { + "start": { + "line": 59, + "column": 24 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "value": "on", + "rawValue": "on", + "raw": "\"on\"" + }, + { + "type": "FunctionExpression", + "start": 1775, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 30 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 1784, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 39 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "argument": { + "type": "Identifier", + "start": 1787, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 42 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 1793, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 48 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1803, + "end": 1831, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 60, + "column": 36 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1809, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "id": { + "type": "ObjectPattern", + "start": 1809, + "end": 1818, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 23 + } + }, + "properties": [ + { + "type": "Property", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + } + } + ] + }, + "init": { + "type": "MemberExpression", + "start": 1821, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1821, + "end": 1825, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "property": { + "type": "Identifier", + "start": 1826, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 31 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "name": "_obj" + }, + "computed": false + } + } + ], + "kind": "const", + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1864, + "end": 2044, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "expression": { + "type": "CallExpression", + "start": 1864, + "end": 2043, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1864, + "end": 1870, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 62, + "column": 14 + } + }, + "name": "assert", + "leadingComments": null + }, + "arguments": [ + { + "type": "LogicalExpression", + "start": 1884, + "end": 1988, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 65, + "column": 9 + } + }, + "left": { + "type": "LogicalExpression", + "start": 1885, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1885, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "left": { + "type": "MemberExpression", + "start": 1885, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1885, + "end": 1889, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1890, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 18 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": ">", + "right": { + "type": "Literal", + "start": 1899, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 27 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "start": 1904, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1904, + "end": 1914, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 42 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1915, + "end": 1920, + "loc": { + "start": { + "line": 63, + "column": 43 + }, + "end": { + "line": 63, + "column": 48 + } + }, + "name": "write" + } + ] + }, + "parenthesizedExpression": true + }, + "operator": "||", + "right": { + "type": "LogicalExpression", + "start": 1939, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1939, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "left": { + "type": "MemberExpression", + "start": 1939, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1939, + "end": 1943, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1944, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1955, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 29 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "UnaryExpression", + "start": 1960, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1961, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 1961, + "end": 1971, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 45 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1972, + "end": 1977, + "loc": { + "start": { + "line": 64, + "column": 46 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "name": "write" + } + ] + } + }, + "parenthesizedExpression": true + } + }, + { + "type": "Literal", + "start": 1990, + "end": 2042, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 63 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2054, + "end": 2071, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2054, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2054, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 2054, + "end": 2058, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 13 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 2066, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "name": "args" + } + } + } + ] + } + } + ] + } + } + ] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 2084, + "end": 2112, + "loc": { + "start": { + "line": 71, + "column": 0 + }, + "end": { + "line": 71, + "column": 28 + } + }, + "declaration": { + "type": "Identifier", + "start": 2099, + "end": 2111, + "loc": { + "start": { + "line": 71, + "column": 15 + }, + "end": { + "line": 71, + "column": 27 + } + }, + "name": "StreamHelper" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 2084, + "end": 2112, + "loc": { + "start": { + "line": 71, + "column": 0 + }, + "end": { + "line": 71, + "column": 28 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 502, + "end": 2082, + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 508, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "init": { + "type": "FunctionExpression", + "start": 523, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "ObjectPattern", + "start": 532, + "end": 545, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 43 + } + }, + "properties": [ + { + "type": "Property", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 547, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 781, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 780, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 553, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 553, + "end": 562, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 563, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 582, + "end": 591, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 42 + } + }, + "value": "exactly", + "rawValue": "exactly", + "raw": "\"exactly\"" + }, + { + "type": "FunctionExpression", + "start": 593, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 44 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 602, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 53 + }, + "end": { + "line": 18, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 612, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 63 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 622, + "end": 681, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 67 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 622, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 622, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 622, + "end": 626, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 644, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 644, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 644, + "end": 662, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 644, + "end": 652, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 38 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "Identifier", + "start": 653, + "end": 661, + "loc": { + "start": { + "line": 19, + "column": 39 + }, + "end": { + "line": 19, + "column": 47 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 663, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 49 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 666, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "object": { + "type": "ThisExpression", + "start": 666, + "end": 670, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 56 + } + } + }, + "property": { + "type": "Identifier", + "start": 671, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 57 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 690, + "end": 717, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 690, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 690, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 690, + "end": 694, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 695, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 712, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 725, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 736, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 746, + "end": 773, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 746, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 746, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 746, + "end": 750, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 751, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 768, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 787, + "end": 961, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 787, + "end": 960, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 787, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 787, + "end": 796, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 797, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 816, + "end": 825, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "value": "produce", + "rawValue": "produce", + "raw": "\"produce\"" + }, + { + "type": "FunctionExpression", + "start": 827, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 44 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 836, + "end": 844, + "loc": { + "start": { + "line": 25, + "column": 53 + }, + "end": { + "line": 25, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 846, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 63 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 856, + "end": 881, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 856, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 856, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 856, + "end": 860, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 861, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 872, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 890, + "end": 909, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 27 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 890, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 890, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 890, + "end": 894, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 895, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 906, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "elements": [] + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 917, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 928, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 938, + "end": 953, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 23 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 938, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 938, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 938, + "end": 942, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 950, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 20 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "elements": [] + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 967, + "end": 1060, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 967, + "end": 1059, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 967, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "object": { + "type": "Identifier", + "start": 967, + "end": 976, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 977, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 14 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "name": "addProperty" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 989, + "end": 1001, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 38 + } + }, + "value": "eventually", + "rawValue": "eventually", + "raw": "\"eventually\"" + }, + { + "type": "FunctionExpression", + "start": 1003, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 40 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1014, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 51 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1024, + "end": 1052, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 36 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1024, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1024, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "object": { + "type": "ThisExpression", + "start": 1024, + "end": 1028, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 1047, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 31 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1066, + "end": 1158, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1066, + "end": 1157, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1066, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1066, + "end": 1075, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1076, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1086, + "end": 1094, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 32 + } + }, + "value": "filter", + "rawValue": "filter", + "raw": "\"filter\"" + }, + { + "type": "FunctionExpression", + "start": 1096, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 34 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1105, + "end": 1111, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 49 + } + }, + "name": "filter" + } + ], + "body": { + "type": "BlockStatement", + "start": 1113, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 51 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1123, + "end": 1150, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1123, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1123, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 1123, + "end": 1127, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1128, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 13 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1143, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "name": "filter" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1164, + "end": 1654, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1164, + "end": 1653, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1164, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1164, + "end": 1173, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1174, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1184, + "end": 1192, + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "value": "notify", + "rawValue": "notify", + "raw": "\"notify\"" + }, + { + "type": "FunctionExpression", + "start": 1194, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 34 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1203, + "end": 1207, + "loc": { + "start": { + "line": 40, + "column": 43 + }, + "end": { + "line": 40, + "column": 47 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1209, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 49 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1219, + "end": 1447, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 46, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1225, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1225, + "end": 1229, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 18 + } + }, + "name": "sink" + }, + "init": { + "type": "NewExpression", + "start": 1232, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 1236, + "end": 1248, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 37 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1249, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "ThisExpression", + "start": 1249, + "end": 1253, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 42 + } + } + }, + "property": { + "type": "Identifier", + "start": 1254, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "expected" + }, + "computed": false + }, + { + "type": "ObjectExpression", + "start": 1264, + "end": 1445, + "loc": { + "start": { + "line": 41, + "column": 53 + }, + "end": { + "line": 46, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1278, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1278, + "end": 1284, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "MemberExpression", + "start": 1290, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "object": { + "type": "ThisExpression", + "start": 1290, + "end": 1294, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1321, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1321, + "end": 1327, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "MemberExpression", + "start": 1333, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1333, + "end": 1337, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1338, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 29 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "name": "tapper" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1358, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1358, + "end": 1368, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "MemberExpression", + "start": 1370, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "object": { + "type": "ThisExpression", + "start": 1370, + "end": 1374, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1375, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1404, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1404, + "end": 1410, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 18 + } + }, + "name": "strict" + }, + "value": { + "type": "MemberExpression", + "start": 1416, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "object": { + "type": "ThisExpression", + "start": 1416, + "end": 1420, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1421, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1457, + "end": 1566, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 31 + } + }, + "expression": { + "type": "CallExpression", + "start": 1457, + "end": 1565, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1550, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1534, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1520, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1477, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 28 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 1457, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1457, + "end": 1461, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1462, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1467, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "name": "pipe" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1472, + "end": 1476, + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 27 + } + }, + "name": "sink" + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1518, + "end": 1520, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "name": "on", + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1521, + "end": 1527, + "loc": { + "start": { + "line": 49, + "column": 16 + }, + "end": { + "line": 49, + "column": 22 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1529, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 28 + } + }, + "name": "done" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 50, + "column": 13 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 50, + "column": 16 + }, + "end": { + "line": 50, + "column": 23 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "Identifier", + "start": 1560, + "end": 1564, + "loc": { + "start": { + "line": 50, + "column": 25 + }, + "end": { + "line": 50, + "column": 29 + } + }, + "name": "done" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1576, + "end": 1623, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 1576, + "end": 1622, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1576, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "object": { + "type": "MemberExpression", + "start": 1576, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1576, + "end": 1580, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1581, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 13 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1586, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 18 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "name": "forEach" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1594, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1594, + "end": 1597, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 29 + } + }, + "name": "arg" + } + ], + "body": { + "type": "CallExpression", + "start": 1601, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1601, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1601, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "object": { + "type": "ThisExpression", + "start": 1601, + "end": 1605, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 37 + } + } + }, + "property": { + "type": "Identifier", + "start": 1606, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 38 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1611, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 43 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1617, + "end": 1620, + "loc": { + "start": { + "line": 52, + "column": 49 + }, + "end": { + "line": 52, + "column": 52 + } + }, + "name": "arg" + } + ] + } + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1660, + "end": 1743, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1660, + "end": 1742, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1660, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1660, + "end": 1669, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "name": "Assertion", + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1680, + "end": 1685, + "loc": { + "start": { + "line": 55, + "column": 24 + }, + "end": { + "line": 55, + "column": 29 + } + }, + "value": "tap", + "rawValue": "tap", + "raw": "\"tap\"" + }, + { + "type": "FunctionExpression", + "start": 1687, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 31 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1696, + "end": 1702, + "loc": { + "start": { + "line": 55, + "column": 40 + }, + "end": { + "line": 55, + "column": 46 + } + }, + "name": "tapper" + } + ], + "body": { + "type": "BlockStatement", + "start": 1704, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 48 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1714, + "end": 1735, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1714, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1714, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1714, + "end": 1718, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1719, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1728, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "name": "tapper" + } + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1749, + "end": 2079, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1749, + "end": 2078, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1749, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1749, + "end": 1758, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1759, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1769, + "end": 1773, + "loc": { + "start": { + "line": 59, + "column": 24 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "value": "on", + "rawValue": "on", + "raw": "\"on\"" + }, + { + "type": "FunctionExpression", + "start": 1775, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 30 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 1784, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 39 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "argument": { + "type": "Identifier", + "start": 1787, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 42 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 1793, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 48 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1803, + "end": 1831, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 60, + "column": 36 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1809, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "id": { + "type": "ObjectPattern", + "start": 1809, + "end": 1818, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 23 + } + }, + "properties": [ + { + "type": "Property", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + } + } + ] + }, + "init": { + "type": "MemberExpression", + "start": 1821, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1821, + "end": 1825, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "property": { + "type": "Identifier", + "start": 1826, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 31 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "name": "_obj" + }, + "computed": false + } + } + ], + "kind": "const", + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1864, + "end": 2044, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "expression": { + "type": "CallExpression", + "start": 1864, + "end": 2043, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1864, + "end": 1870, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 62, + "column": 14 + } + }, + "name": "assert", + "leadingComments": null + }, + "arguments": [ + { + "type": "LogicalExpression", + "start": 1884, + "end": 1988, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 65, + "column": 9 + } + }, + "left": { + "type": "LogicalExpression", + "start": 1885, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1885, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "left": { + "type": "MemberExpression", + "start": 1885, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1885, + "end": 1889, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1890, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 18 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": ">", + "right": { + "type": "Literal", + "start": 1899, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 27 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "start": 1904, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1904, + "end": 1914, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 42 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1915, + "end": 1920, + "loc": { + "start": { + "line": 63, + "column": 43 + }, + "end": { + "line": 63, + "column": 48 + } + }, + "name": "write" + } + ] + }, + "parenthesizedExpression": true + }, + "operator": "||", + "right": { + "type": "LogicalExpression", + "start": 1939, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1939, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "left": { + "type": "MemberExpression", + "start": 1939, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1939, + "end": 1943, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1944, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1955, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 29 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "UnaryExpression", + "start": 1960, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1961, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 1961, + "end": 1971, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 45 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1972, + "end": 1977, + "loc": { + "start": { + "line": 64, + "column": 46 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "name": "write" + } + ] + } + }, + "parenthesizedExpression": true + } + }, + { + "type": "Literal", + "start": 1990, + "end": 2042, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 63 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2054, + "end": 2071, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2054, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2054, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 2054, + "end": 2058, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 13 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 2066, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "name": "args" + } + } + } + ] + } + } + ] + } + } + ] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n ", + "start": 159, + "end": 501, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 16, + "column": 3 + } + }, + "range": [ + 159, + 501 + ] + } + ], + "trailingComments": [] + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/__tests__/AssertStreamTest.js.json b/ExpectStreamBak/docs/ast/source/__tests__/AssertStreamTest.js.json new file mode 100644 index 0000000..cf35fbc --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/__tests__/AssertStreamTest.js.json @@ -0,0 +1,10938 @@ +{ + "type": "Program", + "start": 0, + "end": 4025, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 115, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "AssertStream" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "value": "../AssertStream", + "rawValue": "../AssertStream", + "raw": "\"../AssertStream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 44, + "end": 70, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 51, + "end": 56, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 51, + "end": 56, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "name": "sinon" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 62, + "end": 69, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "value": "sinon", + "rawValue": "sinon", + "raw": "\"sinon\"" + } + }, + { + "type": "ImportDeclaration", + "start": 71, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 94, + "end": 100, + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExpressionStatement", + "start": 103, + "end": 4024, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 114, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 103, + "end": 4023, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 114, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 103, + "end": 111, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 112, + "end": 130, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "value": "AssertStreamTest", + "rawValue": "AssertStreamTest", + "raw": "\"AssertStreamTest\"" + }, + { + "type": "FunctionExpression", + "start": 132, + "end": 4022, + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 114, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 143, + "end": 4022, + "loc": { + "start": { + "line": 5, + "column": 40 + }, + "end": { + "line": 114, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 149, + "end": 1277, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 37, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 149, + "end": 1276, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 37, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 149, + "end": 151, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 152, + "end": 245, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 100 + } + }, + "value": "writes to an assert stream with a value expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a value expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a value expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 247, + "end": 1275, + "loc": { + "start": { + "line": 6, + "column": 102 + }, + "end": { + "line": 37, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 256, + "end": 260, + "loc": { + "start": { + "line": 6, + "column": 111 + }, + "end": { + "line": 6, + "column": 115 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 262, + "end": 1275, + "loc": { + "start": { + "line": 6, + "column": 117 + }, + "end": { + "line": 37, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 272, + "end": 299, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 278, + "end": 298, + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 278, + "end": 284, + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 287, + "end": 298, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 287, + "end": 296, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 287, + "end": 292, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 293, + "end": 296, + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 308, + "end": 335, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 314, + "end": 334, + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 314, + "end": 319, + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "CallExpression", + "start": 323, + "end": 334, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 323, + "end": 332, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 323, + "end": 328, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 329, + "end": 332, + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 344, + "end": 488, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 14, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 350, + "end": 487, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 14, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 350, + "end": 356, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 359, + "end": 487, + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 14, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 363, + "end": 375, + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 376, + "end": 412, + "loc": { + "start": { + "line": 9, + "column": 40 + }, + "end": { + "line": 11, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 390, + "end": 402, + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 390, + "end": 394, + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 396, + "end": 402, + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + }, + { + "type": "ObjectExpression", + "start": 414, + "end": 486, + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 14, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 428, + "end": 446, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 30 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 428, + "end": 434, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 440, + "end": 446, + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 30 + } + }, + "name": "tapSpy" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 460, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 460, + "end": 470, + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 472, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 498, + "end": 523, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 498, + "end": 522, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 498, + "end": 507, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 498, + "end": 504, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 505, + "end": 507, + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 508, + "end": 514, + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 516, + "end": 521, + "loc": { + "start": { + "line": 16, + "column": 26 + }, + "end": { + "line": 16, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 533, + "end": 553, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 533, + "end": 552, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 533, + "end": 545, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 533, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 540, + "end": 545, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 546, + "end": 551, + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 562, + "end": 579, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 562, + "end": 578, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 562, + "end": 574, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 562, + "end": 568, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 569, + "end": 574, + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 575, + "end": 577, + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 23 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 588, + "end": 639, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 22, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 588, + "end": 638, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 22, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 588, + "end": 600, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 588, + "end": 594, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 595, + "end": 600, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 601, + "end": 637, + "loc": { + "start": { + "line": 20, + "column": 21 + }, + "end": { + "line": 22, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 615, + "end": 627, + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 615, + "end": 619, + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 621, + "end": 627, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 21, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 649, + "end": 1269, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 36, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 649, + "end": 1268, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 36, + "column": 14 + } + }, + "callee": { + "type": "Identifier", + "start": 649, + "end": 659, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "FunctionExpression", + "start": 660, + "end": 1263, + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 36, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 671, + "end": 1263, + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 36, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 685, + "end": 721, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "expression": { + "type": "CallExpression", + "start": 685, + "end": 720, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 47 + } + }, + "callee": { + "type": "MemberExpression", + "start": 685, + "end": 717, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 685, + "end": 711, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "object": { + "type": "CallExpression", + "start": 685, + "end": 708, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 685, + "end": 691, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 692, + "end": 707, + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 692, + "end": 697, + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 24 + } + }, + "name": "onEnd" + }, + "property": { + "type": "Identifier", + "start": 698, + "end": 707, + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 34 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 709, + "end": 711, + "loc": { + "start": { + "line": 25, + "column": 36 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 712, + "end": 717, + "loc": { + "start": { + "line": 25, + "column": 39 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 718, + "end": 719, + "loc": { + "start": { + "line": 25, + "column": 45 + }, + "end": { + "line": 25, + "column": 46 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 734, + "end": 788, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 66 + } + }, + "expression": { + "type": "CallExpression", + "start": 734, + "end": 787, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 734, + "end": 780, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 734, + "end": 774, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 734, + "end": 771, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 734, + "end": 740, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 741, + "end": 770, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 741, + "end": 768, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 741, + "end": 762, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 741, + "end": 757, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 741, + "end": 747, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 748, + "end": 757, + "loc": { + "start": { + "line": 26, + "column": 26 + }, + "end": { + "line": 26, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 758, + "end": 762, + "loc": { + "start": { + "line": 26, + "column": 36 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 763, + "end": 768, + "loc": { + "start": { + "line": 26, + "column": 41 + }, + "end": { + "line": 26, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 772, + "end": 774, + "loc": { + "start": { + "line": 26, + "column": 50 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 775, + "end": 780, + "loc": { + "start": { + "line": 26, + "column": 53 + }, + "end": { + "line": 26, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 781, + "end": 786, + "loc": { + "start": { + "line": 26, + "column": 59 + }, + "end": { + "line": 26, + "column": 64 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 801, + "end": 851, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 801, + "end": 850, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 801, + "end": 847, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 801, + "end": 841, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 801, + "end": 838, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 801, + "end": 807, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 808, + "end": 837, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 808, + "end": 835, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 808, + "end": 829, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 808, + "end": 824, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 808, + "end": 814, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 815, + "end": 824, + "loc": { + "start": { + "line": 27, + "column": 26 + }, + "end": { + "line": 27, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 825, + "end": 829, + "loc": { + "start": { + "line": 27, + "column": 36 + }, + "end": { + "line": 27, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 830, + "end": 835, + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 839, + "end": 841, + "loc": { + "start": { + "line": 27, + "column": 50 + }, + "end": { + "line": 27, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 842, + "end": 847, + "loc": { + "start": { + "line": 27, + "column": 53 + }, + "end": { + "line": 27, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 848, + "end": 849, + "loc": { + "start": { + "line": 27, + "column": 59 + }, + "end": { + "line": 27, + "column": 60 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 864, + "end": 914, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 864, + "end": 913, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 864, + "end": 909, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 57 + } + }, + "object": { + "type": "MemberExpression", + "start": 864, + "end": 905, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 53 + } + }, + "object": { + "type": "CallExpression", + "start": 864, + "end": 902, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 50 + } + }, + "callee": { + "type": "Identifier", + "start": 864, + "end": 870, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 871, + "end": 901, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 871, + "end": 899, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 871, + "end": 893, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 41 + } + }, + "object": { + "type": "MemberExpression", + "start": 871, + "end": 888, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 871, + "end": 877, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 878, + "end": 888, + "loc": { + "start": { + "line": 28, + "column": 26 + }, + "end": { + "line": 28, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 889, + "end": 893, + "loc": { + "start": { + "line": 28, + "column": 37 + }, + "end": { + "line": 28, + "column": 41 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 894, + "end": 899, + "loc": { + "start": { + "line": 28, + "column": 42 + }, + "end": { + "line": 28, + "column": 47 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 903, + "end": 905, + "loc": { + "start": { + "line": 28, + "column": 51 + }, + "end": { + "line": 28, + "column": 53 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 906, + "end": 909, + "loc": { + "start": { + "line": 28, + "column": 54 + }, + "end": { + "line": 28, + "column": 57 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 910, + "end": 912, + "loc": { + "start": { + "line": 28, + "column": 58 + }, + "end": { + "line": 28, + "column": 60 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 927, + "end": 978, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 63 + } + }, + "expression": { + "type": "CallExpression", + "start": 927, + "end": 977, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 927, + "end": 974, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 59 + } + }, + "object": { + "type": "MemberExpression", + "start": 927, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 53 + } + }, + "object": { + "type": "CallExpression", + "start": 927, + "end": 965, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 50 + } + }, + "callee": { + "type": "Identifier", + "start": 927, + "end": 933, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 934, + "end": 964, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 934, + "end": 962, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 934, + "end": 956, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 41 + } + }, + "object": { + "type": "MemberExpression", + "start": 934, + "end": 951, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 934, + "end": 940, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 941, + "end": 951, + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 952, + "end": 956, + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 957, + "end": 962, + "loc": { + "start": { + "line": 29, + "column": 42 + }, + "end": { + "line": 29, + "column": 47 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 966, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 53 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 969, + "end": 974, + "loc": { + "start": { + "line": 29, + "column": 54 + }, + "end": { + "line": 29, + "column": 59 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 975, + "end": 976, + "loc": { + "start": { + "line": 29, + "column": 60 + }, + "end": { + "line": 29, + "column": 61 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 991, + "end": 1082, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 32, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 991, + "end": 1081, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 32, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 991, + "end": 1035, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 991, + "end": 1031, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 991, + "end": 1028, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 991, + "end": 997, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 998, + "end": 1027, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 998, + "end": 1025, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 998, + "end": 1019, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 998, + "end": 1014, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 998, + "end": 1004, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 1005, + "end": 1014, + "loc": { + "start": { + "line": 30, + "column": 26 + }, + "end": { + "line": 30, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1015, + "end": 1019, + "loc": { + "start": { + "line": 30, + "column": 36 + }, + "end": { + "line": 30, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1020, + "end": 1025, + "loc": { + "start": { + "line": 30, + "column": 41 + }, + "end": { + "line": 30, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1031, + "loc": { + "start": { + "line": 30, + "column": 50 + }, + "end": { + "line": 30, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1032, + "end": 1035, + "loc": { + "start": { + "line": 30, + "column": 53 + }, + "end": { + "line": 30, + "column": 56 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1036, + "end": 1080, + "loc": { + "start": { + "line": 30, + "column": 57 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 1054, + "end": 1066, + "loc": { + "start": { + "line": 31, + "column": 16 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1054, + "end": 1058, + "loc": { + "start": { + "line": 31, + "column": 16 + }, + "end": { + "line": 31, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1060, + "end": 1066, + "loc": { + "start": { + "line": 31, + "column": 22 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1095, + "end": 1145, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 1095, + "end": 1144, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1095, + "end": 1141, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 1095, + "end": 1135, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 1095, + "end": 1132, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1095, + "end": 1101, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1102, + "end": 1131, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1102, + "end": 1129, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1102, + "end": 1123, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 1102, + "end": 1118, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 1102, + "end": 1108, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 1109, + "end": 1118, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1119, + "end": 1123, + "loc": { + "start": { + "line": 33, + "column": 36 + }, + "end": { + "line": 33, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1124, + "end": 1129, + "loc": { + "start": { + "line": 33, + "column": 41 + }, + "end": { + "line": 33, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1133, + "end": 1135, + "loc": { + "start": { + "line": 33, + "column": 50 + }, + "end": { + "line": 33, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1136, + "end": 1141, + "loc": { + "start": { + "line": 33, + "column": 53 + }, + "end": { + "line": 33, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1142, + "end": 1143, + "loc": { + "start": { + "line": 33, + "column": 59 + }, + "end": { + "line": 33, + "column": 60 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1158, + "end": 1210, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 1158, + "end": 1209, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1158, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 1158, + "end": 1196, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 1158, + "end": 1193, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1158, + "end": 1164, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1165, + "end": 1192, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1165, + "end": 1186, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 1165, + "end": 1171, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1172, + "end": 1186, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1187, + "end": 1192, + "loc": { + "start": { + "line": 34, + "column": 41 + }, + "end": { + "line": 34, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1194, + "end": 1196, + "loc": { + "start": { + "line": 34, + "column": 48 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1197, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 51 + }, + "end": { + "line": 34, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1203, + "end": 1208, + "loc": { + "start": { + "line": 34, + "column": 57 + }, + "end": { + "line": 34, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1211, + "end": 1233, + "loc": { + "start": { + "line": 34, + "column": 65 + }, + "end": { + "line": 34, + "column": 87 + } + }, + "range": [ + 1211, + 1233 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1246, + "end": 1253, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 1246, + "end": 1252, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 1246, + "end": 1250, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1211, + "end": 1233, + "loc": { + "start": { + "line": 34, + "column": 65 + }, + "end": { + "line": 34, + "column": 87 + } + }, + "range": [ + 1211, + 1233 + ] + } + ] + } + ] + } + }, + { + "type": "Literal", + "start": 1265, + "end": 1267, + "loc": { + "start": { + "line": 36, + "column": 11 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1283, + "end": 1878, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 56, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1283, + "end": 1877, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 56, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1283, + "end": 1285, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1286, + "end": 1382, + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 103 + } + }, + "value": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a function expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 1384, + "end": 1876, + "loc": { + "start": { + "line": 39, + "column": 105 + }, + "end": { + "line": 56, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1393, + "end": 1397, + "loc": { + "start": { + "line": 39, + "column": 114 + }, + "end": { + "line": 39, + "column": 118 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1399, + "end": 1876, + "loc": { + "start": { + "line": 39, + "column": 120 + }, + "end": { + "line": 56, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1409, + "end": 1436, + "loc": { + "start": { + "line": 40, + "column": 8 + }, + "end": { + "line": 40, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1415, + "end": 1435, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 1415, + "end": 1420, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "CallExpression", + "start": 1424, + "end": 1435, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1424, + "end": 1433, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 1424, + "end": 1429, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 1430, + "end": 1433, + "loc": { + "start": { + "line": 40, + "column": 29 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1445, + "end": 1513, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 76 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1451, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 75 + } + }, + "id": { + "type": "Identifier", + "start": 1451, + "end": 1457, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 1460, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 75 + } + }, + "callee": { + "type": "Identifier", + "start": 1464, + "end": 1476, + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 41, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1477, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 40 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1477, + "end": 1478, + "loc": { + "start": { + "line": 41, + "column": 40 + }, + "end": { + "line": 41, + "column": 41 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 1482, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1482, + "end": 1499, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 62 + } + }, + "left": { + "type": "MemberExpression", + "start": 1482, + "end": 1488, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "Identifier", + "start": 1482, + "end": 1483, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 46 + } + }, + "name": "x" + }, + "property": { + "type": "Identifier", + "start": 1484, + "end": 1488, + "loc": { + "start": { + "line": 41, + "column": 47 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "test" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1493, + "end": 1499, + "loc": { + "start": { + "line": 41, + "column": 56 + }, + "end": { + "line": 41, + "column": 62 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + }, + "consequent": { + "type": "Literal", + "start": 1502, + "end": 1503, + "loc": { + "start": { + "line": 41, + "column": 65 + }, + "end": { + "line": 41, + "column": 66 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 1506, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 69 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + }, + { + "type": "ObjectExpression", + "start": 1509, + "end": 1511, + "loc": { + "start": { + "line": 41, + "column": 72 + }, + "end": { + "line": 41, + "column": 74 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1523, + "end": 1548, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 1523, + "end": 1547, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1523, + "end": 1532, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 1523, + "end": 1529, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1530, + "end": 1532, + "loc": { + "start": { + "line": 43, + "column": 15 + }, + "end": { + "line": 43, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1533, + "end": 1539, + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1541, + "end": 1546, + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 43, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1558, + "end": 1578, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 1558, + "end": 1577, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1558, + "end": 1570, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1558, + "end": 1564, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1565, + "end": 1570, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1571, + "end": 1576, + "loc": { + "start": { + "line": 45, + "column": 21 + }, + "end": { + "line": 45, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1587, + "end": 1604, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 1587, + "end": 1603, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1587, + "end": 1599, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1587, + "end": 1593, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1594, + "end": 1599, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1600, + "end": 1602, + "loc": { + "start": { + "line": 46, + "column": 21 + }, + "end": { + "line": 46, + "column": 23 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1613, + "end": 1664, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 49, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 1613, + "end": 1663, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 49, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1613, + "end": 1625, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1613, + "end": 1619, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1620, + "end": 1625, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1626, + "end": 1662, + "loc": { + "start": { + "line": 47, + "column": 21 + }, + "end": { + "line": 49, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1640, + "end": 1652, + "loc": { + "start": { + "line": 48, + "column": 12 + }, + "end": { + "line": 48, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1640, + "end": 1644, + "loc": { + "start": { + "line": 48, + "column": 12 + }, + "end": { + "line": 48, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1646, + "end": 1652, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1674, + "end": 1870, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 55, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 1674, + "end": 1869, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 55, + "column": 14 + } + }, + "callee": { + "type": "Identifier", + "start": 1674, + "end": 1684, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "FunctionExpression", + "start": 1685, + "end": 1864, + "loc": { + "start": { + "line": 51, + "column": 19 + }, + "end": { + "line": 55, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1696, + "end": 1864, + "loc": { + "start": { + "line": 51, + "column": 30 + }, + "end": { + "line": 55, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1710, + "end": 1746, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "expression": { + "type": "CallExpression", + "start": 1710, + "end": 1745, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 47 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1710, + "end": 1742, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 1710, + "end": 1736, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 38 + } + }, + "object": { + "type": "CallExpression", + "start": 1710, + "end": 1733, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 1710, + "end": 1716, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1717, + "end": 1732, + "loc": { + "start": { + "line": 52, + "column": 19 + }, + "end": { + "line": 52, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 1717, + "end": 1722, + "loc": { + "start": { + "line": 52, + "column": 19 + }, + "end": { + "line": 52, + "column": 24 + } + }, + "name": "onEnd" + }, + "property": { + "type": "Identifier", + "start": 1723, + "end": 1732, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 34 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1734, + "end": 1736, + "loc": { + "start": { + "line": 52, + "column": 36 + }, + "end": { + "line": 52, + "column": 38 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1737, + "end": 1742, + "loc": { + "start": { + "line": 52, + "column": 39 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1743, + "end": 1744, + "loc": { + "start": { + "line": 52, + "column": 45 + }, + "end": { + "line": 52, + "column": 46 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1759, + "end": 1811, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 1759, + "end": 1810, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1759, + "end": 1803, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 1759, + "end": 1797, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 1759, + "end": 1794, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1759, + "end": 1765, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1766, + "end": 1793, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1766, + "end": 1787, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 1766, + "end": 1772, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1773, + "end": 1787, + "loc": { + "start": { + "line": 53, + "column": 26 + }, + "end": { + "line": 53, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1788, + "end": 1793, + "loc": { + "start": { + "line": 53, + "column": 41 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1795, + "end": 1797, + "loc": { + "start": { + "line": 53, + "column": 48 + }, + "end": { + "line": 53, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1798, + "end": 1803, + "loc": { + "start": { + "line": 53, + "column": 51 + }, + "end": { + "line": 53, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1804, + "end": 1809, + "loc": { + "start": { + "line": 53, + "column": 57 + }, + "end": { + "line": 53, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1812, + "end": 1834, + "loc": { + "start": { + "line": 53, + "column": 65 + }, + "end": { + "line": 53, + "column": 87 + } + }, + "range": [ + 1812, + 1834 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1847, + "end": 1854, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 1847, + "end": 1853, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 1847, + "end": 1851, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1812, + "end": 1834, + "loc": { + "start": { + "line": 53, + "column": 65 + }, + "end": { + "line": 53, + "column": 87 + } + }, + "range": [ + 1812, + 1834 + ] + } + ] + } + ] + } + }, + { + "type": "Literal", + "start": 1866, + "end": 1868, + "loc": { + "start": { + "line": 55, + "column": 11 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1884, + "end": 2573, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 73, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1884, + "end": 2572, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 73, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1884, + "end": 1886, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 58, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1887, + "end": 1983, + "loc": { + "start": { + "line": 58, + "column": 7 + }, + "end": { + "line": 58, + "column": 103 + } + }, + "value": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a function expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 1985, + "end": 2571, + "loc": { + "start": { + "line": 58, + "column": 105 + }, + "end": { + "line": 73, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1994, + "end": 1998, + "loc": { + "start": { + "line": 58, + "column": 114 + }, + "end": { + "line": 58, + "column": 118 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2000, + "end": 2571, + "loc": { + "start": { + "line": 58, + "column": 120 + }, + "end": { + "line": 73, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2010, + "end": 2037, + "loc": { + "start": { + "line": 59, + "column": 8 + }, + "end": { + "line": 59, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2016, + "end": 2036, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 2016, + "end": 2022, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 2025, + "end": 2036, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2025, + "end": 2034, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2025, + "end": 2030, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 2031, + "end": 2034, + "loc": { + "start": { + "line": 59, + "column": 29 + }, + "end": { + "line": 59, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2046, + "end": 2151, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 62, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2052, + "end": 2150, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 62, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2052, + "end": 2058, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2061, + "end": 2150, + "loc": { + "start": { + "line": 60, + "column": 23 + }, + "end": { + "line": 62, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 2065, + "end": 2077, + "loc": { + "start": { + "line": 60, + "column": 27 + }, + "end": { + "line": 60, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2078, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2078, + "end": 2079, + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 41 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2083, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2083, + "end": 2100, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 62 + } + }, + "left": { + "type": "MemberExpression", + "start": 2083, + "end": 2089, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 51 + } + }, + "object": { + "type": "Identifier", + "start": 2083, + "end": 2084, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 46 + } + }, + "name": "x" + }, + "property": { + "type": "Identifier", + "start": 2085, + "end": 2089, + "loc": { + "start": { + "line": 60, + "column": 47 + }, + "end": { + "line": 60, + "column": 51 + } + }, + "name": "test" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 2094, + "end": 2100, + "loc": { + "start": { + "line": 60, + "column": 56 + }, + "end": { + "line": 60, + "column": 62 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + }, + "consequent": { + "type": "Literal", + "start": 2103, + "end": 2104, + "loc": { + "start": { + "line": 60, + "column": 65 + }, + "end": { + "line": 60, + "column": 66 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 2107, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 69 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2108, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 70 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + }, + { + "type": "ObjectExpression", + "start": 2111, + "end": 2149, + "loc": { + "start": { + "line": 60, + "column": 73 + }, + "end": { + "line": 62, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2125, + "end": 2139, + "loc": { + "start": { + "line": 61, + "column": 12 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2125, + "end": 2131, + "loc": { + "start": { + "line": 61, + "column": 12 + }, + "end": { + "line": 61, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 2133, + "end": 2139, + "loc": { + "start": { + "line": 61, + "column": 20 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2161, + "end": 2535, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 70, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 2161, + "end": 2534, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 70, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2161, + "end": 2170, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 2161, + "end": 2167, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2168, + "end": 2170, + "loc": { + "start": { + "line": 64, + "column": 15 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2171, + "end": 2178, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 25 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "ArrowFunctionExpression", + "start": 2180, + "end": 2533, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 70, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2180, + "end": 2181, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 28 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 2185, + "end": 2533, + "loc": { + "start": { + "line": 64, + "column": 32 + }, + "end": { + "line": 70, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2199, + "end": 2284, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 97 + } + }, + "expression": { + "type": "CallExpression", + "start": 2199, + "end": 2283, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 96 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2199, + "end": 2225, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "object": { + "type": "MemberExpression", + "start": 2199, + "end": 2219, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "object": { + "type": "CallExpression", + "start": 2199, + "end": 2216, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "callee": { + "type": "Identifier", + "start": 2199, + "end": 2205, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2206, + "end": 2215, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 28 + } + }, + "object": { + "type": "Identifier", + "start": 2206, + "end": 2207, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 20 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 2208, + "end": 2215, + "loc": { + "start": { + "line": 65, + "column": 21 + }, + "end": { + "line": 65, + "column": 28 + } + }, + "name": "message" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2217, + "end": 2219, + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2220, + "end": 2225, + "loc": { + "start": { + "line": 65, + "column": 33 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2226, + "end": 2282, + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 95 + } + }, + "value": "the messages [\"bla\"] do not match your expectations.", + "rawValue": "the messages [\"bla\"] do not match your expectations.", + "raw": "\"the messages [\\\"bla\\\"] do not match your expectations.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2297, + "end": 2351, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 66 + } + }, + "expression": { + "type": "CallExpression", + "start": 2297, + "end": 2350, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2297, + "end": 2343, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 2297, + "end": 2337, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 2297, + "end": 2334, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 2297, + "end": 2303, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2304, + "end": 2333, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2304, + "end": 2331, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2304, + "end": 2325, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2304, + "end": 2320, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2304, + "end": 2310, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2311, + "end": 2320, + "loc": { + "start": { + "line": 66, + "column": 26 + }, + "end": { + "line": 66, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2321, + "end": 2325, + "loc": { + "start": { + "line": 66, + "column": 36 + }, + "end": { + "line": 66, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2326, + "end": 2331, + "loc": { + "start": { + "line": 66, + "column": 41 + }, + "end": { + "line": 66, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2335, + "end": 2337, + "loc": { + "start": { + "line": 66, + "column": 50 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2338, + "end": 2343, + "loc": { + "start": { + "line": 66, + "column": 53 + }, + "end": { + "line": 66, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2344, + "end": 2349, + "loc": { + "start": { + "line": 66, + "column": 59 + }, + "end": { + "line": 66, + "column": 64 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2364, + "end": 2415, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 63 + } + }, + "expression": { + "type": "CallExpression", + "start": 2364, + "end": 2414, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2364, + "end": 2410, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 2364, + "end": 2404, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 2364, + "end": 2401, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 2364, + "end": 2370, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2371, + "end": 2400, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2371, + "end": 2398, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2371, + "end": 2392, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2371, + "end": 2387, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2371, + "end": 2377, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2378, + "end": 2387, + "loc": { + "start": { + "line": 67, + "column": 26 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2388, + "end": 2392, + "loc": { + "start": { + "line": 67, + "column": 36 + }, + "end": { + "line": 67, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2393, + "end": 2398, + "loc": { + "start": { + "line": 67, + "column": 41 + }, + "end": { + "line": 67, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2402, + "end": 2404, + "loc": { + "start": { + "line": 67, + "column": 50 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2405, + "end": 2410, + "loc": { + "start": { + "line": 67, + "column": 53 + }, + "end": { + "line": 67, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 2411, + "end": 2413, + "loc": { + "start": { + "line": 67, + "column": 59 + }, + "end": { + "line": 67, + "column": 61 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2412, + "end": 2413, + "loc": { + "start": { + "line": 67, + "column": 60 + }, + "end": { + "line": 67, + "column": 61 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2428, + "end": 2480, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 2428, + "end": 2479, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2428, + "end": 2472, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 2428, + "end": 2466, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 2428, + "end": 2463, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 2428, + "end": 2434, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2435, + "end": 2462, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2435, + "end": 2456, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 2435, + "end": 2441, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2442, + "end": 2456, + "loc": { + "start": { + "line": 68, + "column": 26 + }, + "end": { + "line": 68, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2457, + "end": 2462, + "loc": { + "start": { + "line": 68, + "column": 41 + }, + "end": { + "line": 68, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2464, + "end": 2466, + "loc": { + "start": { + "line": 68, + "column": 48 + }, + "end": { + "line": 68, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2467, + "end": 2472, + "loc": { + "start": { + "line": 68, + "column": 51 + }, + "end": { + "line": 68, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2473, + "end": 2478, + "loc": { + "start": { + "line": 68, + "column": 57 + }, + "end": { + "line": 68, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2481, + "end": 2503, + "loc": { + "start": { + "line": 68, + "column": 65 + }, + "end": { + "line": 68, + "column": 87 + } + }, + "range": [ + 2481, + 2503 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2516, + "end": 2523, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 2516, + "end": 2522, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 2516, + "end": 2520, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2481, + "end": 2503, + "loc": { + "start": { + "line": 68, + "column": 65 + }, + "end": { + "line": 68, + "column": 87 + } + }, + "range": [ + 2481, + 2503 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2545, + "end": 2565, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 2545, + "end": 2564, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2545, + "end": 2557, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 2545, + "end": 2551, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2552, + "end": 2557, + "loc": { + "start": { + "line": 72, + "column": 15 + }, + "end": { + "line": 72, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2558, + "end": 2563, + "loc": { + "start": { + "line": 72, + "column": 21 + }, + "end": { + "line": 72, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2579, + "end": 3280, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 92, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2579, + "end": 3279, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 92, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2579, + "end": 2581, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 75, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2582, + "end": 2642, + "loc": { + "start": { + "line": 75, + "column": 7 + }, + "end": { + "line": 75, + "column": 67 + } + }, + "value": "writes to an assert stream, that expects multiple messages", + "rawValue": "writes to an assert stream, that expects multiple messages", + "raw": "\"writes to an assert stream, that expects multiple messages\"" + }, + { + "type": "FunctionExpression", + "start": 2644, + "end": 3278, + "loc": { + "start": { + "line": 75, + "column": 69 + }, + "end": { + "line": 92, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2653, + "end": 2657, + "loc": { + "start": { + "line": 75, + "column": 78 + }, + "end": { + "line": 75, + "column": 82 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2659, + "end": 3278, + "loc": { + "start": { + "line": 75, + "column": 84 + }, + "end": { + "line": 92, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2669, + "end": 2696, + "loc": { + "start": { + "line": 76, + "column": 8 + }, + "end": { + "line": 76, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2675, + "end": 2695, + "loc": { + "start": { + "line": 76, + "column": 14 + }, + "end": { + "line": 76, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 2675, + "end": 2681, + "loc": { + "start": { + "line": 76, + "column": 14 + }, + "end": { + "line": 76, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 2684, + "end": 2695, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2684, + "end": 2693, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2684, + "end": 2689, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 2690, + "end": 2693, + "loc": { + "start": { + "line": 76, + "column": 29 + }, + "end": { + "line": 76, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2705, + "end": 2806, + "loc": { + "start": { + "line": 77, + "column": 8 + }, + "end": { + "line": 79, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2711, + "end": 2805, + "loc": { + "start": { + "line": 77, + "column": 14 + }, + "end": { + "line": 79, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2711, + "end": 2717, + "loc": { + "start": { + "line": 77, + "column": 14 + }, + "end": { + "line": 77, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2720, + "end": 2805, + "loc": { + "start": { + "line": 77, + "column": 23 + }, + "end": { + "line": 79, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 2724, + "end": 2736, + "loc": { + "start": { + "line": 77, + "column": 27 + }, + "end": { + "line": 77, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2737, + "end": 2764, + "loc": { + "start": { + "line": 77, + "column": 40 + }, + "end": { + "line": 77, + "column": 67 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2738, + "end": 2745, + "loc": { + "start": { + "line": 77, + "column": 41 + }, + "end": { + "line": 77, + "column": 48 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 2747, + "end": 2754, + "loc": { + "start": { + "line": 77, + "column": 50 + }, + "end": { + "line": 77, + "column": 57 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 2756, + "end": 2763, + "loc": { + "start": { + "line": 77, + "column": 59 + }, + "end": { + "line": 77, + "column": 66 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 2766, + "end": 2804, + "loc": { + "start": { + "line": 77, + "column": 69 + }, + "end": { + "line": 79, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2780, + "end": 2794, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 78, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2780, + "end": 2786, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 78, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 2788, + "end": 2794, + "loc": { + "start": { + "line": 78, + "column": 20 + }, + "end": { + "line": 78, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2815, + "end": 3144, + "loc": { + "start": { + "line": 80, + "column": 8 + }, + "end": { + "line": 86, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2821, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 14 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 2821, + "end": 2826, + "loc": { + "start": { + "line": 80, + "column": 14 + }, + "end": { + "line": 80, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "FunctionExpression", + "start": 2829, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2840, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 33 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2854, + "end": 2902, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 2854, + "end": 2901, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2854, + "end": 2860, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2861, + "end": 2900, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2861, + "end": 2888, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2861, + "end": 2877, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2861, + "end": 2867, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2868, + "end": 2877, + "loc": { + "start": { + "line": 81, + "column": 26 + }, + "end": { + "line": 81, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2878, + "end": 2888, + "loc": { + "start": { + "line": 81, + "column": 36 + }, + "end": { + "line": 81, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2889, + "end": 2896, + "loc": { + "start": { + "line": 81, + "column": 47 + }, + "end": { + "line": 81, + "column": 54 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 2898, + "end": 2899, + "loc": { + "start": { + "line": 81, + "column": 56 + }, + "end": { + "line": 81, + "column": 57 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2915, + "end": 2964, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 61 + } + }, + "expression": { + "type": "CallExpression", + "start": 2915, + "end": 2963, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 2915, + "end": 2921, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2922, + "end": 2962, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 59 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2922, + "end": 2950, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 2922, + "end": 2939, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 2922, + "end": 2928, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2929, + "end": 2939, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2940, + "end": 2950, + "loc": { + "start": { + "line": 82, + "column": 37 + }, + "end": { + "line": 82, + "column": 47 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2951, + "end": 2958, + "loc": { + "start": { + "line": 82, + "column": 48 + }, + "end": { + "line": 82, + "column": 55 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 2960, + "end": 2961, + "loc": { + "start": { + "line": 82, + "column": 57 + }, + "end": { + "line": 82, + "column": 58 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2977, + "end": 3025, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 2977, + "end": 3024, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2977, + "end": 2983, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2984, + "end": 3023, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2984, + "end": 3011, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2984, + "end": 3000, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2984, + "end": 2990, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2991, + "end": 3000, + "loc": { + "start": { + "line": 83, + "column": 26 + }, + "end": { + "line": 83, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3001, + "end": 3011, + "loc": { + "start": { + "line": 83, + "column": 36 + }, + "end": { + "line": 83, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3012, + "end": 3019, + "loc": { + "start": { + "line": 83, + "column": 47 + }, + "end": { + "line": 83, + "column": 54 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + }, + { + "type": "Literal", + "start": 3021, + "end": 3022, + "loc": { + "start": { + "line": 83, + "column": 56 + }, + "end": { + "line": 83, + "column": 57 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3038, + "end": 3090, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 3038, + "end": 3089, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3038, + "end": 3082, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 3038, + "end": 3076, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 3038, + "end": 3073, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 3038, + "end": 3044, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3045, + "end": 3072, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3045, + "end": 3066, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 3045, + "end": 3051, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3052, + "end": 3066, + "loc": { + "start": { + "line": 84, + "column": 26 + }, + "end": { + "line": 84, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3067, + "end": 3072, + "loc": { + "start": { + "line": 84, + "column": 41 + }, + "end": { + "line": 84, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3074, + "end": 3076, + "loc": { + "start": { + "line": 84, + "column": 48 + }, + "end": { + "line": 84, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3077, + "end": 3082, + "loc": { + "start": { + "line": 84, + "column": 51 + }, + "end": { + "line": 84, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3083, + "end": 3088, + "loc": { + "start": { + "line": 84, + "column": 57 + }, + "end": { + "line": 84, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3091, + "end": 3113, + "loc": { + "start": { + "line": 84, + "column": 65 + }, + "end": { + "line": 84, + "column": 87 + } + }, + "range": [ + 3091, + 3113 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 3126, + "end": 3133, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 3126, + "end": 3132, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 3126, + "end": 3130, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3091, + "end": 3113, + "loc": { + "start": { + "line": 84, + "column": 65 + }, + "end": { + "line": 84, + "column": 87 + } + }, + "range": [ + 3091, + 3113 + ] + } + ] + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3154, + "end": 3179, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 3154, + "end": 3178, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3154, + "end": 3163, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 3154, + "end": 3160, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3161, + "end": 3163, + "loc": { + "start": { + "line": 88, + "column": 15 + }, + "end": { + "line": 88, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3164, + "end": 3170, + "loc": { + "start": { + "line": 88, + "column": 18 + }, + "end": { + "line": 88, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 3172, + "end": 3177, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3188, + "end": 3210, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3188, + "end": 3209, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3188, + "end": 3200, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3188, + "end": 3194, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3195, + "end": 3200, + "loc": { + "start": { + "line": 89, + "column": 15 + }, + "end": { + "line": 89, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3201, + "end": 3208, + "loc": { + "start": { + "line": 89, + "column": 21 + }, + "end": { + "line": 89, + "column": 28 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3219, + "end": 3241, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3219, + "end": 3240, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3219, + "end": 3231, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3219, + "end": 3225, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3226, + "end": 3231, + "loc": { + "start": { + "line": 90, + "column": 15 + }, + "end": { + "line": 90, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3232, + "end": 3239, + "loc": { + "start": { + "line": 90, + "column": 21 + }, + "end": { + "line": 90, + "column": 28 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3250, + "end": 3272, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3250, + "end": 3271, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3250, + "end": 3262, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3250, + "end": 3256, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3257, + "end": 3262, + "loc": { + "start": { + "line": 91, + "column": 15 + }, + "end": { + "line": 91, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3263, + "end": 3270, + "loc": { + "start": { + "line": 91, + "column": 21 + }, + "end": { + "line": 91, + "column": 28 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3286, + "end": 4020, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 113, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3286, + "end": 4019, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 113, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3286, + "end": 3288, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 94, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3289, + "end": 3342, + "loc": { + "start": { + "line": 94, + "column": 7 + }, + "end": { + "line": 94, + "column": 60 + } + }, + "value": "writes to an assert stream, filtering some messages", + "rawValue": "writes to an assert stream, filtering some messages", + "raw": "\"writes to an assert stream, filtering some messages\"" + }, + { + "type": "FunctionExpression", + "start": 3344, + "end": 4018, + "loc": { + "start": { + "line": 94, + "column": 62 + }, + "end": { + "line": 113, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3353, + "end": 3357, + "loc": { + "start": { + "line": 94, + "column": 71 + }, + "end": { + "line": 94, + "column": 75 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3359, + "end": 4018, + "loc": { + "start": { + "line": 94, + "column": 77 + }, + "end": { + "line": 113, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 3369, + "end": 3396, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3375, + "end": 3395, + "loc": { + "start": { + "line": 95, + "column": 14 + }, + "end": { + "line": 95, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 3375, + "end": 3381, + "loc": { + "start": { + "line": 95, + "column": 14 + }, + "end": { + "line": 95, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 3384, + "end": 3395, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3384, + "end": 3393, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 3384, + "end": 3389, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 3390, + "end": 3393, + "loc": { + "start": { + "line": 95, + "column": 29 + }, + "end": { + "line": 95, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 3405, + "end": 3545, + "loc": { + "start": { + "line": 96, + "column": 8 + }, + "end": { + "line": 99, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3411, + "end": 3544, + "loc": { + "start": { + "line": 96, + "column": 14 + }, + "end": { + "line": 99, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 3411, + "end": 3417, + "loc": { + "start": { + "line": 96, + "column": 14 + }, + "end": { + "line": 96, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 3420, + "end": 3544, + "loc": { + "start": { + "line": 96, + "column": 23 + }, + "end": { + "line": 99, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 3424, + "end": 3436, + "loc": { + "start": { + "line": 96, + "column": 27 + }, + "end": { + "line": 96, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3437, + "end": 3455, + "loc": { + "start": { + "line": 96, + "column": 40 + }, + "end": { + "line": 96, + "column": 58 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3438, + "end": 3445, + "loc": { + "start": { + "line": 96, + "column": 41 + }, + "end": { + "line": 96, + "column": 48 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 3447, + "end": 3454, + "loc": { + "start": { + "line": 96, + "column": 50 + }, + "end": { + "line": 96, + "column": 57 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 3457, + "end": 3543, + "loc": { + "start": { + "line": 96, + "column": 60 + }, + "end": { + "line": 99, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 3471, + "end": 3485, + "loc": { + "start": { + "line": 97, + "column": 12 + }, + "end": { + "line": 97, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 3471, + "end": 3477, + "loc": { + "start": { + "line": 97, + "column": 12 + }, + "end": { + "line": 97, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 3479, + "end": 3485, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 97, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 3499, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 12 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 3499, + "end": 3505, + "loc": { + "start": { + "line": 98, + "column": 12 + }, + "end": { + "line": 98, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 3507, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3507, + "end": 3512, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 3516, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 29 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 3516, + "end": 3521, + "loc": { + "start": { + "line": 98, + "column": 29 + }, + "end": { + "line": 98, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 3526, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 39 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 3555, + "end": 3884, + "loc": { + "start": { + "line": 101, + "column": 8 + }, + "end": { + "line": 107, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3561, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 14 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 3561, + "end": 3566, + "loc": { + "start": { + "line": 101, + "column": 14 + }, + "end": { + "line": 101, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "FunctionExpression", + "start": 3569, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 22 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 3580, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 33 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3594, + "end": 3642, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 3594, + "end": 3641, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 3594, + "end": 3600, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3601, + "end": 3640, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3601, + "end": 3628, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3601, + "end": 3617, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 3601, + "end": 3607, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3608, + "end": 3617, + "loc": { + "start": { + "line": 102, + "column": 26 + }, + "end": { + "line": 102, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3618, + "end": 3628, + "loc": { + "start": { + "line": 102, + "column": 36 + }, + "end": { + "line": 102, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3629, + "end": 3636, + "loc": { + "start": { + "line": 102, + "column": 47 + }, + "end": { + "line": 102, + "column": 54 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + }, + { + "type": "Literal", + "start": 3638, + "end": 3639, + "loc": { + "start": { + "line": 102, + "column": 56 + }, + "end": { + "line": 102, + "column": 57 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3655, + "end": 3704, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 61 + } + }, + "expression": { + "type": "CallExpression", + "start": 3655, + "end": 3703, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 3655, + "end": 3661, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3662, + "end": 3702, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 59 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3662, + "end": 3690, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 3662, + "end": 3679, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 3662, + "end": 3668, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3669, + "end": 3679, + "loc": { + "start": { + "line": 103, + "column": 26 + }, + "end": { + "line": 103, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3680, + "end": 3690, + "loc": { + "start": { + "line": 103, + "column": 37 + }, + "end": { + "line": 103, + "column": 47 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3691, + "end": 3698, + "loc": { + "start": { + "line": 103, + "column": 48 + }, + "end": { + "line": 103, + "column": 55 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 3700, + "end": 3701, + "loc": { + "start": { + "line": 103, + "column": 57 + }, + "end": { + "line": 103, + "column": 58 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3717, + "end": 3765, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 3717, + "end": 3764, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 3717, + "end": 3723, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3724, + "end": 3763, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3724, + "end": 3751, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3724, + "end": 3740, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 3724, + "end": 3730, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3731, + "end": 3740, + "loc": { + "start": { + "line": 104, + "column": 26 + }, + "end": { + "line": 104, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3741, + "end": 3751, + "loc": { + "start": { + "line": 104, + "column": 36 + }, + "end": { + "line": 104, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3752, + "end": 3759, + "loc": { + "start": { + "line": 104, + "column": 47 + }, + "end": { + "line": 104, + "column": 54 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 3761, + "end": 3762, + "loc": { + "start": { + "line": 104, + "column": 56 + }, + "end": { + "line": 104, + "column": 57 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3778, + "end": 3830, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 3778, + "end": 3829, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3778, + "end": 3822, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 3778, + "end": 3816, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 3778, + "end": 3813, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 3778, + "end": 3784, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3785, + "end": 3812, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3785, + "end": 3806, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 3785, + "end": 3791, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3792, + "end": 3806, + "loc": { + "start": { + "line": 105, + "column": 26 + }, + "end": { + "line": 105, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3807, + "end": 3812, + "loc": { + "start": { + "line": 105, + "column": 41 + }, + "end": { + "line": 105, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3814, + "end": 3816, + "loc": { + "start": { + "line": 105, + "column": 48 + }, + "end": { + "line": 105, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3817, + "end": 3822, + "loc": { + "start": { + "line": 105, + "column": 51 + }, + "end": { + "line": 105, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3823, + "end": 3828, + "loc": { + "start": { + "line": 105, + "column": 57 + }, + "end": { + "line": 105, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3831, + "end": 3853, + "loc": { + "start": { + "line": 105, + "column": 65 + }, + "end": { + "line": 105, + "column": 87 + } + }, + "range": [ + 3831, + 3853 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 3866, + "end": 3873, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 3866, + "end": 3872, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 3866, + "end": 3870, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3831, + "end": 3853, + "loc": { + "start": { + "line": 105, + "column": 65 + }, + "end": { + "line": 105, + "column": 87 + } + }, + "range": [ + 3831, + 3853 + ] + } + ] + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3894, + "end": 3919, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 3894, + "end": 3918, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3894, + "end": 3903, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 3894, + "end": 3900, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3901, + "end": 3903, + "loc": { + "start": { + "line": 109, + "column": 15 + }, + "end": { + "line": 109, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3904, + "end": 3910, + "loc": { + "start": { + "line": 109, + "column": 18 + }, + "end": { + "line": 109, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 3912, + "end": 3917, + "loc": { + "start": { + "line": 109, + "column": 26 + }, + "end": { + "line": 109, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3928, + "end": 3950, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3928, + "end": 3949, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3928, + "end": 3940, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3928, + "end": 3934, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3935, + "end": 3940, + "loc": { + "start": { + "line": 110, + "column": 15 + }, + "end": { + "line": 110, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3941, + "end": 3948, + "loc": { + "start": { + "line": 110, + "column": 21 + }, + "end": { + "line": 110, + "column": 28 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3959, + "end": 3981, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3959, + "end": 3980, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3959, + "end": 3971, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3959, + "end": 3965, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3966, + "end": 3971, + "loc": { + "start": { + "line": 111, + "column": 15 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3972, + "end": 3979, + "loc": { + "start": { + "line": 111, + "column": 21 + }, + "end": { + "line": 111, + "column": 28 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3990, + "end": 4012, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3990, + "end": 4011, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3990, + "end": 4002, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3990, + "end": 3996, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3997, + "end": 4002, + "loc": { + "start": { + "line": 112, + "column": 15 + }, + "end": { + "line": 112, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4003, + "end": 4010, + "loc": { + "start": { + "line": 112, + "column": 21 + }, + "end": { + "line": 112, + "column": 28 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/__tests__/ExpectStreamTest.js.json b/ExpectStreamBak/docs/ast/source/__tests__/ExpectStreamTest.js.json new file mode 100644 index 0000000..b6c021d --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/__tests__/ExpectStreamTest.js.json @@ -0,0 +1,18568 @@ +{ + "type": "Program", + "start": 0, + "end": 8142, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 250, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "isArray" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 20, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": "lodash.isarray", + "rawValue": "lodash.isarray", + "raw": "\"lodash.isarray\"" + } + }, + { + "type": "ImportDeclaration", + "start": 38, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 61, + "end": 71, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + }, + "value": "../index", + "rawValue": "../index", + "raw": "\"../index\"" + } + }, + { + "type": "ImportDeclaration", + "start": 73, + "end": 118, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 45 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "imported": { + "type": "Identifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "Readable" + }, + "local": { + "type": "Identifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "Readable" + } + }, + { + "type": "ImportSpecifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "imported": { + "type": "Identifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "name": "Transform" + }, + "local": { + "type": "Identifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "name": "Transform" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 109, + "end": 117, + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 44 + } + }, + "value": "stream", + "rawValue": "stream", + "raw": "\"stream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 119, + "end": 147, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 28 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 126, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "local": { + "type": "Identifier", + "start": 126, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "name": "assert" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 138, + "end": 146, + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + }, + "value": "assert", + "rawValue": "assert", + "raw": "\"assert\"" + } + }, + { + "type": "ImportDeclaration", + "start": 148, + "end": 174, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 26 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 155, + "end": 160, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 155, + "end": 160, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "name": "sinon" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 166, + "end": 173, + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + }, + "value": "sinon", + "rawValue": "sinon", + "raw": "\"sinon\"" + } + }, + { + "type": "ClassDeclaration", + "start": 176, + "end": 478, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 182, + "end": 192, + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 16 + } + }, + "name": "ReadStream" + }, + "superClass": { + "type": "Identifier", + "start": 201, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 33 + } + }, + "name": "Readable" + }, + "body": { + "type": "ClassBody", + "start": 210, + "end": 478, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 216, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 216, + "end": 227, + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 227, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "AssignmentPattern", + "start": 228, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 33 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 228, + "end": 236, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 24 + } + }, + "name": "messages" + }, + "right": { + "type": "Literal", + "start": 239, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 33 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 247, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 257, + "end": 285, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 36 + } + }, + "expression": { + "type": "CallExpression", + "start": 257, + "end": 284, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 35 + } + }, + "callee": { + "type": "Super", + "start": 257, + "end": 262, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 263, + "end": 283, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 34 + } + }, + "properties": [ + { + "type": "Property", + "start": 265, + "end": 281, + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 32 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 265, + "end": 275, + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 26 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 277, + "end": 281, + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 32 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 295, + "end": 320, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 295, + "end": 319, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 295, + "end": 308, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 295, + "end": 299, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 300, + "end": 308, + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 311, + "end": 319, + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 32 + } + }, + "name": "messages" + } + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 332, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 332, + "end": 337, + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + }, + "name": "_read" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 337, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 340, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 350, + "end": 470, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 19, + "column": 10 + } + }, + "expression": { + "type": "CallExpression", + "start": 350, + "end": 469, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + }, + "callee": { + "type": "MemberExpression", + "start": 350, + "end": 359, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 350, + "end": 354, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 355, + "end": 359, + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "ConditionalExpression", + "start": 373, + "end": 459, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "test": { + "type": "CallExpression", + "start": 373, + "end": 395, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 34 + } + }, + "callee": { + "type": "Identifier", + "start": 373, + "end": 380, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 19 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 381, + "end": 394, + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "object": { + "type": "ThisExpression", + "start": 381, + "end": 385, + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "property": { + "type": "Identifier", + "start": 386, + "end": 394, + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "name": "messages" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 410, + "end": 431, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 410, + "end": 429, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 410, + "end": 423, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 410, + "end": 414, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 415, + "end": 423, + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 25 + } + }, + "name": "messages" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 424, + "end": 429, + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 31 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + }, + "alternate": { + "type": "MemberExpression", + "start": 446, + "end": 459, + "loc": { + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 446, + "end": 450, + "loc": { + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 451, + "end": 459, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "name": "messages" + }, + "computed": false + } + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 480, + "end": 616, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 486, + "end": 501, + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 21 + } + }, + "name": "TransformStream" + }, + "superClass": { + "type": "Identifier", + "start": 510, + "end": 519, + "loc": { + "start": { + "line": 23, + "column": 30 + }, + "end": { + "line": 23, + "column": 39 + } + }, + "name": "Transform" + }, + "body": { + "type": "ClassBody", + "start": 520, + "end": 616, + "loc": { + "start": { + "line": 23, + "column": 40 + }, + "end": { + "line": 28, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 526, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 526, + "end": 536, + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "name": "_transform" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 536, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 537, + "end": 542, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 20 + } + }, + "name": "chunk" + }, + { + "type": "Identifier", + "start": 544, + "end": 547, + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 25 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 549, + "end": 551, + "loc": { + "start": { + "line": 24, + "column": 27 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 553, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 563, + "end": 580, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 563, + "end": 579, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 563, + "end": 572, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 563, + "end": 567, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 568, + "end": 572, + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 573, + "end": 578, + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 23 + } + }, + "name": "chunk" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 589, + "end": 608, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 589, + "end": 607, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 589, + "end": 599, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "Identifier", + "start": 600, + "end": 602, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "cb" + }, + { + "type": "Literal", + "start": 604, + "end": 606, + "loc": { + "start": { + "line": 26, + "column": 23 + }, + "end": { + "line": 26, + "column": 25 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 619, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 45, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 625, + "end": 641, + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "ReadObjectStream" + }, + "superClass": { + "type": "Identifier", + "start": 650, + "end": 658, + "loc": { + "start": { + "line": 31, + "column": 31 + }, + "end": { + "line": 31, + "column": 39 + } + }, + "name": "Readable" + }, + "body": { + "type": "ClassBody", + "start": 659, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 40 + }, + "end": { + "line": 45, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 665, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 665, + "end": 676, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 676, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 679, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 18 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 689, + "end": 737, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 35, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 689, + "end": 736, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 35, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 689, + "end": 694, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 695, + "end": 735, + "loc": { + "start": { + "line": 33, + "column": 14 + }, + "end": { + "line": 35, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 709, + "end": 725, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 709, + "end": 719, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 721, + "end": 725, + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 749, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 749, + "end": 754, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 9 + } + }, + "name": "_read" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 754, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 757, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 12 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 767, + "end": 849, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 43, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 767, + "end": 848, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 767, + "end": 776, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 767, + "end": 771, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 772, + "end": 776, + "loc": { + "start": { + "line": 39, + "column": 13 + }, + "end": { + "line": 39, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 777, + "end": 847, + "loc": { + "start": { + "line": 39, + "column": 18 + }, + "end": { + "line": 43, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 791, + "end": 837, + "loc": { + "start": { + "line": 40, + "column": 12 + }, + "end": { + "line": 42, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 791, + "end": 795, + "loc": { + "start": { + "line": 40, + "column": 12 + }, + "end": { + "line": 40, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 797, + "end": 837, + "loc": { + "start": { + "line": 40, + "column": 18 + }, + "end": { + "line": 42, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 815, + "end": 823, + "loc": { + "start": { + "line": 41, + "column": 16 + }, + "end": { + "line": 41, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 815, + "end": 819, + "loc": { + "start": { + "line": 41, + "column": 16 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 821, + "end": 823, + "loc": { + "start": { + "line": 41, + "column": 22 + }, + "end": { + "line": 41, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 859, + "end": 1078, + "loc": { + "start": { + "line": 47, + "column": 0 + }, + "end": { + "line": 58, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 865, + "end": 883, + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 24 + } + }, + "name": "TransformObjStream" + }, + "superClass": { + "type": "Identifier", + "start": 892, + "end": 901, + "loc": { + "start": { + "line": 47, + "column": 33 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "name": "Transform" + }, + "body": { + "type": "ClassBody", + "start": 902, + "end": 1078, + "loc": { + "start": { + "line": 47, + "column": 43 + }, + "end": { + "line": 58, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 908, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 908, + "end": 919, + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 48, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 919, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 922, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 932, + "end": 980, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 51, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 932, + "end": 979, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 51, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 932, + "end": 937, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 938, + "end": 978, + "loc": { + "start": { + "line": 49, + "column": 14 + }, + "end": { + "line": 51, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 952, + "end": 968, + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 952, + "end": 962, + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 964, + "end": 968, + "loc": { + "start": { + "line": 50, + "column": 24 + }, + "end": { + "line": 50, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 992, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 992, + "end": 1002, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 54, + "column": 14 + } + }, + "name": "_transform" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1002, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 14 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1003, + "end": 1006, + "loc": { + "start": { + "line": 54, + "column": 15 + }, + "end": { + "line": 54, + "column": 18 + } + }, + "name": "obj" + }, + { + "type": "Identifier", + "start": 1008, + "end": 1011, + "loc": { + "start": { + "line": 54, + "column": 20 + }, + "end": { + "line": 54, + "column": 23 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 1013, + "end": 1015, + "loc": { + "start": { + "line": 54, + "column": 25 + }, + "end": { + "line": 54, + "column": 27 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 1017, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 29 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1027, + "end": 1042, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 1027, + "end": 1041, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1027, + "end": 1036, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1027, + "end": 1031, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1032, + "end": 1036, + "loc": { + "start": { + "line": 55, + "column": 13 + }, + "end": { + "line": 55, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1037, + "end": 1040, + "loc": { + "start": { + "line": 55, + "column": 18 + }, + "end": { + "line": 55, + "column": 21 + } + }, + "name": "obj" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1051, + "end": 1070, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 1051, + "end": 1069, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 1051, + "end": 1061, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1062, + "end": 1064, + "loc": { + "start": { + "line": 56, + "column": 19 + }, + "end": { + "line": 56, + "column": 21 + } + }, + "name": "cb" + }, + { + "type": "Literal", + "start": 1066, + "end": 1068, + "loc": { + "start": { + "line": 56, + "column": 23 + }, + "end": { + "line": 56, + "column": 25 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1081, + "end": 8141, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 249, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 1081, + "end": 8140, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 249, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 1081, + "end": 1089, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 61, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 1090, + "end": 1108, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 27 + } + }, + "value": "ExpectStreamTest", + "rawValue": "ExpectStreamTest", + "raw": "\"ExpectStreamTest\"" + }, + { + "type": "FunctionExpression", + "start": 1110, + "end": 8139, + "loc": { + "start": { + "line": 61, + "column": 29 + }, + "end": { + "line": 249, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1121, + "end": 8139, + "loc": { + "start": { + "line": 61, + "column": 40 + }, + "end": { + "line": 249, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1150, + "end": 1383, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 66, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1150, + "end": 1382, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 66, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1150, + "end": 1152, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 62, + "column": 6 + } + }, + "name": "it", + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1153, + "end": 1217, + "loc": { + "start": { + "line": 62, + "column": 7 + }, + "end": { + "line": 62, + "column": 71 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly", + "rawValue": "uses the produce assertion with a readstream, matching exactly", + "raw": "\"uses the produce assertion with a readstream, matching exactly\"" + }, + { + "type": "FunctionExpression", + "start": 1219, + "end": 1381, + "loc": { + "start": { + "line": 62, + "column": 73 + }, + "end": { + "line": 66, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1228, + "end": 1232, + "loc": { + "start": { + "line": 62, + "column": 82 + }, + "end": { + "line": 62, + "column": 86 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1234, + "end": 1381, + "loc": { + "start": { + "line": 62, + "column": 88 + }, + "end": { + "line": 66, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1244, + "end": 1375, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1244, + "end": 1374, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1244, + "end": 1368, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1244, + "end": 1348, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1244, + "end": 1319, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1244, + "end": 1311, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1244, + "end": 1295, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 1244, + "end": 1250, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1251, + "end": 1294, + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 58 + } + }, + "callee": { + "type": "Identifier", + "start": 1255, + "end": 1265, + "loc": { + "start": { + "line": 63, + "column": 19 + }, + "end": { + "line": 63, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1266, + "end": 1293, + "loc": { + "start": { + "line": 63, + "column": 30 + }, + "end": { + "line": 63, + "column": 57 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1267, + "end": 1274, + "loc": { + "start": { + "line": 63, + "column": 31 + }, + "end": { + "line": 63, + "column": 38 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 1276, + "end": 1283, + "loc": { + "start": { + "line": 63, + "column": 40 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 1285, + "end": 1292, + "loc": { + "start": { + "line": 63, + "column": 49 + }, + "end": { + "line": 63, + "column": 56 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1309, + "end": 1311, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1312, + "end": 1319, + "loc": { + "start": { + "line": 64, + "column": 16 + }, + "end": { + "line": 64, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1320, + "end": 1347, + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1321, + "end": 1328, + "loc": { + "start": { + "line": 64, + "column": 25 + }, + "end": { + "line": 64, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 1330, + "end": 1337, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 1339, + "end": 1346, + "loc": { + "start": { + "line": 64, + "column": 43 + }, + "end": { + "line": 64, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1362, + "end": 1368, + "loc": { + "start": { + "line": 65, + "column": 13 + }, + "end": { + "line": 65, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1369, + "end": 1373, + "loc": { + "start": { + "line": 65, + "column": 20 + }, + "end": { + "line": 65, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1123, + "end": 1145, + "loc": { + "start": { + "line": 61, + "column": 42 + }, + "end": { + "line": 61, + "column": 64 + } + }, + "range": [ + 1123, + 1145 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1389, + "end": 1619, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 72, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1389, + "end": 1618, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 72, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1389, + "end": 1391, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1392, + "end": 1467, + "loc": { + "start": { + "line": 68, + "column": 7 + }, + "end": { + "line": 68, + "column": 82 + } + }, + "value": "uses the produce assertion with a readstream, matching on strict equality", + "rawValue": "uses the produce assertion with a readstream, matching on strict equality", + "raw": "\"uses the produce assertion with a readstream, matching on strict equality\"" + }, + { + "type": "FunctionExpression", + "start": 1469, + "end": 1617, + "loc": { + "start": { + "line": 68, + "column": 84 + }, + "end": { + "line": 72, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1478, + "end": 1482, + "loc": { + "start": { + "line": 68, + "column": 93 + }, + "end": { + "line": 68, + "column": 97 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1484, + "end": 1617, + "loc": { + "start": { + "line": 68, + "column": 99 + }, + "end": { + "line": 72, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1494, + "end": 1611, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1494, + "end": 1610, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1494, + "end": 1604, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1494, + "end": 1584, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1494, + "end": 1566, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 1494, + "end": 1558, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1494, + "end": 1550, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1494, + "end": 1534, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 69, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 1494, + "end": 1500, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 69, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1501, + "end": 1533, + "loc": { + "start": { + "line": 69, + "column": 15 + }, + "end": { + "line": 69, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1505, + "end": 1515, + "loc": { + "start": { + "line": 69, + "column": 19 + }, + "end": { + "line": 69, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1516, + "end": 1532, + "loc": { + "start": { + "line": 69, + "column": 30 + }, + "end": { + "line": 69, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 1518, + "end": 1530, + "loc": { + "start": { + "line": 69, + "column": 32 + }, + "end": { + "line": 69, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1518, + "end": 1522, + "loc": { + "start": { + "line": 69, + "column": 32 + }, + "end": { + "line": 69, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1524, + "end": 1530, + "loc": { + "start": { + "line": 69, + "column": 38 + }, + "end": { + "line": 69, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 70, + "column": 13 + }, + "end": { + "line": 70, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 70, + "column": 16 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "name": "exactly" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1559, + "end": 1566, + "loc": { + "start": { + "line": 70, + "column": 24 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1567, + "end": 1583, + "loc": { + "start": { + "line": 70, + "column": 32 + }, + "end": { + "line": 70, + "column": 48 + } + }, + "properties": [ + { + "type": "Property", + "start": 1569, + "end": 1581, + "loc": { + "start": { + "line": 70, + "column": 34 + }, + "end": { + "line": 70, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1569, + "end": 1573, + "loc": { + "start": { + "line": 70, + "column": 34 + }, + "end": { + "line": 70, + "column": 38 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1575, + "end": 1581, + "loc": { + "start": { + "line": 70, + "column": 40 + }, + "end": { + "line": 70, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1598, + "end": 1604, + "loc": { + "start": { + "line": 71, + "column": 13 + }, + "end": { + "line": 71, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1605, + "end": 1609, + "loc": { + "start": { + "line": 71, + "column": 20 + }, + "end": { + "line": 71, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1625, + "end": 1863, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 78, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1625, + "end": 1862, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 78, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1625, + "end": 1627, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 74, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1628, + "end": 1711, + "loc": { + "start": { + "line": 74, + "column": 7 + }, + "end": { + "line": 74, + "column": 90 + } + }, + "value": "uses the produce assertion with a readstream, matching on strict equality - part2", + "rawValue": "uses the produce assertion with a readstream, matching on strict equality - part2", + "raw": "\"uses the produce assertion with a readstream, matching on strict equality - part2\"" + }, + { + "type": "FunctionExpression", + "start": 1713, + "end": 1861, + "loc": { + "start": { + "line": 74, + "column": 92 + }, + "end": { + "line": 78, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1722, + "end": 1726, + "loc": { + "start": { + "line": 74, + "column": 101 + }, + "end": { + "line": 74, + "column": 105 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1728, + "end": 1861, + "loc": { + "start": { + "line": 74, + "column": 107 + }, + "end": { + "line": 78, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1738, + "end": 1855, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1738, + "end": 1854, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1738, + "end": 1848, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1738, + "end": 1828, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1738, + "end": 1810, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 1738, + "end": 1802, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1738, + "end": 1794, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1738, + "end": 1778, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 75, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 1738, + "end": 1744, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 75, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1745, + "end": 1777, + "loc": { + "start": { + "line": 75, + "column": 15 + }, + "end": { + "line": 75, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1749, + "end": 1759, + "loc": { + "start": { + "line": 75, + "column": 19 + }, + "end": { + "line": 75, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1760, + "end": 1776, + "loc": { + "start": { + "line": 75, + "column": 30 + }, + "end": { + "line": 75, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 1762, + "end": 1774, + "loc": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1762, + "end": 1766, + "loc": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1768, + "end": 1774, + "loc": { + "start": { + "line": 75, + "column": 38 + }, + "end": { + "line": 75, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1792, + "end": 1794, + "loc": { + "start": { + "line": 76, + "column": 13 + }, + "end": { + "line": 76, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1795, + "end": 1802, + "loc": { + "start": { + "line": 76, + "column": 16 + }, + "end": { + "line": 76, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1803, + "end": 1810, + "loc": { + "start": { + "line": 76, + "column": 24 + }, + "end": { + "line": 76, + "column": 31 + } + }, + "name": "exactly" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1811, + "end": 1827, + "loc": { + "start": { + "line": 76, + "column": 32 + }, + "end": { + "line": 76, + "column": 48 + } + }, + "properties": [ + { + "type": "Property", + "start": 1813, + "end": 1825, + "loc": { + "start": { + "line": 76, + "column": 34 + }, + "end": { + "line": 76, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1813, + "end": 1817, + "loc": { + "start": { + "line": 76, + "column": 34 + }, + "end": { + "line": 76, + "column": 38 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1819, + "end": 1825, + "loc": { + "start": { + "line": 76, + "column": 40 + }, + "end": { + "line": 76, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1842, + "end": 1848, + "loc": { + "start": { + "line": 77, + "column": 13 + }, + "end": { + "line": 77, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1849, + "end": 1853, + "loc": { + "start": { + "line": 77, + "column": 20 + }, + "end": { + "line": 77, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1869, + "end": 2109, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 84, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1869, + "end": 2108, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 84, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1869, + "end": 1871, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 80, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1872, + "end": 1948, + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 83 + } + }, + "value": "uses the produce assertion with a readstream, containing at least key test", + "rawValue": "uses the produce assertion with a readstream, containing at least key test", + "raw": "\"uses the produce assertion with a readstream, containing at least key test\"" + }, + { + "type": "FunctionExpression", + "start": 1950, + "end": 2107, + "loc": { + "start": { + "line": 80, + "column": 85 + }, + "end": { + "line": 84, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1959, + "end": 1963, + "loc": { + "start": { + "line": 80, + "column": 94 + }, + "end": { + "line": 80, + "column": 98 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1965, + "end": 2107, + "loc": { + "start": { + "line": 80, + "column": 100 + }, + "end": { + "line": 84, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1975, + "end": 2101, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1975, + "end": 2100, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1975, + "end": 2094, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1975, + "end": 2074, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 41 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1975, + "end": 2056, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1975, + "end": 2048, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1975, + "end": 2032, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 65 + } + }, + "callee": { + "type": "Identifier", + "start": 1975, + "end": 1981, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1982, + "end": 2031, + "loc": { + "start": { + "line": 81, + "column": 15 + }, + "end": { + "line": 81, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1986, + "end": 1996, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1997, + "end": 2030, + "loc": { + "start": { + "line": 81, + "column": 30 + }, + "end": { + "line": 81, + "column": 63 + } + }, + "properties": [ + { + "type": "Property", + "start": 1999, + "end": 2011, + "loc": { + "start": { + "line": 81, + "column": 32 + }, + "end": { + "line": 81, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1999, + "end": 2003, + "loc": { + "start": { + "line": 81, + "column": 32 + }, + "end": { + "line": 81, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2005, + "end": 2011, + "loc": { + "start": { + "line": 81, + "column": 38 + }, + "end": { + "line": 81, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 2013, + "end": 2028, + "loc": { + "start": { + "line": 81, + "column": 46 + }, + "end": { + "line": 81, + "column": 61 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2013, + "end": 2020, + "loc": { + "start": { + "line": 81, + "column": 46 + }, + "end": { + "line": 81, + "column": 53 + } + }, + "name": "another" + }, + "value": { + "type": "Literal", + "start": 2022, + "end": 2028, + "loc": { + "start": { + "line": 81, + "column": 55 + }, + "end": { + "line": 81, + "column": 61 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2046, + "end": 2048, + "loc": { + "start": { + "line": 82, + "column": 13 + }, + "end": { + "line": 82, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2049, + "end": 2056, + "loc": { + "start": { + "line": 82, + "column": 16 + }, + "end": { + "line": 82, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2057, + "end": 2073, + "loc": { + "start": { + "line": 82, + "column": 24 + }, + "end": { + "line": 82, + "column": 40 + } + }, + "properties": [ + { + "type": "Property", + "start": 2059, + "end": 2071, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 38 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 30 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2065, + "end": 2071, + "loc": { + "start": { + "line": 82, + "column": 32 + }, + "end": { + "line": 82, + "column": 38 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2088, + "end": 2094, + "loc": { + "start": { + "line": 83, + "column": 13 + }, + "end": { + "line": 83, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 2095, + "end": 2099, + "loc": { + "start": { + "line": 83, + "column": 20 + }, + "end": { + "line": 83, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2115, + "end": 2410, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 90, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2115, + "end": 2409, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 90, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2115, + "end": 2117, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 86, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2118, + "end": 2194, + "loc": { + "start": { + "line": 86, + "column": 7 + }, + "end": { + "line": 86, + "column": 83 + } + }, + "value": "uses the produce assertion with a readstream, containing at least key test", + "rawValue": "uses the produce assertion with a readstream, containing at least key test", + "raw": "\"uses the produce assertion with a readstream, containing at least key test\"" + }, + { + "type": "FunctionExpression", + "start": 2196, + "end": 2408, + "loc": { + "start": { + "line": 86, + "column": 85 + }, + "end": { + "line": 90, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2205, + "end": 2209, + "loc": { + "start": { + "line": 86, + "column": 94 + }, + "end": { + "line": 86, + "column": 98 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2211, + "end": 2408, + "loc": { + "start": { + "line": 86, + "column": 100 + }, + "end": { + "line": 90, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2221, + "end": 2402, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 81 + } + }, + "expression": { + "type": "CallExpression", + "start": 2221, + "end": 2401, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 80 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2221, + "end": 2340, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 2221, + "end": 2320, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2221, + "end": 2285, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 2221, + "end": 2277, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 2221, + "end": 2261, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 87, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 2221, + "end": 2227, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 87, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2228, + "end": 2260, + "loc": { + "start": { + "line": 87, + "column": 15 + }, + "end": { + "line": 87, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 2232, + "end": 2242, + "loc": { + "start": { + "line": 87, + "column": 19 + }, + "end": { + "line": 87, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2243, + "end": 2259, + "loc": { + "start": { + "line": 87, + "column": 30 + }, + "end": { + "line": 87, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 2245, + "end": 2257, + "loc": { + "start": { + "line": 87, + "column": 32 + }, + "end": { + "line": 87, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2245, + "end": 2249, + "loc": { + "start": { + "line": 87, + "column": 32 + }, + "end": { + "line": 87, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2251, + "end": 2257, + "loc": { + "start": { + "line": 87, + "column": 38 + }, + "end": { + "line": 87, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2275, + "end": 2277, + "loc": { + "start": { + "line": 88, + "column": 13 + }, + "end": { + "line": 88, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2278, + "end": 2285, + "loc": { + "start": { + "line": 88, + "column": 16 + }, + "end": { + "line": 88, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2286, + "end": 2319, + "loc": { + "start": { + "line": 88, + "column": 24 + }, + "end": { + "line": 88, + "column": 57 + } + }, + "properties": [ + { + "type": "Property", + "start": 2288, + "end": 2300, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 38 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2288, + "end": 2292, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 30 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2294, + "end": 2300, + "loc": { + "start": { + "line": 88, + "column": 32 + }, + "end": { + "line": 88, + "column": 38 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 2302, + "end": 2317, + "loc": { + "start": { + "line": 88, + "column": 40 + }, + "end": { + "line": 88, + "column": 55 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2302, + "end": 2309, + "loc": { + "start": { + "line": 88, + "column": 40 + }, + "end": { + "line": 88, + "column": 47 + } + }, + "name": "another" + }, + "value": { + "type": "Literal", + "start": 2311, + "end": 2317, + "loc": { + "start": { + "line": 88, + "column": 49 + }, + "end": { + "line": 88, + "column": 55 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2334, + "end": 2340, + "loc": { + "start": { + "line": 89, + "column": 13 + }, + "end": { + "line": 89, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2341, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 20 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2341, + "end": 2342, + "loc": { + "start": { + "line": 89, + "column": 20 + }, + "end": { + "line": 89, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2346, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 25 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "test": { + "type": "Identifier", + "start": 2346, + "end": 2347, + "loc": { + "start": { + "line": 89, + "column": 25 + }, + "end": { + "line": 89, + "column": 26 + } + }, + "name": "e" + }, + "consequent": { + "type": "CallExpression", + "start": 2350, + "end": 2356, + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 2350, + "end": 2354, + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 33 + } + }, + "name": "done" + }, + "arguments": [] + }, + "alternate": { + "type": "CallExpression", + "start": 2359, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 38 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "callee": { + "type": "Identifier", + "start": 2359, + "end": 2363, + "loc": { + "start": { + "line": 89, + "column": 38 + }, + "end": { + "line": 89, + "column": 42 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2364, + "end": 2399, + "loc": { + "start": { + "line": 89, + "column": 43 + }, + "end": { + "line": 89, + "column": 78 + } + }, + "callee": { + "type": "Identifier", + "start": 2368, + "end": 2373, + "loc": { + "start": { + "line": 89, + "column": 47 + }, + "end": { + "line": 89, + "column": 52 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 2374, + "end": 2398, + "loc": { + "start": { + "line": 89, + "column": 53 + }, + "end": { + "line": 89, + "column": 77 + } + }, + "value": "Shouldn't end up here.", + "rawValue": "Shouldn't end up here.", + "raw": "\"Shouldn't end up here.\"" + } + ] + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2416, + "end": 3008, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 108, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2416, + "end": 3007, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 108, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2416, + "end": 2418, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 92, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2419, + "end": 2493, + "loc": { + "start": { + "line": 92, + "column": 7 + }, + "end": { + "line": 92, + "column": 81 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly and fails", + "rawValue": "uses the produce assertion with a readstream, matching exactly and fails", + "raw": "\"uses the produce assertion with a readstream, matching exactly and fails\"" + }, + { + "type": "FunctionExpression", + "start": 2495, + "end": 3006, + "loc": { + "start": { + "line": 92, + "column": 83 + }, + "end": { + "line": 108, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2504, + "end": 2508, + "loc": { + "start": { + "line": 92, + "column": 92 + }, + "end": { + "line": 92, + "column": 96 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2510, + "end": 3006, + "loc": { + "start": { + "line": 92, + "column": 98 + }, + "end": { + "line": 108, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2520, + "end": 2578, + "loc": { + "start": { + "line": 93, + "column": 8 + }, + "end": { + "line": 93, + "column": 66 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2526, + "end": 2577, + "loc": { + "start": { + "line": 93, + "column": 14 + }, + "end": { + "line": 93, + "column": 65 + } + }, + "id": { + "type": "Identifier", + "start": 2526, + "end": 2532, + "loc": { + "start": { + "line": 93, + "column": 14 + }, + "end": { + "line": 93, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2535, + "end": 2577, + "loc": { + "start": { + "line": 93, + "column": 23 + }, + "end": { + "line": 93, + "column": 65 + } + }, + "callee": { + "type": "Identifier", + "start": 2539, + "end": 2549, + "loc": { + "start": { + "line": 93, + "column": 27 + }, + "end": { + "line": 93, + "column": 37 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2550, + "end": 2576, + "loc": { + "start": { + "line": 93, + "column": 38 + }, + "end": { + "line": 93, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2551, + "end": 2558, + "loc": { + "start": { + "line": 93, + "column": 39 + }, + "end": { + "line": 93, + "column": 46 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 2560, + "end": 2566, + "loc": { + "start": { + "line": 93, + "column": 48 + }, + "end": { + "line": 93, + "column": 54 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 2568, + "end": 2575, + "loc": { + "start": { + "line": 93, + "column": 56 + }, + "end": { + "line": 93, + "column": 63 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2588, + "end": 3000, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 107, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 2588, + "end": 2999, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 107, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2588, + "end": 2675, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 97, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 2588, + "end": 2655, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2588, + "end": 2626, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 2588, + "end": 2618, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 2588, + "end": 2602, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 22 + } + }, + "callee": { + "type": "Identifier", + "start": 2588, + "end": 2594, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2595, + "end": 2601, + "loc": { + "start": { + "line": 95, + "column": 15 + }, + "end": { + "line": 95, + "column": 21 + } + }, + "name": "stream" + } + ] + }, + "property": { + "type": "Identifier", + "start": 2616, + "end": 2618, + "loc": { + "start": { + "line": 96, + "column": 13 + }, + "end": { + "line": 96, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2619, + "end": 2626, + "loc": { + "start": { + "line": 96, + "column": 16 + }, + "end": { + "line": 96, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2627, + "end": 2654, + "loc": { + "start": { + "line": 96, + "column": 24 + }, + "end": { + "line": 96, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2628, + "end": 2635, + "loc": { + "start": { + "line": 96, + "column": 25 + }, + "end": { + "line": 96, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 2637, + "end": 2644, + "loc": { + "start": { + "line": 96, + "column": 34 + }, + "end": { + "line": 96, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 2646, + "end": 2653, + "loc": { + "start": { + "line": 96, + "column": 43 + }, + "end": { + "line": 96, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2669, + "end": 2675, + "loc": { + "start": { + "line": 97, + "column": 13 + }, + "end": { + "line": 97, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2676, + "end": 2998, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 107, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2676, + "end": 2677, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 97, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 2681, + "end": 2998, + "loc": { + "start": { + "line": 97, + "column": 25 + }, + "end": { + "line": 107, + "column": 13 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 2699, + "end": 2744, + "loc": { + "start": { + "line": 98, + "column": 16 + }, + "end": { + "line": 98, + "column": 61 + } + }, + "test": { + "type": "UnaryExpression", + "start": 2702, + "end": 2704, + "loc": { + "start": { + "line": 98, + "column": 19 + }, + "end": { + "line": 98, + "column": 21 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2703, + "end": 2704, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 21 + } + }, + "name": "e" + } + }, + "consequent": { + "type": "ReturnStatement", + "start": 2706, + "end": 2744, + "loc": { + "start": { + "line": 98, + "column": 23 + }, + "end": { + "line": 98, + "column": 61 + } + }, + "argument": { + "type": "CallExpression", + "start": 2713, + "end": 2743, + "loc": { + "start": { + "line": 98, + "column": 30 + }, + "end": { + "line": 98, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 2713, + "end": 2717, + "loc": { + "start": { + "line": 98, + "column": 30 + }, + "end": { + "line": 98, + "column": 34 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2718, + "end": 2742, + "loc": { + "start": { + "line": 98, + "column": 35 + }, + "end": { + "line": 98, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2722, + "end": 2727, + "loc": { + "start": { + "line": 98, + "column": 39 + }, + "end": { + "line": 98, + "column": 44 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 2728, + "end": 2741, + "loc": { + "start": { + "line": 98, + "column": 45 + }, + "end": { + "line": 98, + "column": 58 + } + }, + "value": "Should fail", + "rawValue": "Should fail", + "raw": "\"Should fail\"" + } + ] + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 2762, + "end": 2984, + "loc": { + "start": { + "line": 100, + "column": 16 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 2766, + "end": 2917, + "loc": { + "start": { + "line": 100, + "column": 20 + }, + "end": { + "line": 104, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2788, + "end": 2840, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 2788, + "end": 2839, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2788, + "end": 2832, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 2788, + "end": 2826, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 2788, + "end": 2823, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 2788, + "end": 2794, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2795, + "end": 2822, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 2795, + "end": 2816, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 48 + } + }, + "object": { + "type": "Identifier", + "start": 2795, + "end": 2801, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 33 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2802, + "end": 2816, + "loc": { + "start": { + "line": 101, + "column": 34 + }, + "end": { + "line": 101, + "column": 48 + } + }, + "name": "_readableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2817, + "end": 2822, + "loc": { + "start": { + "line": 101, + "column": 49 + }, + "end": { + "line": 101, + "column": 54 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2824, + "end": 2826, + "loc": { + "start": { + "line": 101, + "column": 56 + }, + "end": { + "line": 101, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2827, + "end": 2832, + "loc": { + "start": { + "line": 101, + "column": 59 + }, + "end": { + "line": 101, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2833, + "end": 2838, + "loc": { + "start": { + "line": 101, + "column": 65 + }, + "end": { + "line": 101, + "column": 70 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2841, + "end": 2863, + "loc": { + "start": { + "line": 101, + "column": 73 + }, + "end": { + "line": 101, + "column": 95 + } + }, + "range": [ + 2841, + 2863 + ] + } + ] + }, + { + "type": "ReturnStatement", + "start": 2885, + "end": 2899, + "loc": { + "start": { + "line": 103, + "column": 20 + }, + "end": { + "line": 103, + "column": 34 + } + }, + "argument": { + "type": "CallExpression", + "start": 2892, + "end": 2898, + "loc": { + "start": { + "line": 103, + "column": 27 + }, + "end": { + "line": 103, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 2892, + "end": 2896, + "loc": { + "start": { + "line": 103, + "column": 27 + }, + "end": { + "line": 103, + "column": 31 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2841, + "end": 2863, + "loc": { + "start": { + "line": 101, + "column": 73 + }, + "end": { + "line": 101, + "column": 95 + } + }, + "range": [ + 2841, + 2863 + ] + } + ] + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 2918, + "end": 2984, + "loc": { + "start": { + "line": 104, + "column": 18 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 2924, + "end": 2926, + "loc": { + "start": { + "line": 104, + "column": 24 + }, + "end": { + "line": 104, + "column": 26 + } + }, + "name": "e2" + }, + "body": { + "type": "BlockStatement", + "start": 2928, + "end": 2984, + "loc": { + "start": { + "line": 104, + "column": 28 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 2950, + "end": 2966, + "loc": { + "start": { + "line": 105, + "column": 20 + }, + "end": { + "line": 105, + "column": 36 + } + }, + "argument": { + "type": "CallExpression", + "start": 2957, + "end": 2965, + "loc": { + "start": { + "line": 105, + "column": 27 + }, + "end": { + "line": 105, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 2957, + "end": 2961, + "loc": { + "start": { + "line": 105, + "column": 27 + }, + "end": { + "line": 105, + "column": 31 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2962, + "end": 2964, + "loc": { + "start": { + "line": 105, + "column": 32 + }, + "end": { + "line": 105, + "column": 34 + } + }, + "name": "e2" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3014, + "end": 3596, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 126, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3014, + "end": 3595, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 126, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3014, + "end": 3016, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 110, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3017, + "end": 3085, + "loc": { + "start": { + "line": 110, + "column": 7 + }, + "end": { + "line": 110, + "column": 75 + } + }, + "value": "uses the produce assertion with a readstream, matching not exactly", + "rawValue": "uses the produce assertion with a readstream, matching not exactly", + "raw": "\"uses the produce assertion with a readstream, matching not exactly\"" + }, + { + "type": "FunctionExpression", + "start": 3087, + "end": 3594, + "loc": { + "start": { + "line": 110, + "column": 77 + }, + "end": { + "line": 126, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3096, + "end": 3100, + "loc": { + "start": { + "line": 110, + "column": 86 + }, + "end": { + "line": 110, + "column": 90 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3102, + "end": 3594, + "loc": { + "start": { + "line": 110, + "column": 92 + }, + "end": { + "line": 126, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 3112, + "end": 3179, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 75 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3118, + "end": 3178, + "loc": { + "start": { + "line": 111, + "column": 14 + }, + "end": { + "line": 111, + "column": 74 + } + }, + "id": { + "type": "Identifier", + "start": 3118, + "end": 3124, + "loc": { + "start": { + "line": 111, + "column": 14 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 3127, + "end": 3178, + "loc": { + "start": { + "line": 111, + "column": 23 + }, + "end": { + "line": 111, + "column": 74 + } + }, + "callee": { + "type": "Identifier", + "start": 3131, + "end": 3141, + "loc": { + "start": { + "line": 111, + "column": 27 + }, + "end": { + "line": 111, + "column": 37 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3142, + "end": 3177, + "loc": { + "start": { + "line": 111, + "column": 38 + }, + "end": { + "line": 111, + "column": 73 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3143, + "end": 3150, + "loc": { + "start": { + "line": 111, + "column": 39 + }, + "end": { + "line": 111, + "column": 46 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3152, + "end": 3158, + "loc": { + "start": { + "line": 111, + "column": 48 + }, + "end": { + "line": 111, + "column": 54 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 3160, + "end": 3167, + "loc": { + "start": { + "line": 111, + "column": 56 + }, + "end": { + "line": 111, + "column": 63 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3169, + "end": 3176, + "loc": { + "start": { + "line": 111, + "column": 65 + }, + "end": { + "line": 111, + "column": 72 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3189, + "end": 3588, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 125, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 3189, + "end": 3587, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 125, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3189, + "end": 3287, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 115, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3189, + "end": 3267, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3189, + "end": 3238, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 3189, + "end": 3230, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 3189, + "end": 3219, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 3189, + "end": 3203, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 113, + "column": 22 + } + }, + "callee": { + "type": "Identifier", + "start": 3189, + "end": 3195, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 113, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3196, + "end": 3202, + "loc": { + "start": { + "line": 113, + "column": 15 + }, + "end": { + "line": 113, + "column": 21 + } + }, + "name": "stream" + } + ] + }, + "property": { + "type": "Identifier", + "start": 3217, + "end": 3219, + "loc": { + "start": { + "line": 114, + "column": 13 + }, + "end": { + "line": 114, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3220, + "end": 3230, + "loc": { + "start": { + "line": 114, + "column": 16 + }, + "end": { + "line": 114, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3231, + "end": 3238, + "loc": { + "start": { + "line": 114, + "column": 27 + }, + "end": { + "line": 114, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3239, + "end": 3266, + "loc": { + "start": { + "line": 114, + "column": 35 + }, + "end": { + "line": 114, + "column": 62 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3240, + "end": 3247, + "loc": { + "start": { + "line": 114, + "column": 36 + }, + "end": { + "line": 114, + "column": 43 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3249, + "end": 3256, + "loc": { + "start": { + "line": 114, + "column": 45 + }, + "end": { + "line": 114, + "column": 52 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3258, + "end": 3265, + "loc": { + "start": { + "line": 114, + "column": 54 + }, + "end": { + "line": 114, + "column": 61 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3281, + "end": 3287, + "loc": { + "start": { + "line": 115, + "column": 13 + }, + "end": { + "line": 115, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 3288, + "end": 3586, + "loc": { + "start": { + "line": 115, + "column": 20 + }, + "end": { + "line": 125, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3288, + "end": 3289, + "loc": { + "start": { + "line": 115, + "column": 20 + }, + "end": { + "line": 115, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 3293, + "end": 3586, + "loc": { + "start": { + "line": 115, + "column": 25 + }, + "end": { + "line": 125, + "column": 13 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 3311, + "end": 3332, + "loc": { + "start": { + "line": 116, + "column": 16 + }, + "end": { + "line": 116, + "column": 37 + } + }, + "test": { + "type": "Identifier", + "start": 3314, + "end": 3315, + "loc": { + "start": { + "line": 116, + "column": 19 + }, + "end": { + "line": 116, + "column": 20 + } + }, + "name": "e" + }, + "consequent": { + "type": "ReturnStatement", + "start": 3317, + "end": 3332, + "loc": { + "start": { + "line": 116, + "column": 22 + }, + "end": { + "line": 116, + "column": 37 + } + }, + "argument": { + "type": "CallExpression", + "start": 3324, + "end": 3331, + "loc": { + "start": { + "line": 116, + "column": 29 + }, + "end": { + "line": 116, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 3324, + "end": 3328, + "loc": { + "start": { + "line": 116, + "column": 29 + }, + "end": { + "line": 116, + "column": 33 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3329, + "end": 3330, + "loc": { + "start": { + "line": 116, + "column": 34 + }, + "end": { + "line": 116, + "column": 35 + } + }, + "name": "e" + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 3350, + "end": 3572, + "loc": { + "start": { + "line": 118, + "column": 16 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 3354, + "end": 3505, + "loc": { + "start": { + "line": 118, + "column": 20 + }, + "end": { + "line": 122, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3376, + "end": 3428, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 3376, + "end": 3427, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3376, + "end": 3420, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 3376, + "end": 3414, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 3376, + "end": 3411, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 3376, + "end": 3382, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3383, + "end": 3410, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 3383, + "end": 3404, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 48 + } + }, + "object": { + "type": "Identifier", + "start": 3383, + "end": 3389, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 33 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3390, + "end": 3404, + "loc": { + "start": { + "line": 119, + "column": 34 + }, + "end": { + "line": 119, + "column": 48 + } + }, + "name": "_readableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3405, + "end": 3410, + "loc": { + "start": { + "line": 119, + "column": 49 + }, + "end": { + "line": 119, + "column": 54 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3412, + "end": 3414, + "loc": { + "start": { + "line": 119, + "column": 56 + }, + "end": { + "line": 119, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3415, + "end": 3420, + "loc": { + "start": { + "line": 119, + "column": 59 + }, + "end": { + "line": 119, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3421, + "end": 3426, + "loc": { + "start": { + "line": 119, + "column": 65 + }, + "end": { + "line": 119, + "column": 70 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3429, + "end": 3451, + "loc": { + "start": { + "line": 119, + "column": 73 + }, + "end": { + "line": 119, + "column": 95 + } + }, + "range": [ + 3429, + 3451 + ] + } + ] + }, + { + "type": "ReturnStatement", + "start": 3473, + "end": 3487, + "loc": { + "start": { + "line": 121, + "column": 20 + }, + "end": { + "line": 121, + "column": 34 + } + }, + "argument": { + "type": "CallExpression", + "start": 3480, + "end": 3486, + "loc": { + "start": { + "line": 121, + "column": 27 + }, + "end": { + "line": 121, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 3480, + "end": 3484, + "loc": { + "start": { + "line": 121, + "column": 27 + }, + "end": { + "line": 121, + "column": 31 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3429, + "end": 3451, + "loc": { + "start": { + "line": 119, + "column": 73 + }, + "end": { + "line": 119, + "column": 95 + } + }, + "range": [ + 3429, + 3451 + ] + } + ] + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 3506, + "end": 3572, + "loc": { + "start": { + "line": 122, + "column": 18 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 3512, + "end": 3514, + "loc": { + "start": { + "line": 122, + "column": 24 + }, + "end": { + "line": 122, + "column": 26 + } + }, + "name": "e2" + }, + "body": { + "type": "BlockStatement", + "start": 3516, + "end": 3572, + "loc": { + "start": { + "line": 122, + "column": 28 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 3538, + "end": 3554, + "loc": { + "start": { + "line": 123, + "column": 20 + }, + "end": { + "line": 123, + "column": 36 + } + }, + "argument": { + "type": "CallExpression", + "start": 3545, + "end": 3553, + "loc": { + "start": { + "line": 123, + "column": 27 + }, + "end": { + "line": 123, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 3545, + "end": 3549, + "loc": { + "start": { + "line": 123, + "column": 27 + }, + "end": { + "line": 123, + "column": 31 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3550, + "end": 3552, + "loc": { + "start": { + "line": 123, + "column": 32 + }, + "end": { + "line": 123, + "column": 34 + } + }, + "name": "e2" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3602, + "end": 3919, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 133, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3602, + "end": 3918, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 133, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3602, + "end": 3604, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 128, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3605, + "end": 3698, + "loc": { + "start": { + "line": 128, + "column": 7 + }, + "end": { + "line": 128, + "column": 100 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly, but filtering some messages", + "rawValue": "uses the produce assertion with a readstream, matching exactly, but filtering some messages", + "raw": "\"uses the produce assertion with a readstream, matching exactly, but filtering some messages\"" + }, + { + "type": "FunctionExpression", + "start": 3700, + "end": 3917, + "loc": { + "start": { + "line": 128, + "column": 102 + }, + "end": { + "line": 133, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3709, + "end": 3713, + "loc": { + "start": { + "line": 128, + "column": 111 + }, + "end": { + "line": 128, + "column": 115 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3715, + "end": 3917, + "loc": { + "start": { + "line": 128, + "column": 117 + }, + "end": { + "line": 133, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3725, + "end": 3911, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 3725, + "end": 3910, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3904, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3884, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3855, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 3725, + "end": 3847, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3831, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 130, + "column": 46 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3804, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 130, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3784, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 129, + "column": 67 + } + }, + "callee": { + "type": "Identifier", + "start": 3725, + "end": 3731, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 129, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 3732, + "end": 3783, + "loc": { + "start": { + "line": 129, + "column": 15 + }, + "end": { + "line": 129, + "column": 66 + } + }, + "callee": { + "type": "Identifier", + "start": 3736, + "end": 3746, + "loc": { + "start": { + "line": 129, + "column": 19 + }, + "end": { + "line": 129, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3747, + "end": 3782, + "loc": { + "start": { + "line": 129, + "column": 30 + }, + "end": { + "line": 129, + "column": 65 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3748, + "end": 3755, + "loc": { + "start": { + "line": 129, + "column": 31 + }, + "end": { + "line": 129, + "column": 38 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3757, + "end": 3763, + "loc": { + "start": { + "line": 129, + "column": 40 + }, + "end": { + "line": 129, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 3765, + "end": 3772, + "loc": { + "start": { + "line": 129, + "column": 48 + }, + "end": { + "line": 129, + "column": 55 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3774, + "end": 3781, + "loc": { + "start": { + "line": 129, + "column": 57 + }, + "end": { + "line": 129, + "column": 64 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3798, + "end": 3804, + "loc": { + "start": { + "line": 130, + "column": 13 + }, + "end": { + "line": 130, + "column": 19 + } + }, + "name": "filter" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 3805, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 20 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3805, + "end": 3810, + "loc": { + "start": { + "line": 130, + "column": 20 + }, + "end": { + "line": 130, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 3814, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 29 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "left": { + "type": "Identifier", + "start": 3814, + "end": 3819, + "loc": { + "start": { + "line": 130, + "column": 29 + }, + "end": { + "line": 130, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 3824, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 39 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + } + } + ] + }, + "property": { + "type": "Identifier", + "start": 3845, + "end": 3847, + "loc": { + "start": { + "line": 131, + "column": 13 + }, + "end": { + "line": 131, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3848, + "end": 3855, + "loc": { + "start": { + "line": 131, + "column": 16 + }, + "end": { + "line": 131, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3856, + "end": 3883, + "loc": { + "start": { + "line": 131, + "column": 24 + }, + "end": { + "line": 131, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3857, + "end": 3864, + "loc": { + "start": { + "line": 131, + "column": 25 + }, + "end": { + "line": 131, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3866, + "end": 3873, + "loc": { + "start": { + "line": 131, + "column": 34 + }, + "end": { + "line": 131, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3875, + "end": 3882, + "loc": { + "start": { + "line": 131, + "column": 43 + }, + "end": { + "line": 131, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3898, + "end": 3904, + "loc": { + "start": { + "line": 132, + "column": 13 + }, + "end": { + "line": 132, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 3905, + "end": 3909, + "loc": { + "start": { + "line": 132, + "column": 20 + }, + "end": { + "line": 132, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3925, + "end": 4108, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 137, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3925, + "end": 4107, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 137, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3925, + "end": 3927, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 135, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3928, + "end": 4005, + "loc": { + "start": { + "line": 135, + "column": 7 + }, + "end": { + "line": 135, + "column": 84 + } + }, + "value": "uses the eventually produce assertion with a readstream, producing buffers.", + "rawValue": "uses the eventually produce assertion with a readstream, producing buffers.", + "raw": "\"uses the eventually produce assertion with a readstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4007, + "end": 4106, + "loc": { + "start": { + "line": 135, + "column": 86 + }, + "end": { + "line": 137, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4016, + "end": 4020, + "loc": { + "start": { + "line": 135, + "column": 95 + }, + "end": { + "line": 135, + "column": 99 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4022, + "end": 4106, + "loc": { + "start": { + "line": 135, + "column": 101 + }, + "end": { + "line": 137, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4032, + "end": 4100, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 76 + } + }, + "expression": { + "type": "CallExpression", + "start": 4032, + "end": 4099, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 75 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4032, + "end": 4093, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 4032, + "end": 4086, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4032, + "end": 4078, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4032, + "end": 4070, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4032, + "end": 4059, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4032, + "end": 4056, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4032, + "end": 4038, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4039, + "end": 4055, + "loc": { + "start": { + "line": 136, + "column": 15 + }, + "end": { + "line": 136, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4043, + "end": 4053, + "loc": { + "start": { + "line": 136, + "column": 19 + }, + "end": { + "line": 136, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4057, + "end": 4059, + "loc": { + "start": { + "line": 136, + "column": 33 + }, + "end": { + "line": 136, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4060, + "end": 4070, + "loc": { + "start": { + "line": 136, + "column": 36 + }, + "end": { + "line": 136, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4071, + "end": 4078, + "loc": { + "start": { + "line": 136, + "column": 47 + }, + "end": { + "line": 136, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4079, + "end": 4085, + "loc": { + "start": { + "line": 136, + "column": 55 + }, + "end": { + "line": 136, + "column": 61 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 4087, + "end": 4093, + "loc": { + "start": { + "line": 136, + "column": 63 + }, + "end": { + "line": 136, + "column": 69 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 4094, + "end": 4098, + "loc": { + "start": { + "line": 136, + "column": 70 + }, + "end": { + "line": 136, + "column": 74 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4114, + "end": 4356, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 145, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4114, + "end": 4355, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 145, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4114, + "end": 4116, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 139, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4117, + "end": 4183, + "loc": { + "start": { + "line": 139, + "column": 7 + }, + "end": { + "line": 139, + "column": 73 + } + }, + "value": "uses the produce assertion with a readstream, producing objects.", + "rawValue": "uses the produce assertion with a readstream, producing objects.", + "raw": "\"uses the produce assertion with a readstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 4185, + "end": 4354, + "loc": { + "start": { + "line": 139, + "column": 75 + }, + "end": { + "line": 145, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4194, + "end": 4198, + "loc": { + "start": { + "line": 139, + "column": 84 + }, + "end": { + "line": 139, + "column": 88 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4200, + "end": 4354, + "loc": { + "start": { + "line": 139, + "column": 90 + }, + "end": { + "line": 145, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4210, + "end": 4348, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 24 + } + }, + "expression": { + "type": "CallExpression", + "start": 4210, + "end": 4347, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 23 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4210, + "end": 4341, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 4210, + "end": 4334, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4210, + "end": 4262, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 60 + } + }, + "object": { + "type": "MemberExpression", + "start": 4210, + "end": 4254, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 4210, + "end": 4243, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 4210, + "end": 4240, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 4210, + "end": 4216, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4217, + "end": 4239, + "loc": { + "start": { + "line": 140, + "column": 15 + }, + "end": { + "line": 140, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 4221, + "end": 4237, + "loc": { + "start": { + "line": 140, + "column": 19 + }, + "end": { + "line": 140, + "column": 35 + } + }, + "name": "ReadObjectStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4241, + "end": 4243, + "loc": { + "start": { + "line": 140, + "column": 39 + }, + "end": { + "line": 140, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4244, + "end": 4254, + "loc": { + "start": { + "line": 140, + "column": 42 + }, + "end": { + "line": 140, + "column": 52 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4255, + "end": 4262, + "loc": { + "start": { + "line": 140, + "column": 53 + }, + "end": { + "line": 140, + "column": 60 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 4263, + "end": 4333, + "loc": { + "start": { + "line": 140, + "column": 61 + }, + "end": { + "line": 144, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 4277, + "end": 4323, + "loc": { + "start": { + "line": 141, + "column": 12 + }, + "end": { + "line": 143, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4277, + "end": 4281, + "loc": { + "start": { + "line": 141, + "column": 12 + }, + "end": { + "line": 141, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 4283, + "end": 4323, + "loc": { + "start": { + "line": 141, + "column": 18 + }, + "end": { + "line": 143, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 4301, + "end": 4309, + "loc": { + "start": { + "line": 142, + "column": 16 + }, + "end": { + "line": 142, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4301, + "end": 4305, + "loc": { + "start": { + "line": 142, + "column": 16 + }, + "end": { + "line": 142, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 4307, + "end": 4309, + "loc": { + "start": { + "line": 142, + "column": 22 + }, + "end": { + "line": 142, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4335, + "end": 4341, + "loc": { + "start": { + "line": 144, + "column": 11 + }, + "end": { + "line": 144, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 4342, + "end": 4346, + "loc": { + "start": { + "line": 144, + "column": 18 + }, + "end": { + "line": 144, + "column": 22 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4362, + "end": 4605, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 150, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4362, + "end": 4604, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 150, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4362, + "end": 4364, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 147, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4365, + "end": 4426, + "loc": { + "start": { + "line": 147, + "column": 7 + }, + "end": { + "line": 147, + "column": 68 + } + }, + "value": "fails the produce assertion on the readstream with buffers.", + "rawValue": "fails the produce assertion on the readstream with buffers.", + "raw": "\"fails the produce assertion on the readstream with buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4428, + "end": 4603, + "loc": { + "start": { + "line": 147, + "column": 70 + }, + "end": { + "line": 150, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4437, + "end": 4441, + "loc": { + "start": { + "line": 147, + "column": 79 + }, + "end": { + "line": 147, + "column": 83 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4443, + "end": 4603, + "loc": { + "start": { + "line": 147, + "column": 85 + }, + "end": { + "line": 150, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4453, + "end": 4559, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 114 + } + }, + "expression": { + "type": "CallExpression", + "start": 4453, + "end": 4558, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 113 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4453, + "end": 4514, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 4453, + "end": 4507, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4453, + "end": 4499, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4453, + "end": 4491, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4453, + "end": 4480, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4453, + "end": 4477, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4453, + "end": 4459, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4460, + "end": 4476, + "loc": { + "start": { + "line": 148, + "column": 15 + }, + "end": { + "line": 148, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4464, + "end": 4474, + "loc": { + "start": { + "line": 148, + "column": 19 + }, + "end": { + "line": 148, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4478, + "end": 4480, + "loc": { + "start": { + "line": 148, + "column": 33 + }, + "end": { + "line": 148, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4481, + "end": 4491, + "loc": { + "start": { + "line": 148, + "column": 36 + }, + "end": { + "line": 148, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4492, + "end": 4499, + "loc": { + "start": { + "line": 148, + "column": 47 + }, + "end": { + "line": 148, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4500, + "end": 4506, + "loc": { + "start": { + "line": 148, + "column": 55 + }, + "end": { + "line": 148, + "column": 61 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 4508, + "end": 4514, + "loc": { + "start": { + "line": 148, + "column": 63 + }, + "end": { + "line": 148, + "column": 69 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4515, + "end": 4557, + "loc": { + "start": { + "line": 148, + "column": 70 + }, + "end": { + "line": 148, + "column": 112 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4521, + "end": 4557, + "loc": { + "start": { + "line": 148, + "column": 76 + }, + "end": { + "line": 148, + "column": 112 + } + }, + "callee": { + "type": "Identifier", + "start": 4521, + "end": 4525, + "loc": { + "start": { + "line": 148, + "column": 76 + }, + "end": { + "line": 148, + "column": 80 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4526, + "end": 4556, + "loc": { + "start": { + "line": 148, + "column": 81 + }, + "end": { + "line": 148, + "column": 111 + } + }, + "callee": { + "type": "Identifier", + "start": 4530, + "end": 4535, + "loc": { + "start": { + "line": 148, + "column": 85 + }, + "end": { + "line": 148, + "column": 90 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 4536, + "end": 4555, + "loc": { + "start": { + "line": 148, + "column": 91 + }, + "end": { + "line": 148, + "column": 110 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4568, + "end": 4597, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 4568, + "end": 4596, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 4568, + "end": 4578, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4579, + "end": 4591, + "loc": { + "start": { + "line": 149, + "column": 19 + }, + "end": { + "line": 149, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4585, + "end": 4591, + "loc": { + "start": { + "line": 149, + "column": 25 + }, + "end": { + "line": 149, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4585, + "end": 4589, + "loc": { + "start": { + "line": 149, + "column": 25 + }, + "end": { + "line": 149, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 4593, + "end": 4595, + "loc": { + "start": { + "line": 149, + "column": 33 + }, + "end": { + "line": 149, + "column": 35 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4611, + "end": 4886, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 158, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4611, + "end": 4885, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 158, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4611, + "end": 4613, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 152, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4614, + "end": 4675, + "loc": { + "start": { + "line": 152, + "column": 7 + }, + "end": { + "line": 152, + "column": 68 + } + }, + "value": "fails the produce assertion on the readstream with objects.", + "rawValue": "fails the produce assertion on the readstream with objects.", + "raw": "\"fails the produce assertion on the readstream with objects.\"" + }, + { + "type": "FunctionExpression", + "start": 4677, + "end": 4884, + "loc": { + "start": { + "line": 152, + "column": 70 + }, + "end": { + "line": 158, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4686, + "end": 4690, + "loc": { + "start": { + "line": 152, + "column": 79 + }, + "end": { + "line": 152, + "column": 83 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4692, + "end": 4884, + "loc": { + "start": { + "line": 152, + "column": 85 + }, + "end": { + "line": 158, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4702, + "end": 4839, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 4702, + "end": 4838, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4702, + "end": 4794, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 4702, + "end": 4787, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4702, + "end": 4748, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4702, + "end": 4740, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4702, + "end": 4729, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4702, + "end": 4726, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4702, + "end": 4708, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4709, + "end": 4725, + "loc": { + "start": { + "line": 153, + "column": 15 + }, + "end": { + "line": 153, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4713, + "end": 4723, + "loc": { + "start": { + "line": 153, + "column": 19 + }, + "end": { + "line": 153, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4727, + "end": 4729, + "loc": { + "start": { + "line": 153, + "column": 33 + }, + "end": { + "line": 153, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4730, + "end": 4740, + "loc": { + "start": { + "line": 153, + "column": 36 + }, + "end": { + "line": 153, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4741, + "end": 4748, + "loc": { + "start": { + "line": 153, + "column": 47 + }, + "end": { + "line": 153, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 4749, + "end": 4786, + "loc": { + "start": { + "line": 153, + "column": 55 + }, + "end": { + "line": 155, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 4763, + "end": 4776, + "loc": { + "start": { + "line": 154, + "column": 12 + }, + "end": { + "line": 154, + "column": 25 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4763, + "end": 4767, + "loc": { + "start": { + "line": 154, + "column": 12 + }, + "end": { + "line": 154, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 4769, + "end": 4776, + "loc": { + "start": { + "line": 154, + "column": 18 + }, + "end": { + "line": 154, + "column": 25 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4788, + "end": 4794, + "loc": { + "start": { + "line": 155, + "column": 11 + }, + "end": { + "line": 155, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4795, + "end": 4837, + "loc": { + "start": { + "line": 155, + "column": 18 + }, + "end": { + "line": 155, + "column": 60 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4801, + "end": 4837, + "loc": { + "start": { + "line": 155, + "column": 24 + }, + "end": { + "line": 155, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 4801, + "end": 4805, + "loc": { + "start": { + "line": 155, + "column": 24 + }, + "end": { + "line": 155, + "column": 28 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4806, + "end": 4836, + "loc": { + "start": { + "line": 155, + "column": 29 + }, + "end": { + "line": 155, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 4810, + "end": 4815, + "loc": { + "start": { + "line": 155, + "column": 33 + }, + "end": { + "line": 155, + "column": 38 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 4816, + "end": 4835, + "loc": { + "start": { + "line": 155, + "column": 39 + }, + "end": { + "line": 155, + "column": 58 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4849, + "end": 4878, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 4849, + "end": 4877, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 4849, + "end": 4859, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4860, + "end": 4872, + "loc": { + "start": { + "line": 157, + "column": 19 + }, + "end": { + "line": 157, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4866, + "end": 4872, + "loc": { + "start": { + "line": 157, + "column": 25 + }, + "end": { + "line": 157, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4866, + "end": 4870, + "loc": { + "start": { + "line": 157, + "column": 25 + }, + "end": { + "line": 157, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 4874, + "end": 4876, + "loc": { + "start": { + "line": 157, + "column": 33 + }, + "end": { + "line": 157, + "column": 35 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4892, + "end": 5101, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 162, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4892, + "end": 5100, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 162, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4892, + "end": 4894, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 160, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4895, + "end": 4966, + "loc": { + "start": { + "line": 160, + "column": 7 + }, + "end": { + "line": 160, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing buffers.", + "rawValue": "uses the produce assertion with a transformstream, producing buffers.", + "raw": "\"uses the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4968, + "end": 5099, + "loc": { + "start": { + "line": 160, + "column": 80 + }, + "end": { + "line": 162, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4977, + "end": 4981, + "loc": { + "start": { + "line": 160, + "column": 89 + }, + "end": { + "line": 160, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4983, + "end": 5099, + "loc": { + "start": { + "line": 160, + "column": 95 + }, + "end": { + "line": 162, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4993, + "end": 5093, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 108 + } + }, + "expression": { + "type": "CallExpression", + "start": 4993, + "end": 5092, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 107 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5086, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 101 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5079, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 94 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5055, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 70 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5052, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 67 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5044, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 59 + } + }, + "object": { + "type": "MemberExpression", + "start": 4993, + "end": 5036, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 4993, + "end": 5025, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 40 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5022, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 4993, + "end": 4999, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5000, + "end": 5021, + "loc": { + "start": { + "line": 161, + "column": 15 + }, + "end": { + "line": 161, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5004, + "end": 5019, + "loc": { + "start": { + "line": 161, + "column": 19 + }, + "end": { + "line": 161, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5023, + "end": 5025, + "loc": { + "start": { + "line": 161, + "column": 38 + }, + "end": { + "line": 161, + "column": 40 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5026, + "end": 5036, + "loc": { + "start": { + "line": 161, + "column": 41 + }, + "end": { + "line": 161, + "column": 51 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5037, + "end": 5044, + "loc": { + "start": { + "line": 161, + "column": 52 + }, + "end": { + "line": 161, + "column": 59 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5045, + "end": 5051, + "loc": { + "start": { + "line": 161, + "column": 60 + }, + "end": { + "line": 161, + "column": 66 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5053, + "end": 5055, + "loc": { + "start": { + "line": 161, + "column": 68 + }, + "end": { + "line": 161, + "column": 70 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5056, + "end": 5062, + "loc": { + "start": { + "line": 161, + "column": 71 + }, + "end": { + "line": 161, + "column": 77 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5064, + "end": 5070, + "loc": { + "start": { + "line": 161, + "column": 79 + }, + "end": { + "line": 161, + "column": 85 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 5072, + "end": 5078, + "loc": { + "start": { + "line": 161, + "column": 87 + }, + "end": { + "line": 161, + "column": 93 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5080, + "end": 5086, + "loc": { + "start": { + "line": 161, + "column": 95 + }, + "end": { + "line": 161, + "column": 101 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 5087, + "end": 5091, + "loc": { + "start": { + "line": 161, + "column": 102 + }, + "end": { + "line": 161, + "column": 106 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5107, + "end": 5455, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 174, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5107, + "end": 5454, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 174, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5107, + "end": 5109, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 164, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5110, + "end": 5181, + "loc": { + "start": { + "line": 164, + "column": 7 + }, + "end": { + "line": 164, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing objects.", + "rawValue": "uses the produce assertion with a transformstream, producing objects.", + "raw": "\"uses the produce assertion with a transformstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 5183, + "end": 5453, + "loc": { + "start": { + "line": 164, + "column": 80 + }, + "end": { + "line": 174, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5192, + "end": 5196, + "loc": { + "start": { + "line": 164, + "column": 89 + }, + "end": { + "line": 164, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5198, + "end": 5453, + "loc": { + "start": { + "line": 164, + "column": 95 + }, + "end": { + "line": 174, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5208, + "end": 5447, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 24 + } + }, + "expression": { + "type": "CallExpression", + "start": 5208, + "end": 5446, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 23 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5440, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5433, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5337, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 169, + "column": 13 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5334, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 169, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5262, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 62 + } + }, + "object": { + "type": "MemberExpression", + "start": 5208, + "end": 5254, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 5208, + "end": 5243, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 43 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5240, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 5208, + "end": 5214, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5215, + "end": 5239, + "loc": { + "start": { + "line": 165, + "column": 15 + }, + "end": { + "line": 165, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 5219, + "end": 5237, + "loc": { + "start": { + "line": 165, + "column": 19 + }, + "end": { + "line": 165, + "column": 37 + } + }, + "name": "TransformObjStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5241, + "end": 5243, + "loc": { + "start": { + "line": 165, + "column": 41 + }, + "end": { + "line": 165, + "column": 43 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5244, + "end": 5254, + "loc": { + "start": { + "line": 165, + "column": 44 + }, + "end": { + "line": 165, + "column": 54 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5255, + "end": 5262, + "loc": { + "start": { + "line": 165, + "column": 55 + }, + "end": { + "line": 165, + "column": 62 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 5263, + "end": 5333, + "loc": { + "start": { + "line": 165, + "column": 63 + }, + "end": { + "line": 169, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 5277, + "end": 5323, + "loc": { + "start": { + "line": 166, + "column": 12 + }, + "end": { + "line": 168, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5277, + "end": 5281, + "loc": { + "start": { + "line": 166, + "column": 12 + }, + "end": { + "line": 166, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5283, + "end": 5323, + "loc": { + "start": { + "line": 166, + "column": 18 + }, + "end": { + "line": 168, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5301, + "end": 5309, + "loc": { + "start": { + "line": 167, + "column": 16 + }, + "end": { + "line": 167, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5301, + "end": 5305, + "loc": { + "start": { + "line": 167, + "column": 16 + }, + "end": { + "line": 167, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 5307, + "end": 5309, + "loc": { + "start": { + "line": 167, + "column": 22 + }, + "end": { + "line": 167, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5335, + "end": 5337, + "loc": { + "start": { + "line": 169, + "column": 11 + }, + "end": { + "line": 169, + "column": 13 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5338, + "end": 5344, + "loc": { + "start": { + "line": 169, + "column": 14 + }, + "end": { + "line": 169, + "column": 20 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5346, + "end": 5352, + "loc": { + "start": { + "line": 169, + "column": 22 + }, + "end": { + "line": 169, + "column": 28 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 5354, + "end": 5360, + "loc": { + "start": { + "line": 169, + "column": 30 + }, + "end": { + "line": 169, + "column": 36 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + }, + { + "type": "ObjectExpression", + "start": 5362, + "end": 5432, + "loc": { + "start": { + "line": 169, + "column": 38 + }, + "end": { + "line": 173, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 5376, + "end": 5422, + "loc": { + "start": { + "line": 170, + "column": 12 + }, + "end": { + "line": 172, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5376, + "end": 5380, + "loc": { + "start": { + "line": 170, + "column": 12 + }, + "end": { + "line": 170, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5382, + "end": 5422, + "loc": { + "start": { + "line": 170, + "column": 18 + }, + "end": { + "line": 172, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5400, + "end": 5408, + "loc": { + "start": { + "line": 171, + "column": 16 + }, + "end": { + "line": 171, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5400, + "end": 5404, + "loc": { + "start": { + "line": 171, + "column": 16 + }, + "end": { + "line": 171, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 5406, + "end": 5408, + "loc": { + "start": { + "line": 171, + "column": 22 + }, + "end": { + "line": 171, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5434, + "end": 5440, + "loc": { + "start": { + "line": 173, + "column": 11 + }, + "end": { + "line": 173, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 5441, + "end": 5445, + "loc": { + "start": { + "line": 173, + "column": 18 + }, + "end": { + "line": 173, + "column": 22 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5461, + "end": 5779, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 183, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5461, + "end": 5778, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 183, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5461, + "end": 5463, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 176, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5464, + "end": 5536, + "loc": { + "start": { + "line": 176, + "column": 7 + }, + "end": { + "line": 176, + "column": 79 + } + }, + "value": "fails the produce assertion with a transformstream, producing buffers.", + "rawValue": "fails the produce assertion with a transformstream, producing buffers.", + "raw": "\"fails the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 5538, + "end": 5777, + "loc": { + "start": { + "line": 176, + "column": 81 + }, + "end": { + "line": 183, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5547, + "end": 5551, + "loc": { + "start": { + "line": 176, + "column": 90 + }, + "end": { + "line": 176, + "column": 94 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5553, + "end": 5777, + "loc": { + "start": { + "line": 176, + "column": 96 + }, + "end": { + "line": 183, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5563, + "end": 5732, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 5563, + "end": 5731, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5687, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5667, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 179, + "column": 31 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5651, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 179, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5635, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 42 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5627, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 5563, + "end": 5619, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 5563, + "end": 5608, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5592, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 177, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 5563, + "end": 5569, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 177, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5570, + "end": 5591, + "loc": { + "start": { + "line": 177, + "column": 15 + }, + "end": { + "line": 177, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5574, + "end": 5589, + "loc": { + "start": { + "line": 177, + "column": 19 + }, + "end": { + "line": 177, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5606, + "end": 5608, + "loc": { + "start": { + "line": 178, + "column": 13 + }, + "end": { + "line": 178, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5609, + "end": 5619, + "loc": { + "start": { + "line": 178, + "column": 16 + }, + "end": { + "line": 178, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5620, + "end": 5627, + "loc": { + "start": { + "line": 178, + "column": 27 + }, + "end": { + "line": 178, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5628, + "end": 5634, + "loc": { + "start": { + "line": 178, + "column": 35 + }, + "end": { + "line": 178, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5649, + "end": 5651, + "loc": { + "start": { + "line": 179, + "column": 13 + }, + "end": { + "line": 179, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5652, + "end": 5658, + "loc": { + "start": { + "line": 179, + "column": 16 + }, + "end": { + "line": 179, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5660, + "end": 5666, + "loc": { + "start": { + "line": 179, + "column": 24 + }, + "end": { + "line": 179, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5681, + "end": 5687, + "loc": { + "start": { + "line": 180, + "column": 13 + }, + "end": { + "line": 180, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 5688, + "end": 5730, + "loc": { + "start": { + "line": 180, + "column": 20 + }, + "end": { + "line": 180, + "column": 62 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 5694, + "end": 5730, + "loc": { + "start": { + "line": 180, + "column": 26 + }, + "end": { + "line": 180, + "column": 62 + } + }, + "callee": { + "type": "Identifier", + "start": 5694, + "end": 5698, + "loc": { + "start": { + "line": 180, + "column": 26 + }, + "end": { + "line": 180, + "column": 30 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5699, + "end": 5729, + "loc": { + "start": { + "line": 180, + "column": 31 + }, + "end": { + "line": 180, + "column": 61 + } + }, + "callee": { + "type": "Identifier", + "start": 5703, + "end": 5708, + "loc": { + "start": { + "line": 180, + "column": 35 + }, + "end": { + "line": 180, + "column": 40 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 5709, + "end": 5728, + "loc": { + "start": { + "line": 180, + "column": 41 + }, + "end": { + "line": 180, + "column": 60 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5742, + "end": 5771, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 5742, + "end": 5770, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5742, + "end": 5752, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 5753, + "end": 5765, + "loc": { + "start": { + "line": 182, + "column": 19 + }, + "end": { + "line": 182, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 5759, + "end": 5765, + "loc": { + "start": { + "line": 182, + "column": 25 + }, + "end": { + "line": 182, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 5759, + "end": 5763, + "loc": { + "start": { + "line": 182, + "column": 25 + }, + "end": { + "line": 182, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 5767, + "end": 5769, + "loc": { + "start": { + "line": 182, + "column": 33 + }, + "end": { + "line": 182, + "column": 35 + } + }, + "value": 70, + "rawValue": 70, + "raw": "70" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5785, + "end": 6273, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 200, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5785, + "end": 6272, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 200, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5785, + "end": 5787, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 185, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5788, + "end": 5860, + "loc": { + "start": { + "line": 185, + "column": 7 + }, + "end": { + "line": 185, + "column": 79 + } + }, + "value": "fails the produce assertion with a transformstream, producing objects.", + "rawValue": "fails the produce assertion with a transformstream, producing objects.", + "raw": "\"fails the produce assertion with a transformstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 5862, + "end": 6271, + "loc": { + "start": { + "line": 185, + "column": 81 + }, + "end": { + "line": 200, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5871, + "end": 5875, + "loc": { + "start": { + "line": 185, + "column": 90 + }, + "end": { + "line": 185, + "column": 94 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5877, + "end": 6271, + "loc": { + "start": { + "line": 185, + "column": 96 + }, + "end": { + "line": 200, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5887, + "end": 6226, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 5887, + "end": 6225, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 6181, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 6161, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 196, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 6058, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 192, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 6042, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 191, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 5954, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 5887, + "end": 5946, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 5887, + "end": 5935, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 5919, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 186, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 5887, + "end": 5893, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 186, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5894, + "end": 5918, + "loc": { + "start": { + "line": 186, + "column": 15 + }, + "end": { + "line": 186, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 5898, + "end": 5916, + "loc": { + "start": { + "line": 186, + "column": 19 + }, + "end": { + "line": 186, + "column": 37 + } + }, + "name": "TransformObjStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5933, + "end": 5935, + "loc": { + "start": { + "line": 187, + "column": 13 + }, + "end": { + "line": 187, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5936, + "end": 5946, + "loc": { + "start": { + "line": 187, + "column": 16 + }, + "end": { + "line": 187, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5947, + "end": 5954, + "loc": { + "start": { + "line": 187, + "column": 27 + }, + "end": { + "line": 187, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 5955, + "end": 6041, + "loc": { + "start": { + "line": 187, + "column": 35 + }, + "end": { + "line": 191, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5973, + "end": 6027, + "loc": { + "start": { + "line": 188, + "column": 16 + }, + "end": { + "line": 190, + "column": 17 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5973, + "end": 5977, + "loc": { + "start": { + "line": 188, + "column": 16 + }, + "end": { + "line": 188, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5979, + "end": 6027, + "loc": { + "start": { + "line": 188, + "column": 22 + }, + "end": { + "line": 190, + "column": 17 + } + }, + "properties": [ + { + "type": "Property", + "start": 6001, + "end": 6009, + "loc": { + "start": { + "line": 189, + "column": 20 + }, + "end": { + "line": 189, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6001, + "end": 6005, + "loc": { + "start": { + "line": 189, + "column": 20 + }, + "end": { + "line": 189, + "column": 24 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 6007, + "end": 6009, + "loc": { + "start": { + "line": 189, + "column": 26 + }, + "end": { + "line": 189, + "column": 28 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6056, + "end": 6058, + "loc": { + "start": { + "line": 192, + "column": 13 + }, + "end": { + "line": 192, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6059, + "end": 6065, + "loc": { + "start": { + "line": 192, + "column": 16 + }, + "end": { + "line": 192, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 6067, + "end": 6073, + "loc": { + "start": { + "line": 192, + "column": 24 + }, + "end": { + "line": 192, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "ObjectExpression", + "start": 6075, + "end": 6160, + "loc": { + "start": { + "line": 192, + "column": 32 + }, + "end": { + "line": 196, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 6093, + "end": 6146, + "loc": { + "start": { + "line": 193, + "column": 16 + }, + "end": { + "line": 195, + "column": 17 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6093, + "end": 6097, + "loc": { + "start": { + "line": 193, + "column": 16 + }, + "end": { + "line": 193, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 6099, + "end": 6146, + "loc": { + "start": { + "line": 193, + "column": 22 + }, + "end": { + "line": 195, + "column": 17 + } + }, + "properties": [ + { + "type": "Property", + "start": 6121, + "end": 6128, + "loc": { + "start": { + "line": 194, + "column": 20 + }, + "end": { + "line": 194, + "column": 27 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6121, + "end": 6125, + "loc": { + "start": { + "line": 194, + "column": 20 + }, + "end": { + "line": 194, + "column": 24 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 6127, + "end": 6128, + "loc": { + "start": { + "line": 194, + "column": 26 + }, + "end": { + "line": 194, + "column": 27 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6175, + "end": 6181, + "loc": { + "start": { + "line": 197, + "column": 13 + }, + "end": { + "line": 197, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 6182, + "end": 6224, + "loc": { + "start": { + "line": 197, + "column": 20 + }, + "end": { + "line": 197, + "column": 62 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 6188, + "end": 6224, + "loc": { + "start": { + "line": 197, + "column": 26 + }, + "end": { + "line": 197, + "column": 62 + } + }, + "callee": { + "type": "Identifier", + "start": 6188, + "end": 6192, + "loc": { + "start": { + "line": 197, + "column": 26 + }, + "end": { + "line": 197, + "column": 30 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6193, + "end": 6223, + "loc": { + "start": { + "line": 197, + "column": 31 + }, + "end": { + "line": 197, + "column": 61 + } + }, + "callee": { + "type": "Identifier", + "start": 6197, + "end": 6202, + "loc": { + "start": { + "line": 197, + "column": 35 + }, + "end": { + "line": 197, + "column": 40 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 6203, + "end": 6222, + "loc": { + "start": { + "line": 197, + "column": 41 + }, + "end": { + "line": 197, + "column": 60 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6236, + "end": 6265, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 6236, + "end": 6264, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 6236, + "end": 6246, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 6247, + "end": 6259, + "loc": { + "start": { + "line": 199, + "column": 19 + }, + "end": { + "line": 199, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 6253, + "end": 6259, + "loc": { + "start": { + "line": 199, + "column": 25 + }, + "end": { + "line": 199, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 6253, + "end": 6257, + "loc": { + "start": { + "line": 199, + "column": 25 + }, + "end": { + "line": 199, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 6261, + "end": 6263, + "loc": { + "start": { + "line": 199, + "column": 33 + }, + "end": { + "line": 199, + "column": 35 + } + }, + "value": 70, + "rawValue": 70, + "raw": "70" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6279, + "end": 6594, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 209, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6279, + "end": 6593, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 209, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6279, + "end": 6281, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 202, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6282, + "end": 6321, + "loc": { + "start": { + "line": 202, + "column": 7 + }, + "end": { + "line": 202, + "column": 46 + } + }, + "value": "tries to test a readstream with input", + "rawValue": "tries to test a readstream with input", + "raw": "\"tries to test a readstream with input\"" + }, + { + "type": "FunctionExpression", + "start": 6323, + "end": 6592, + "loc": { + "start": { + "line": 202, + "column": 48 + }, + "end": { + "line": 209, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6332, + "end": 6336, + "loc": { + "start": { + "line": 202, + "column": 57 + }, + "end": { + "line": 202, + "column": 61 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 6338, + "end": 6592, + "loc": { + "start": { + "line": 202, + "column": 63 + }, + "end": { + "line": 209, + "column": 5 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 6348, + "end": 6586, + "loc": { + "start": { + "line": 203, + "column": 8 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 6352, + "end": 6454, + "loc": { + "start": { + "line": 203, + "column": 12 + }, + "end": { + "line": 205, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6366, + "end": 6444, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6366, + "end": 6443, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6437, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 83 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6430, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 76 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6423, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6420, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6412, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 6366, + "end": 6404, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 6366, + "end": 6393, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 39 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6390, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 6366, + "end": 6372, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6373, + "end": 6389, + "loc": { + "start": { + "line": 204, + "column": 19 + }, + "end": { + "line": 204, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 6377, + "end": 6387, + "loc": { + "start": { + "line": 204, + "column": 23 + }, + "end": { + "line": 204, + "column": 33 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6391, + "end": 6393, + "loc": { + "start": { + "line": 204, + "column": 37 + }, + "end": { + "line": 204, + "column": 39 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6394, + "end": 6404, + "loc": { + "start": { + "line": 204, + "column": 40 + }, + "end": { + "line": 204, + "column": 50 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6405, + "end": 6412, + "loc": { + "start": { + "line": 204, + "column": 51 + }, + "end": { + "line": 204, + "column": 58 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6413, + "end": 6419, + "loc": { + "start": { + "line": 204, + "column": 59 + }, + "end": { + "line": 204, + "column": 65 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6421, + "end": 6423, + "loc": { + "start": { + "line": 204, + "column": 67 + }, + "end": { + "line": 204, + "column": 69 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6424, + "end": 6429, + "loc": { + "start": { + "line": 204, + "column": 70 + }, + "end": { + "line": 204, + "column": 75 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6431, + "end": 6437, + "loc": { + "start": { + "line": 204, + "column": 77 + }, + "end": { + "line": 204, + "column": 83 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 6438, + "end": 6442, + "loc": { + "start": { + "line": 204, + "column": 84 + }, + "end": { + "line": 204, + "column": 88 + } + }, + "name": "done" + } + ] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 6455, + "end": 6586, + "loc": { + "start": { + "line": 205, + "column": 10 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 6461, + "end": 6462, + "loc": { + "start": { + "line": 205, + "column": 16 + }, + "end": { + "line": 205, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 6464, + "end": 6586, + "loc": { + "start": { + "line": 205, + "column": 19 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6478, + "end": 6556, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6478, + "end": 6555, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6478, + "end": 6490, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 6478, + "end": 6484, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 18 + } + }, + "name": "assert" + }, + "property": { + "type": "Identifier", + "start": 6485, + "end": 6490, + "loc": { + "start": { + "line": 206, + "column": 19 + }, + "end": { + "line": 206, + "column": 24 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6491, + "end": 6500, + "loc": { + "start": { + "line": 206, + "column": 25 + }, + "end": { + "line": 206, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 6491, + "end": 6492, + "loc": { + "start": { + "line": 206, + "column": 25 + }, + "end": { + "line": 206, + "column": 26 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 6493, + "end": 6500, + "loc": { + "start": { + "line": 206, + "column": 27 + }, + "end": { + "line": 206, + "column": 34 + } + }, + "name": "message" + }, + "computed": false + }, + { + "type": "Literal", + "start": 6502, + "end": 6554, + "loc": { + "start": { + "line": 206, + "column": 36 + }, + "end": { + "line": 206, + "column": 88 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6569, + "end": 6576, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 6569, + "end": 6575, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 6569, + "end": 6573, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 16 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6600, + "end": 6923, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 218, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6600, + "end": 6922, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 218, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6600, + "end": 6602, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 211, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6603, + "end": 6650, + "loc": { + "start": { + "line": 211, + "column": 7 + }, + "end": { + "line": 211, + "column": 54 + } + }, + "value": "tries to test a transformstream without input", + "rawValue": "tries to test a transformstream without input", + "raw": "\"tries to test a transformstream without input\"" + }, + { + "type": "FunctionExpression", + "start": 6652, + "end": 6921, + "loc": { + "start": { + "line": 211, + "column": 56 + }, + "end": { + "line": 218, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6661, + "end": 6665, + "loc": { + "start": { + "line": 211, + "column": 65 + }, + "end": { + "line": 211, + "column": 69 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 6667, + "end": 6921, + "loc": { + "start": { + "line": 211, + "column": 71 + }, + "end": { + "line": 218, + "column": 5 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 6677, + "end": 6915, + "loc": { + "start": { + "line": 212, + "column": 8 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 6681, + "end": 6783, + "loc": { + "start": { + "line": 212, + "column": 12 + }, + "end": { + "line": 214, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6695, + "end": 6773, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6695, + "end": 6772, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6766, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 83 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6759, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 76 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6757, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 74 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6754, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6746, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 6695, + "end": 6738, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 55 + } + }, + "object": { + "type": "MemberExpression", + "start": 6695, + "end": 6727, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6724, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 6695, + "end": 6701, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6702, + "end": 6723, + "loc": { + "start": { + "line": 213, + "column": 19 + }, + "end": { + "line": 213, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 6706, + "end": 6721, + "loc": { + "start": { + "line": 213, + "column": 23 + }, + "end": { + "line": 213, + "column": 38 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6725, + "end": 6727, + "loc": { + "start": { + "line": 213, + "column": 42 + }, + "end": { + "line": 213, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6728, + "end": 6738, + "loc": { + "start": { + "line": 213, + "column": 45 + }, + "end": { + "line": 213, + "column": 55 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6739, + "end": 6746, + "loc": { + "start": { + "line": 213, + "column": 56 + }, + "end": { + "line": 213, + "column": 63 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6747, + "end": 6753, + "loc": { + "start": { + "line": 213, + "column": 64 + }, + "end": { + "line": 213, + "column": 70 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6755, + "end": 6757, + "loc": { + "start": { + "line": 213, + "column": 72 + }, + "end": { + "line": 213, + "column": 74 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [] + }, + "property": { + "type": "Identifier", + "start": 6760, + "end": 6766, + "loc": { + "start": { + "line": 213, + "column": 77 + }, + "end": { + "line": 213, + "column": 83 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 6767, + "end": 6771, + "loc": { + "start": { + "line": 213, + "column": 84 + }, + "end": { + "line": 213, + "column": 88 + } + }, + "name": "done" + } + ] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 6784, + "end": 6915, + "loc": { + "start": { + "line": 214, + "column": 10 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 6790, + "end": 6791, + "loc": { + "start": { + "line": 214, + "column": 16 + }, + "end": { + "line": 214, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 6793, + "end": 6915, + "loc": { + "start": { + "line": 214, + "column": 19 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6807, + "end": 6885, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6807, + "end": 6884, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6807, + "end": 6819, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 6807, + "end": 6813, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 18 + } + }, + "name": "assert" + }, + "property": { + "type": "Identifier", + "start": 6814, + "end": 6819, + "loc": { + "start": { + "line": 215, + "column": 19 + }, + "end": { + "line": 215, + "column": 24 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6820, + "end": 6829, + "loc": { + "start": { + "line": 215, + "column": 25 + }, + "end": { + "line": 215, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 6820, + "end": 6821, + "loc": { + "start": { + "line": 215, + "column": 25 + }, + "end": { + "line": 215, + "column": 26 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 6822, + "end": 6829, + "loc": { + "start": { + "line": 215, + "column": 27 + }, + "end": { + "line": 215, + "column": 34 + } + }, + "name": "message" + }, + "computed": false + }, + { + "type": "Literal", + "start": 6831, + "end": 6883, + "loc": { + "start": { + "line": 215, + "column": 36 + }, + "end": { + "line": 215, + "column": 88 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6898, + "end": 6905, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 6898, + "end": 6904, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 6898, + "end": 6902, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 16 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6929, + "end": 7248, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 225, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6929, + "end": 7247, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 225, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6929, + "end": 6931, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 220, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6932, + "end": 7003, + "loc": { + "start": { + "line": 220, + "column": 7 + }, + "end": { + "line": 220, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing buffers.", + "rawValue": "uses the produce assertion with a transformstream, producing buffers.", + "raw": "\"uses the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 7005, + "end": 7246, + "loc": { + "start": { + "line": 220, + "column": 80 + }, + "end": { + "line": 225, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7014, + "end": 7018, + "loc": { + "start": { + "line": 220, + "column": 89 + }, + "end": { + "line": 220, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 7020, + "end": 7246, + "loc": { + "start": { + "line": 220, + "column": 95 + }, + "end": { + "line": 225, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 7030, + "end": 7240, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 88 + } + }, + "expression": { + "type": "CallExpression", + "start": 7030, + "end": 7239, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 87 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7171, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7151, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 223, + "column": 39 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7127, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 223, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7111, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7083, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 7030, + "end": 7075, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7059, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 221, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 7030, + "end": 7036, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 221, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7037, + "end": 7058, + "loc": { + "start": { + "line": 221, + "column": 15 + }, + "end": { + "line": 221, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 7041, + "end": 7056, + "loc": { + "start": { + "line": 221, + "column": 19 + }, + "end": { + "line": 221, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7073, + "end": 7075, + "loc": { + "start": { + "line": 222, + "column": 13 + }, + "end": { + "line": 222, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7076, + "end": 7083, + "loc": { + "start": { + "line": 222, + "column": 16 + }, + "end": { + "line": 222, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7084, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 24 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7084, + "end": 7085, + "loc": { + "start": { + "line": 222, + "column": 24 + }, + "end": { + "line": 222, + "column": 25 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 7089, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "test": { + "type": "BinaryExpression", + "start": 7089, + "end": 7101, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 41 + } + }, + "left": { + "type": "Identifier", + "start": 7089, + "end": 7090, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 30 + } + }, + "name": "x" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 7095, + "end": 7101, + "loc": { + "start": { + "line": 222, + "column": 35 + }, + "end": { + "line": 222, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + }, + "consequent": { + "type": "Literal", + "start": 7104, + "end": 7105, + "loc": { + "start": { + "line": 222, + "column": 44 + }, + "end": { + "line": 222, + "column": 45 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 7108, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 48 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 7109, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 49 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + } + ] + }, + "property": { + "type": "Identifier", + "start": 7125, + "end": 7127, + "loc": { + "start": { + "line": 223, + "column": 13 + }, + "end": { + "line": 223, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7128, + "end": 7134, + "loc": { + "start": { + "line": 223, + "column": 16 + }, + "end": { + "line": 223, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 7136, + "end": 7142, + "loc": { + "start": { + "line": 223, + "column": 24 + }, + "end": { + "line": 223, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 7144, + "end": 7150, + "loc": { + "start": { + "line": 223, + "column": 32 + }, + "end": { + "line": 223, + "column": 38 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7165, + "end": 7171, + "loc": { + "start": { + "line": 224, + "column": 13 + }, + "end": { + "line": 224, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7172, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 20 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7172, + "end": 7173, + "loc": { + "start": { + "line": 224, + "column": 20 + }, + "end": { + "line": 224, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 7177, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "test": { + "type": "BinaryExpression", + "start": 7177, + "end": 7195, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 43 + } + }, + "left": { + "type": "Identifier", + "start": 7177, + "end": 7178, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 26 + } + }, + "name": "e" + }, + "operator": "instanceof", + "right": { + "type": "Identifier", + "start": 7190, + "end": 7195, + "loc": { + "start": { + "line": 224, + "column": 38 + }, + "end": { + "line": 224, + "column": 43 + } + }, + "name": "Error" + } + }, + "consequent": { + "type": "CallExpression", + "start": 7198, + "end": 7204, + "loc": { + "start": { + "line": 224, + "column": 46 + }, + "end": { + "line": 224, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 7198, + "end": 7202, + "loc": { + "start": { + "line": 224, + "column": 46 + }, + "end": { + "line": 224, + "column": 50 + } + }, + "name": "done" + }, + "arguments": [] + }, + "alternate": { + "type": "CallExpression", + "start": 7207, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 55 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "callee": { + "type": "Identifier", + "start": 7207, + "end": 7211, + "loc": { + "start": { + "line": 224, + "column": 55 + }, + "end": { + "line": 224, + "column": 59 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7212, + "end": 7237, + "loc": { + "start": { + "line": 224, + "column": 60 + }, + "end": { + "line": 224, + "column": 85 + } + }, + "callee": { + "type": "Identifier", + "start": 7216, + "end": 7221, + "loc": { + "start": { + "line": 224, + "column": 64 + }, + "end": { + "line": 224, + "column": 69 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 7222, + "end": 7236, + "loc": { + "start": { + "line": 224, + "column": 70 + }, + "end": { + "line": 224, + "column": 84 + } + }, + "value": "should throw", + "rawValue": "should throw", + "raw": "\"should throw\"" + } + ] + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7254, + "end": 8137, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 248, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 7254, + "end": 8136, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 248, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 7254, + "end": 7256, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 227, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 7257, + "end": 7284, + "loc": { + "start": { + "line": 227, + "column": 7 + }, + "end": { + "line": 227, + "column": 34 + } + }, + "value": "taps a stream under test.", + "rawValue": "taps a stream under test.", + "raw": "\"taps a stream under test.\"" + }, + { + "type": "FunctionExpression", + "start": 7286, + "end": 8135, + "loc": { + "start": { + "line": 227, + "column": 36 + }, + "end": { + "line": 248, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7295, + "end": 7299, + "loc": { + "start": { + "line": 227, + "column": 45 + }, + "end": { + "line": 227, + "column": 49 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 7301, + "end": 8135, + "loc": { + "start": { + "line": 227, + "column": 51 + }, + "end": { + "line": 248, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 7311, + "end": 7335, + "loc": { + "start": { + "line": 228, + "column": 8 + }, + "end": { + "line": 228, + "column": 32 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 7317, + "end": 7334, + "loc": { + "start": { + "line": 228, + "column": 14 + }, + "end": { + "line": 228, + "column": 31 + } + }, + "id": { + "type": "Identifier", + "start": 7317, + "end": 7320, + "loc": { + "start": { + "line": 228, + "column": 14 + }, + "end": { + "line": 228, + "column": 17 + } + }, + "name": "spy" + }, + "init": { + "type": "CallExpression", + "start": 7323, + "end": 7334, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 31 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7323, + "end": 7332, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 7323, + "end": 7328, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 25 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 7329, + "end": 7332, + "loc": { + "start": { + "line": 228, + "column": 26 + }, + "end": { + "line": 228, + "column": 29 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 7345, + "end": 8129, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 247, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 7345, + "end": 8128, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 247, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7499, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 234, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7479, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 233, + "column": 21 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7474, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 233, + "column": 16 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7457, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 232, + "column": 39 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7433, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 232, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7417, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 42 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7409, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 7345, + "end": 7401, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 7345, + "end": 7390, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7374, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 230, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 7345, + "end": 7351, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 230, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7352, + "end": 7373, + "loc": { + "start": { + "line": 230, + "column": 15 + }, + "end": { + "line": 230, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 7356, + "end": 7371, + "loc": { + "start": { + "line": 230, + "column": 19 + }, + "end": { + "line": 230, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7388, + "end": 7390, + "loc": { + "start": { + "line": 231, + "column": 13 + }, + "end": { + "line": 231, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7391, + "end": 7401, + "loc": { + "start": { + "line": 231, + "column": 16 + }, + "end": { + "line": 231, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7402, + "end": 7409, + "loc": { + "start": { + "line": 231, + "column": 27 + }, + "end": { + "line": 231, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7410, + "end": 7416, + "loc": { + "start": { + "line": 231, + "column": 35 + }, + "end": { + "line": 231, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7431, + "end": 7433, + "loc": { + "start": { + "line": 232, + "column": 13 + }, + "end": { + "line": 232, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7434, + "end": 7440, + "loc": { + "start": { + "line": 232, + "column": 16 + }, + "end": { + "line": 232, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 7442, + "end": 7448, + "loc": { + "start": { + "line": 232, + "column": 24 + }, + "end": { + "line": 232, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 7450, + "end": 7456, + "loc": { + "start": { + "line": 232, + "column": 32 + }, + "end": { + "line": 232, + "column": 38 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7471, + "end": 7474, + "loc": { + "start": { + "line": 233, + "column": 13 + }, + "end": { + "line": 233, + "column": 16 + } + }, + "name": "tap" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 7475, + "end": 7478, + "loc": { + "start": { + "line": 233, + "column": 17 + }, + "end": { + "line": 233, + "column": 20 + } + }, + "name": "spy" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7493, + "end": 7499, + "loc": { + "start": { + "line": 234, + "column": 13 + }, + "end": { + "line": 234, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7500, + "end": 8127, + "loc": { + "start": { + "line": 234, + "column": 20 + }, + "end": { + "line": 247, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 7506, + "end": 8127, + "loc": { + "start": { + "line": 234, + "column": 26 + }, + "end": { + "line": 247, + "column": 13 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 7524, + "end": 8113, + "loc": { + "start": { + "line": 235, + "column": 16 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 7528, + "end": 8055, + "loc": { + "start": { + "line": 235, + "column": 20 + }, + "end": { + "line": 244, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 7550, + "end": 7584, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 54 + } + }, + "expression": { + "type": "CallExpression", + "start": 7550, + "end": 7583, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7550, + "end": 7580, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 7550, + "end": 7574, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 7550, + "end": 7571, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 7550, + "end": 7556, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 7557, + "end": 7570, + "loc": { + "start": { + "line": 236, + "column": 27 + }, + "end": { + "line": 236, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7557, + "end": 7560, + "loc": { + "start": { + "line": 236, + "column": 27 + }, + "end": { + "line": 236, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7561, + "end": 7570, + "loc": { + "start": { + "line": 236, + "column": 31 + }, + "end": { + "line": 236, + "column": 40 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 7572, + "end": 7574, + "loc": { + "start": { + "line": 236, + "column": 42 + }, + "end": { + "line": 236, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7575, + "end": 7580, + "loc": { + "start": { + "line": 236, + "column": 45 + }, + "end": { + "line": 236, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7581, + "end": 7582, + "loc": { + "start": { + "line": 236, + "column": 51 + }, + "end": { + "line": 236, + "column": 52 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7605, + "end": 7657, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 7605, + "end": 7656, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7605, + "end": 7648, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7605, + "end": 7642, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7605, + "end": 7639, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7605, + "end": 7611, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7612, + "end": 7638, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7612, + "end": 7636, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7612, + "end": 7630, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7612, + "end": 7625, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7612, + "end": 7615, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7616, + "end": 7625, + "loc": { + "start": { + "line": 237, + "column": 31 + }, + "end": { + "line": 237, + "column": 40 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7626, + "end": 7630, + "loc": { + "start": { + "line": 237, + "column": 41 + }, + "end": { + "line": 237, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7631, + "end": 7636, + "loc": { + "start": { + "line": 237, + "column": 46 + }, + "end": { + "line": 237, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7640, + "end": 7642, + "loc": { + "start": { + "line": 237, + "column": 55 + }, + "end": { + "line": 237, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7643, + "end": 7648, + "loc": { + "start": { + "line": 237, + "column": 58 + }, + "end": { + "line": 237, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7649, + "end": 7655, + "loc": { + "start": { + "line": 237, + "column": 64 + }, + "end": { + "line": 237, + "column": 70 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7678, + "end": 7725, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 67 + } + }, + "expression": { + "type": "CallExpression", + "start": 7678, + "end": 7724, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7678, + "end": 7721, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7678, + "end": 7715, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7678, + "end": 7712, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7678, + "end": 7684, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7685, + "end": 7711, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7685, + "end": 7709, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7685, + "end": 7703, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7685, + "end": 7698, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7685, + "end": 7688, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7689, + "end": 7698, + "loc": { + "start": { + "line": 238, + "column": 31 + }, + "end": { + "line": 238, + "column": 40 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7699, + "end": 7703, + "loc": { + "start": { + "line": 238, + "column": 41 + }, + "end": { + "line": 238, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7704, + "end": 7709, + "loc": { + "start": { + "line": 238, + "column": 46 + }, + "end": { + "line": 238, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7713, + "end": 7715, + "loc": { + "start": { + "line": 238, + "column": 55 + }, + "end": { + "line": 238, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7716, + "end": 7721, + "loc": { + "start": { + "line": 238, + "column": 58 + }, + "end": { + "line": 238, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7722, + "end": 7723, + "loc": { + "start": { + "line": 238, + "column": 64 + }, + "end": { + "line": 238, + "column": 65 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7746, + "end": 7799, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 73 + } + }, + "expression": { + "type": "CallExpression", + "start": 7746, + "end": 7798, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 72 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7746, + "end": 7790, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 7746, + "end": 7784, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 7746, + "end": 7781, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 7746, + "end": 7752, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7753, + "end": 7780, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7753, + "end": 7778, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 7753, + "end": 7772, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 7753, + "end": 7767, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 41 + } + }, + "object": { + "type": "Identifier", + "start": 7753, + "end": 7756, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7757, + "end": 7767, + "loc": { + "start": { + "line": 239, + "column": 31 + }, + "end": { + "line": 239, + "column": 41 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7768, + "end": 7772, + "loc": { + "start": { + "line": 239, + "column": 42 + }, + "end": { + "line": 239, + "column": 46 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7773, + "end": 7778, + "loc": { + "start": { + "line": 239, + "column": 47 + }, + "end": { + "line": 239, + "column": 52 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7782, + "end": 7784, + "loc": { + "start": { + "line": 239, + "column": 56 + }, + "end": { + "line": 239, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7785, + "end": 7790, + "loc": { + "start": { + "line": 239, + "column": 59 + }, + "end": { + "line": 239, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7791, + "end": 7797, + "loc": { + "start": { + "line": 239, + "column": 65 + }, + "end": { + "line": 239, + "column": 71 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7820, + "end": 7868, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 68 + } + }, + "expression": { + "type": "CallExpression", + "start": 7820, + "end": 7867, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 67 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7820, + "end": 7864, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 7820, + "end": 7858, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 7820, + "end": 7855, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 7820, + "end": 7826, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7827, + "end": 7854, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7827, + "end": 7852, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 7827, + "end": 7846, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 7827, + "end": 7841, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 41 + } + }, + "object": { + "type": "Identifier", + "start": 7827, + "end": 7830, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7831, + "end": 7841, + "loc": { + "start": { + "line": 240, + "column": 31 + }, + "end": { + "line": 240, + "column": 41 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7842, + "end": 7846, + "loc": { + "start": { + "line": 240, + "column": 42 + }, + "end": { + "line": 240, + "column": 46 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7847, + "end": 7852, + "loc": { + "start": { + "line": 240, + "column": 47 + }, + "end": { + "line": 240, + "column": 52 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7856, + "end": 7858, + "loc": { + "start": { + "line": 240, + "column": 56 + }, + "end": { + "line": 240, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7859, + "end": 7864, + "loc": { + "start": { + "line": 240, + "column": 59 + }, + "end": { + "line": 240, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7865, + "end": 7866, + "loc": { + "start": { + "line": 240, + "column": 65 + }, + "end": { + "line": 240, + "column": 66 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7889, + "end": 7941, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 7889, + "end": 7940, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7889, + "end": 7932, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7889, + "end": 7926, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7889, + "end": 7923, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7889, + "end": 7895, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7896, + "end": 7922, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7896, + "end": 7920, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7896, + "end": 7914, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7896, + "end": 7909, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7896, + "end": 7899, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7900, + "end": 7909, + "loc": { + "start": { + "line": 241, + "column": 31 + }, + "end": { + "line": 241, + "column": 40 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7910, + "end": 7914, + "loc": { + "start": { + "line": 241, + "column": 41 + }, + "end": { + "line": 241, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7915, + "end": 7920, + "loc": { + "start": { + "line": 241, + "column": 46 + }, + "end": { + "line": 241, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7924, + "end": 7926, + "loc": { + "start": { + "line": 241, + "column": 55 + }, + "end": { + "line": 241, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7927, + "end": 7932, + "loc": { + "start": { + "line": 241, + "column": 58 + }, + "end": { + "line": 241, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7933, + "end": 7939, + "loc": { + "start": { + "line": 241, + "column": 64 + }, + "end": { + "line": 241, + "column": 70 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7962, + "end": 8009, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 67 + } + }, + "expression": { + "type": "CallExpression", + "start": 7962, + "end": 8008, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7962, + "end": 8005, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7962, + "end": 7999, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7962, + "end": 7996, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7962, + "end": 7968, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7969, + "end": 7995, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7969, + "end": 7993, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7969, + "end": 7987, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7969, + "end": 7982, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7969, + "end": 7972, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7973, + "end": 7982, + "loc": { + "start": { + "line": 242, + "column": 31 + }, + "end": { + "line": 242, + "column": 40 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7983, + "end": 7987, + "loc": { + "start": { + "line": 242, + "column": 41 + }, + "end": { + "line": 242, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7988, + "end": 7993, + "loc": { + "start": { + "line": 242, + "column": 46 + }, + "end": { + "line": 242, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7997, + "end": 7999, + "loc": { + "start": { + "line": 242, + "column": 55 + }, + "end": { + "line": 242, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 8000, + "end": 8005, + "loc": { + "start": { + "line": 242, + "column": 58 + }, + "end": { + "line": 242, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 8006, + "end": 8007, + "loc": { + "start": { + "line": 242, + "column": 64 + }, + "end": { + "line": 242, + "column": 65 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 8030, + "end": 8037, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 8030, + "end": 8036, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 8030, + "end": 8034, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 24 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 8056, + "end": 8113, + "loc": { + "start": { + "line": 244, + "column": 18 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 8062, + "end": 8063, + "loc": { + "start": { + "line": 244, + "column": 24 + }, + "end": { + "line": 244, + "column": 25 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 8065, + "end": 8113, + "loc": { + "start": { + "line": 244, + "column": 27 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 8087, + "end": 8095, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 8087, + "end": 8094, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 27 + } + }, + "callee": { + "type": "Identifier", + "start": 8087, + "end": 8091, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 24 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 8092, + "end": 8093, + "loc": { + "start": { + "line": 245, + "column": 25 + }, + "end": { + "line": 245, + "column": 26 + } + }, + "name": "e" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/__tests__/ExpectedTest.js.json b/ExpectStreamBak/docs/ast/source/__tests__/ExpectedTest.js.json new file mode 100644 index 0000000..aae8054 --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/__tests__/ExpectedTest.js.json @@ -0,0 +1,7435 @@ +{ + "type": "Program", + "start": 0, + "end": 2442, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 70, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": "Expected" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 21, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": "../Expected", + "rawValue": "../Expected", + "raw": "\"../Expected\"" + } + }, + { + "type": "ImportDeclaration", + "start": 36, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 59, + "end": 65, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExpressionStatement", + "start": 68, + "end": 2441, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 69, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 68, + "end": 2440, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 68, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 77, + "end": 87, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "value": "Expected", + "rawValue": "Expected", + "raw": "\"Expected\"" + }, + { + "type": "FunctionExpression", + "start": 89, + "end": 2439, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 100, + "end": 2439, + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 106, + "end": 337, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 106, + "end": 336, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 10, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 106, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 109, + "end": 156, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 54 + } + }, + "value": "compares a single value with the expected one", + "rawValue": "compares a single value with the expected one", + "raw": "\"compares a single value with the expected one\"" + }, + { + "type": "FunctionExpression", + "start": 158, + "end": 335, + "loc": { + "start": { + "line": 5, + "column": 56 + }, + "end": { + "line": 10, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 169, + "end": 335, + "loc": { + "start": { + "line": 5, + "column": 67 + }, + "end": { + "line": 10, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 179, + "end": 220, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 49 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 185, + "end": 219, + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 185, + "end": 193, + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 196, + "end": 219, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 196, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 196, + "end": 204, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 205, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 34 + }, + "end": { + "line": 6, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 208, + "end": 214, + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 43 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + }, + { + "type": "ObjectExpression", + "start": 216, + "end": 218, + "loc": { + "start": { + "line": 6, + "column": 45 + }, + "end": { + "line": 6, + "column": 47 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 230, + "end": 273, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 51 + } + }, + "expression": { + "type": "CallExpression", + "start": 230, + "end": 272, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 50 + } + }, + "callee": { + "type": "MemberExpression", + "start": 230, + "end": 269, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 230, + "end": 263, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 230, + "end": 260, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 230, + "end": 236, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 237, + "end": 259, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 37 + } + }, + "callee": { + "type": "MemberExpression", + "start": 237, + "end": 251, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 237, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 246, + "end": 251, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 252, + "end": 258, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 36 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 261, + "end": 263, + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 264, + "end": 269, + "loc": { + "start": { + "line": 8, + "column": 42 + }, + "end": { + "line": 8, + "column": 47 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 270, + "end": 271, + "loc": { + "start": { + "line": 8, + "column": 48 + }, + "end": { + "line": 8, + "column": 49 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 282, + "end": 329, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 282, + "end": 328, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 282, + "end": 324, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 282, + "end": 318, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 282, + "end": 315, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 282, + "end": 288, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 289, + "end": 314, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 289, + "end": 303, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 289, + "end": 297, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 298, + "end": 303, + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 304, + "end": 313, + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 39 + } + }, + "value": "NotTest", + "rawValue": "NotTest", + "raw": "\"NotTest\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 316, + "end": 318, + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 319, + "end": 324, + "loc": { + "start": { + "line": 9, + "column": 45 + }, + "end": { + "line": 9, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 325, + "end": 327, + "loc": { + "start": { + "line": 9, + "column": 51 + }, + "end": { + "line": 9, + "column": 53 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 326, + "end": 327, + "loc": { + "start": { + "line": 9, + "column": 52 + }, + "end": { + "line": 9, + "column": 53 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 343, + "end": 643, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 19, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 343, + "end": 642, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 19, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 343, + "end": 345, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 346, + "end": 425, + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 86 + } + }, + "value": "compares a single value with the expected one, skipping all not matching ones", + "rawValue": "compares a single value with the expected one, skipping all not matching ones", + "raw": "\"compares a single value with the expected one, skipping all not matching ones\"" + }, + { + "type": "FunctionExpression", + "start": 427, + "end": 641, + "loc": { + "start": { + "line": 12, + "column": 88 + }, + "end": { + "line": 19, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 438, + "end": 641, + "loc": { + "start": { + "line": 12, + "column": 99 + }, + "end": { + "line": 19, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 448, + "end": 527, + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 15, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 454, + "end": 526, + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 15, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 454, + "end": 462, + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 465, + "end": 526, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 15, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 465, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 465, + "end": 473, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 474, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 477, + "end": 483, + "loc": { + "start": { + "line": 13, + "column": 37 + }, + "end": { + "line": 13, + "column": 43 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + }, + { + "type": "ObjectExpression", + "start": 485, + "end": 525, + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 15, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 499, + "end": 515, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 499, + "end": 509, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 511, + "end": 515, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 537, + "end": 580, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 51 + } + }, + "expression": { + "type": "CallExpression", + "start": 537, + "end": 579, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 50 + } + }, + "callee": { + "type": "MemberExpression", + "start": 537, + "end": 576, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 537, + "end": 570, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 537, + "end": 567, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 537, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 544, + "end": 566, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 37 + } + }, + "callee": { + "type": "MemberExpression", + "start": 544, + "end": 558, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 544, + "end": 552, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 553, + "end": 558, + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 559, + "end": 565, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 568, + "end": 570, + "loc": { + "start": { + "line": 17, + "column": 39 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 571, + "end": 576, + "loc": { + "start": { + "line": 17, + "column": 42 + }, + "end": { + "line": 17, + "column": 47 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 577, + "end": 578, + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 49 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 589, + "end": 635, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 54 + } + }, + "expression": { + "type": "CallExpression", + "start": 589, + "end": 634, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 589, + "end": 631, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 589, + "end": 625, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 589, + "end": 622, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 589, + "end": 595, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 596, + "end": 621, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 596, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 596, + "end": 604, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 605, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 611, + "end": 620, + "loc": { + "start": { + "line": 18, + "column": 30 + }, + "end": { + "line": 18, + "column": 39 + } + }, + "value": "NotTest", + "rawValue": "NotTest", + "raw": "\"NotTest\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 623, + "end": 625, + "loc": { + "start": { + "line": 18, + "column": 42 + }, + "end": { + "line": 18, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 626, + "end": 631, + "loc": { + "start": { + "line": 18, + "column": 45 + }, + "end": { + "line": 18, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 632, + "end": 633, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 52 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 649, + "end": 960, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 27, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 649, + "end": 959, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 27, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 649, + "end": 651, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 652, + "end": 707, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 62 + } + }, + "value": "compares a list of values with another list of values", + "rawValue": "compares a list of values with another list of values", + "raw": "\"compares a list of values with another list of values\"" + }, + { + "type": "FunctionExpression", + "start": 709, + "end": 958, + "loc": { + "start": { + "line": 21, + "column": 64 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 720, + "end": 958, + "loc": { + "start": { + "line": 21, + "column": 75 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 730, + "end": 792, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 70 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 736, + "end": 791, + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 69 + } + }, + "id": { + "type": "Identifier", + "start": 736, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 747, + "end": 791, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 69 + } + }, + "callee": { + "type": "MemberExpression", + "start": 747, + "end": 758, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 747, + "end": 755, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 756, + "end": 758, + "loc": { + "start": { + "line": 22, + "column": 34 + }, + "end": { + "line": 22, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 759, + "end": 786, + "loc": { + "start": { + "line": 22, + "column": 37 + }, + "end": { + "line": 22, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 760, + "end": 767, + "loc": { + "start": { + "line": 22, + "column": 38 + }, + "end": { + "line": 22, + "column": 45 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + }, + { + "type": "Literal", + "start": 769, + "end": 776, + "loc": { + "start": { + "line": 22, + "column": 47 + }, + "end": { + "line": 22, + "column": 54 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + }, + { + "type": "Literal", + "start": 778, + "end": 785, + "loc": { + "start": { + "line": 22, + "column": 56 + }, + "end": { + "line": 22, + "column": 63 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 788, + "end": 790, + "loc": { + "start": { + "line": 22, + "column": 66 + }, + "end": { + "line": 22, + "column": 68 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 802, + "end": 846, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 802, + "end": 845, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 802, + "end": 842, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 802, + "end": 836, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 802, + "end": 833, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 802, + "end": 808, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 809, + "end": 832, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 809, + "end": 823, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 809, + "end": 817, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 818, + "end": 823, + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 824, + "end": 831, + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 37 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 834, + "end": 836, + "loc": { + "start": { + "line": 24, + "column": 40 + }, + "end": { + "line": 24, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 837, + "end": 842, + "loc": { + "start": { + "line": 24, + "column": 43 + }, + "end": { + "line": 24, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 843, + "end": 844, + "loc": { + "start": { + "line": 24, + "column": 49 + }, + "end": { + "line": 24, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 855, + "end": 899, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 855, + "end": 898, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 855, + "end": 895, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 855, + "end": 889, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 855, + "end": 886, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 855, + "end": 861, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 862, + "end": 885, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 862, + "end": 876, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 862, + "end": 870, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 871, + "end": 876, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 877, + "end": 884, + "loc": { + "start": { + "line": 25, + "column": 30 + }, + "end": { + "line": 25, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 887, + "end": 889, + "loc": { + "start": { + "line": 25, + "column": 40 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 890, + "end": 895, + "loc": { + "start": { + "line": 25, + "column": 43 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 896, + "end": 897, + "loc": { + "start": { + "line": 25, + "column": 49 + }, + "end": { + "line": 25, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 908, + "end": 952, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 908, + "end": 951, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 908, + "end": 948, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 908, + "end": 942, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 908, + "end": 939, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 908, + "end": 914, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 915, + "end": 938, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 915, + "end": 929, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 915, + "end": 923, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 924, + "end": 929, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 930, + "end": 937, + "loc": { + "start": { + "line": 26, + "column": 30 + }, + "end": { + "line": 26, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 940, + "end": 942, + "loc": { + "start": { + "line": 26, + "column": 40 + }, + "end": { + "line": 26, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 948, + "loc": { + "start": { + "line": 26, + "column": 43 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 949, + "end": 950, + "loc": { + "start": { + "line": 26, + "column": 49 + }, + "end": { + "line": 26, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 966, + "end": 1384, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 966, + "end": 1383, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 966, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 969, + "end": 1040, + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 78 + } + }, + "value": "compares a list of values with another list, skipping all non-matches", + "rawValue": "compares a list of values with another list, skipping all non-matches", + "raw": "\"compares a list of values with another list, skipping all non-matches\"" + }, + { + "type": "FunctionExpression", + "start": 1042, + "end": 1382, + "loc": { + "start": { + "line": 29, + "column": 80 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1053, + "end": 1382, + "loc": { + "start": { + "line": 29, + "column": 91 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1063, + "end": 1163, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 32, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1069, + "end": 1162, + "loc": { + "start": { + "line": 30, + "column": 14 + }, + "end": { + "line": 32, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1069, + "end": 1077, + "loc": { + "start": { + "line": 30, + "column": 14 + }, + "end": { + "line": 30, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1080, + "end": 1162, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 32, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1080, + "end": 1091, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 30, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1080, + "end": 1088, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 30, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1089, + "end": 1091, + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1092, + "end": 1119, + "loc": { + "start": { + "line": 30, + "column": 37 + }, + "end": { + "line": 30, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1093, + "end": 1100, + "loc": { + "start": { + "line": 30, + "column": 38 + }, + "end": { + "line": 30, + "column": 45 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "Literal", + "start": 1102, + "end": 1109, + "loc": { + "start": { + "line": 30, + "column": 47 + }, + "end": { + "line": 30, + "column": 54 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + }, + { + "type": "Literal", + "start": 1111, + "end": 1118, + "loc": { + "start": { + "line": 30, + "column": 56 + }, + "end": { + "line": 30, + "column": 63 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 1121, + "end": 1161, + "loc": { + "start": { + "line": 30, + "column": 66 + }, + "end": { + "line": 32, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1135, + "end": 1151, + "loc": { + "start": { + "line": 31, + "column": 12 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1135, + "end": 1145, + "loc": { + "start": { + "line": 31, + "column": 12 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 1147, + "end": 1151, + "loc": { + "start": { + "line": 31, + "column": 24 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1173, + "end": 1217, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1173, + "end": 1216, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1173, + "end": 1213, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1173, + "end": 1207, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1173, + "end": 1204, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1173, + "end": 1179, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1180, + "end": 1203, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1180, + "end": 1194, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1180, + "end": 1188, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1189, + "end": 1194, + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1195, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 30 + }, + "end": { + "line": 34, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1205, + "end": 1207, + "loc": { + "start": { + "line": 34, + "column": 40 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1208, + "end": 1213, + "loc": { + "start": { + "line": 34, + "column": 43 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1214, + "end": 1215, + "loc": { + "start": { + "line": 34, + "column": 49 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1226, + "end": 1270, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1226, + "end": 1269, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1226, + "end": 1266, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1226, + "end": 1260, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1226, + "end": 1257, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1226, + "end": 1232, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1233, + "end": 1256, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1233, + "end": 1247, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1233, + "end": 1241, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1242, + "end": 1247, + "loc": { + "start": { + "line": 35, + "column": 24 + }, + "end": { + "line": 35, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1248, + "end": 1255, + "loc": { + "start": { + "line": 35, + "column": 30 + }, + "end": { + "line": 35, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1258, + "end": 1260, + "loc": { + "start": { + "line": 35, + "column": 40 + }, + "end": { + "line": 35, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1261, + "end": 1266, + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1267, + "end": 1268, + "loc": { + "start": { + "line": 35, + "column": 49 + }, + "end": { + "line": 35, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1279, + "end": 1323, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1279, + "end": 1322, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1279, + "end": 1319, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1279, + "end": 1313, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1279, + "end": 1310, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1279, + "end": 1285, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1286, + "end": 1309, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1286, + "end": 1300, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1286, + "end": 1294, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1300, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1301, + "end": 1308, + "loc": { + "start": { + "line": 36, + "column": 30 + }, + "end": { + "line": 36, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1311, + "end": 1313, + "loc": { + "start": { + "line": 36, + "column": 40 + }, + "end": { + "line": 36, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1314, + "end": 1319, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1320, + "end": 1321, + "loc": { + "start": { + "line": 36, + "column": 49 + }, + "end": { + "line": 36, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1332, + "end": 1376, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1332, + "end": 1375, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1332, + "end": 1372, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1332, + "end": 1366, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1332, + "end": 1363, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1332, + "end": 1338, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1339, + "end": 1362, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1339, + "end": 1353, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1339, + "end": 1347, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1348, + "end": 1353, + "loc": { + "start": { + "line": 37, + "column": 24 + }, + "end": { + "line": 37, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1354, + "end": 1361, + "loc": { + "start": { + "line": 37, + "column": 30 + }, + "end": { + "line": 37, + "column": 37 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1364, + "end": 1366, + "loc": { + "start": { + "line": 37, + "column": 40 + }, + "end": { + "line": 37, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1367, + "end": 1372, + "loc": { + "start": { + "line": 37, + "column": 43 + }, + "end": { + "line": 37, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1373, + "end": 1374, + "loc": { + "start": { + "line": 37, + "column": 49 + }, + "end": { + "line": 37, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1390, + "end": 1796, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 49, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1390, + "end": 1795, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 49, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1390, + "end": 1392, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1393, + "end": 1434, + "loc": { + "start": { + "line": 40, + "column": 7 + }, + "end": { + "line": 40, + "column": 48 + } + }, + "value": "compares a list of values with a filter", + "rawValue": "compares a list of values with a filter", + "raw": "\"compares a list of values with a filter\"" + }, + { + "type": "FunctionExpression", + "start": 1436, + "end": 1794, + "loc": { + "start": { + "line": 40, + "column": 50 + }, + "end": { + "line": 49, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1447, + "end": 1794, + "loc": { + "start": { + "line": 40, + "column": 61 + }, + "end": { + "line": 49, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1457, + "end": 1575, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 43, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1463, + "end": 1574, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1463, + "end": 1471, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1474, + "end": 1574, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1474, + "end": 1485, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1474, + "end": 1482, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1483, + "end": 1485, + "loc": { + "start": { + "line": 41, + "column": 34 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1486, + "end": 1513, + "loc": { + "start": { + "line": 41, + "column": 37 + }, + "end": { + "line": 41, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1487, + "end": 1494, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "Literal", + "start": 1496, + "end": 1503, + "loc": { + "start": { + "line": 41, + "column": 47 + }, + "end": { + "line": 41, + "column": 54 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + }, + { + "type": "Literal", + "start": 1505, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 56 + }, + "end": { + "line": 41, + "column": 63 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 1515, + "end": 1573, + "loc": { + "start": { + "line": 41, + "column": 66 + }, + "end": { + "line": 43, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1529, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1529, + "end": 1535, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 1537, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1537, + "end": 1542, + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 1546, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 1546, + "end": 1551, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 1556, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 39 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1585, + "end": 1629, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1585, + "end": 1628, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1585, + "end": 1625, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1585, + "end": 1619, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1585, + "end": 1616, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1585, + "end": 1591, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1592, + "end": 1615, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1592, + "end": 1606, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1592, + "end": 1600, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1601, + "end": 1606, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1607, + "end": 1614, + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1617, + "end": 1619, + "loc": { + "start": { + "line": 45, + "column": 40 + }, + "end": { + "line": 45, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1620, + "end": 1625, + "loc": { + "start": { + "line": 45, + "column": 43 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1626, + "end": 1627, + "loc": { + "start": { + "line": 45, + "column": 49 + }, + "end": { + "line": 45, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1638, + "end": 1682, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1638, + "end": 1681, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1638, + "end": 1678, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1638, + "end": 1672, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1638, + "end": 1669, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1638, + "end": 1644, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1645, + "end": 1668, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1645, + "end": 1659, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1645, + "end": 1653, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1654, + "end": 1659, + "loc": { + "start": { + "line": 46, + "column": 24 + }, + "end": { + "line": 46, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1660, + "end": 1667, + "loc": { + "start": { + "line": 46, + "column": 30 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1672, + "loc": { + "start": { + "line": 46, + "column": 40 + }, + "end": { + "line": 46, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1673, + "end": 1678, + "loc": { + "start": { + "line": 46, + "column": 43 + }, + "end": { + "line": 46, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1679, + "end": 1680, + "loc": { + "start": { + "line": 46, + "column": 49 + }, + "end": { + "line": 46, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1691, + "end": 1735, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1691, + "end": 1734, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1691, + "end": 1731, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1691, + "end": 1725, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1691, + "end": 1722, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1691, + "end": 1697, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1698, + "end": 1721, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1698, + "end": 1712, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1698, + "end": 1706, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1707, + "end": 1712, + "loc": { + "start": { + "line": 47, + "column": 24 + }, + "end": { + "line": 47, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1713, + "end": 1720, + "loc": { + "start": { + "line": 47, + "column": 30 + }, + "end": { + "line": 47, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1723, + "end": 1725, + "loc": { + "start": { + "line": 47, + "column": 40 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1726, + "end": 1731, + "loc": { + "start": { + "line": 47, + "column": 43 + }, + "end": { + "line": 47, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1732, + "end": 1733, + "loc": { + "start": { + "line": 47, + "column": 49 + }, + "end": { + "line": 47, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1744, + "end": 1788, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1744, + "end": 1787, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1744, + "end": 1784, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1744, + "end": 1778, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1744, + "end": 1775, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1744, + "end": 1750, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1751, + "end": 1774, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1751, + "end": 1765, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1751, + "end": 1759, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1760, + "end": 1765, + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1766, + "end": 1773, + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 37 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1776, + "end": 1778, + "loc": { + "start": { + "line": 48, + "column": 40 + }, + "end": { + "line": 48, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1779, + "end": 1784, + "loc": { + "start": { + "line": 48, + "column": 43 + }, + "end": { + "line": 48, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1785, + "end": 1786, + "loc": { + "start": { + "line": 48, + "column": 49 + }, + "end": { + "line": 48, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1802, + "end": 2084, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 58, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1802, + "end": 2083, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 58, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1802, + "end": 1804, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 51, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1805, + "end": 1848, + "loc": { + "start": { + "line": 51, + "column": 7 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "value": "compares a single of values with a filter", + "rawValue": "compares a single of values with a filter", + "raw": "\"compares a single of values with a filter\"" + }, + { + "type": "FunctionExpression", + "start": 1850, + "end": 2082, + "loc": { + "start": { + "line": 51, + "column": 52 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1861, + "end": 2082, + "loc": { + "start": { + "line": 51, + "column": 63 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1871, + "end": 1969, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 54, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1877, + "end": 1968, + "loc": { + "start": { + "line": 52, + "column": 14 + }, + "end": { + "line": 54, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1877, + "end": 1885, + "loc": { + "start": { + "line": 52, + "column": 14 + }, + "end": { + "line": 52, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1888, + "end": 1968, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 54, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1888, + "end": 1899, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1888, + "end": 1896, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1897, + "end": 1899, + "loc": { + "start": { + "line": 52, + "column": 34 + }, + "end": { + "line": 52, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1900, + "end": 1907, + "loc": { + "start": { + "line": 52, + "column": 37 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "ObjectExpression", + "start": 1909, + "end": 1967, + "loc": { + "start": { + "line": 52, + "column": 46 + }, + "end": { + "line": 54, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1923, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1923, + "end": 1929, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 1931, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 20 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1931, + "end": 1936, + "loc": { + "start": { + "line": 53, + "column": 20 + }, + "end": { + "line": 53, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 1940, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 29 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 1940, + "end": 1945, + "loc": { + "start": { + "line": 53, + "column": 29 + }, + "end": { + "line": 53, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 1950, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 39 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1979, + "end": 2023, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1979, + "end": 2022, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1979, + "end": 2019, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1979, + "end": 2013, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1979, + "end": 2010, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1979, + "end": 1985, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1986, + "end": 2009, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1986, + "end": 2000, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1986, + "end": 1994, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1995, + "end": 2000, + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2001, + "end": 2008, + "loc": { + "start": { + "line": 56, + "column": 30 + }, + "end": { + "line": 56, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2011, + "end": 2013, + "loc": { + "start": { + "line": 56, + "column": 40 + }, + "end": { + "line": 56, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2014, + "end": 2019, + "loc": { + "start": { + "line": 56, + "column": 43 + }, + "end": { + "line": 56, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2020, + "end": 2021, + "loc": { + "start": { + "line": 56, + "column": 49 + }, + "end": { + "line": 56, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2032, + "end": 2076, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2032, + "end": 2075, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2032, + "end": 2072, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2032, + "end": 2066, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2032, + "end": 2063, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2032, + "end": 2038, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2039, + "end": 2062, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2039, + "end": 2053, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2039, + "end": 2047, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2048, + "end": 2053, + "loc": { + "start": { + "line": 57, + "column": 24 + }, + "end": { + "line": 57, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2054, + "end": 2061, + "loc": { + "start": { + "line": 57, + "column": 30 + }, + "end": { + "line": 57, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2064, + "end": 2066, + "loc": { + "start": { + "line": 57, + "column": 40 + }, + "end": { + "line": 57, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2067, + "end": 2072, + "loc": { + "start": { + "line": 57, + "column": 43 + }, + "end": { + "line": 57, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2073, + "end": 2074, + "loc": { + "start": { + "line": 57, + "column": 49 + }, + "end": { + "line": 57, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2090, + "end": 2437, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2090, + "end": 2436, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2090, + "end": 2092, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 60, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2093, + "end": 2119, + "loc": { + "start": { + "line": 60, + "column": 7 + }, + "end": { + "line": 60, + "column": 33 + } + }, + "value": "compares with a function", + "rawValue": "compares with a function", + "raw": "\"compares with a function\"" + }, + { + "type": "FunctionExpression", + "start": 2121, + "end": 2435, + "loc": { + "start": { + "line": 60, + "column": 35 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2132, + "end": 2435, + "loc": { + "start": { + "line": 60, + "column": 46 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2142, + "end": 2268, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 63, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2148, + "end": 2267, + "loc": { + "start": { + "line": 61, + "column": 14 + }, + "end": { + "line": 63, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2148, + "end": 2156, + "loc": { + "start": { + "line": 61, + "column": 14 + }, + "end": { + "line": 61, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 2159, + "end": 2267, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 63, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2159, + "end": 2170, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 2159, + "end": 2167, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 2168, + "end": 2170, + "loc": { + "start": { + "line": 61, + "column": 34 + }, + "end": { + "line": 61, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2171, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 37 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2171, + "end": 2176, + "loc": { + "start": { + "line": 61, + "column": 37 + }, + "end": { + "line": 61, + "column": 42 + } + }, + "name": "value" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2180, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2180, + "end": 2197, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 63 + } + }, + "left": { + "type": "Identifier", + "start": 2180, + "end": 2185, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 51 + } + }, + "name": "value" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 2190, + "end": 2197, + "loc": { + "start": { + "line": 61, + "column": 56 + }, + "end": { + "line": 61, + "column": 63 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + }, + "consequent": { + "type": "Literal", + "start": 2200, + "end": 2201, + "loc": { + "start": { + "line": 61, + "column": 66 + }, + "end": { + "line": 61, + "column": 67 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 2204, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 70 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2205, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 71 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + }, + { + "type": "ObjectExpression", + "start": 2208, + "end": 2266, + "loc": { + "start": { + "line": 61, + "column": 74 + }, + "end": { + "line": 63, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2222, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 12 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2222, + "end": 2228, + "loc": { + "start": { + "line": 62, + "column": 12 + }, + "end": { + "line": 62, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 2230, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2230, + "end": 2235, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 2239, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 29 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 2239, + "end": 2244, + "loc": { + "start": { + "line": 62, + "column": 29 + }, + "end": { + "line": 62, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 2249, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 39 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2278, + "end": 2323, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 53 + } + }, + "expression": { + "type": "CallExpression", + "start": 2278, + "end": 2322, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2278, + "end": 2318, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2278, + "end": 2312, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2278, + "end": 2309, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2278, + "end": 2284, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2285, + "end": 2308, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2285, + "end": 2299, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2285, + "end": 2293, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2294, + "end": 2299, + "loc": { + "start": { + "line": 65, + "column": 24 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2300, + "end": 2307, + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 37 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2310, + "end": 2312, + "loc": { + "start": { + "line": 65, + "column": 40 + }, + "end": { + "line": 65, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2313, + "end": 2318, + "loc": { + "start": { + "line": 65, + "column": 43 + }, + "end": { + "line": 65, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 2319, + "end": 2321, + "loc": { + "start": { + "line": 65, + "column": 49 + }, + "end": { + "line": 65, + "column": 51 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2320, + "end": 2321, + "loc": { + "start": { + "line": 65, + "column": 50 + }, + "end": { + "line": 65, + "column": 51 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2332, + "end": 2376, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2332, + "end": 2375, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2332, + "end": 2372, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2332, + "end": 2366, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2332, + "end": 2363, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2332, + "end": 2338, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2339, + "end": 2362, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2339, + "end": 2353, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2339, + "end": 2347, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2348, + "end": 2353, + "loc": { + "start": { + "line": 66, + "column": 24 + }, + "end": { + "line": 66, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2354, + "end": 2361, + "loc": { + "start": { + "line": 66, + "column": 30 + }, + "end": { + "line": 66, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2364, + "end": 2366, + "loc": { + "start": { + "line": 66, + "column": 40 + }, + "end": { + "line": 66, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2367, + "end": 2372, + "loc": { + "start": { + "line": 66, + "column": 43 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2373, + "end": 2374, + "loc": { + "start": { + "line": 66, + "column": 49 + }, + "end": { + "line": 66, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2385, + "end": 2429, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2385, + "end": 2428, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2385, + "end": 2425, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2385, + "end": 2419, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2385, + "end": 2416, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2385, + "end": 2391, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2392, + "end": 2415, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2392, + "end": 2406, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2392, + "end": 2400, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2401, + "end": 2406, + "loc": { + "start": { + "line": 67, + "column": 24 + }, + "end": { + "line": 67, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2407, + "end": 2414, + "loc": { + "start": { + "line": 67, + "column": 30 + }, + "end": { + "line": 67, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2417, + "end": 2419, + "loc": { + "start": { + "line": 67, + "column": 40 + }, + "end": { + "line": 67, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2420, + "end": 2425, + "loc": { + "start": { + "line": 67, + "column": 43 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2426, + "end": 2427, + "loc": { + "start": { + "line": 67, + "column": 49 + }, + "end": { + "line": 67, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/examples/test.js.json b/ExpectStreamBak/docs/ast/source/examples/test.js.json new file mode 100644 index 0000000..1130fe3 --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/examples/test.js.json @@ -0,0 +1,17 @@ +{ + "type": "Program", + "start": 0, + "end": 0, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + }, + "sourceType": "module", + "body": [] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/ast/source/index.js.json b/ExpectStreamBak/docs/ast/source/index.js.json new file mode 100644 index 0000000..b042b04 --- /dev/null +++ b/ExpectStreamBak/docs/ast/source/index.js.json @@ -0,0 +1,376 @@ +{ + "type": "Program", + "start": 0, + "end": 123, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "StreamHelper" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": "./StreamHelper", + "rawValue": "./StreamHelper", + "raw": "\"./StreamHelper\"" + } + }, + { + "type": "VariableDeclaration", + "start": 44, + "end": 73, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 50, + "end": 72, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 50, + "end": 54, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "name": "chai" + }, + "init": { + "type": "CallExpression", + "start": 57, + "end": 72, + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "callee": { + "type": "Identifier", + "start": 57, + "end": 64, + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + }, + "name": "require" + }, + "arguments": [ + { + "type": "Literal", + "start": 65, + "end": 71, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 75, + "end": 98, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 75, + "end": 97, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 75, + "end": 83, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "object": { + "type": "Identifier", + "start": 75, + "end": 79, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + }, + "name": "chai" + }, + "property": { + "type": "Identifier", + "start": 80, + "end": 83, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "name": "use" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 84, + "end": 96, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 21 + } + }, + "name": "StreamHelper" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 100, + "end": 122, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 22 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 100, + "end": 121, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 100, + "end": 114, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 14 + } + }, + "object": { + "type": "Identifier", + "start": 100, + "end": 106, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + }, + "name": "module" + }, + "property": { + "type": "Identifier", + "start": 107, + "end": 114, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 14 + } + }, + "name": "exports" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 117, + "end": 121, + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + }, + "name": "chai" + } + } + } + ] +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/badge.svg b/ExpectStreamBak/docs/badge.svg new file mode 100644 index 0000000..2676430 --- /dev/null +++ b/ExpectStreamBak/docs/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + 50% + 50% + + diff --git a/ExpectStreamBak/docs/class/src/AssertStream.js~AssertStream.html b/ExpectStreamBak/docs/class/src/AssertStream.js~AssertStream.html new file mode 100644 index 0000000..4f20b1e --- /dev/null +++ b/ExpectStreamBak/docs/class/src/AssertStream.js~AssertStream.html @@ -0,0 +1,464 @@ + + + + + + AssertStream | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +
+
import AssertStream from 'expect-stream/src/AssertStream.js'
+ public + class + + + + | source +
+ +
+

AssertStream

+ + + + + +

Extends:

stream~Writable → AssertStream
+ + + + + + + + + +

this stream is used to be piped into. +it ends if the expected value was received.

+
+ + + + + + + + +
+ + + +

Constructor Summary

+ + + + + + + + + +
Public Constructor
+ public + + + + + +
+

+ constructor(expected: *, options: object) +

+
+
+ + +

constructor for this stream

+
+
+
+ + +
+
+

Member Summary

+ + + + + + + + + + + + + + +
Public Members
+ public + + + + + +
+

+ expected: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ tapper: * +

+
+
+ + + +
+
+ + +
+
+

Method Summary

+ + + + + + + + + +
Public Methods
+ public + + + + + +
+

+ _write(chunk: string | object, enc: string, cb: function): * +

+
+
+ + +

implementation of the write function.

+
+
+
+ + +
+
+ + + + + +

Public Constructors

+ +
+

+ public + + + + + constructor(expected: *, options: object) + + + + source + +

+ + + + +

constructor for this stream

+
+ + + +
+

Params:

+ + + + + + + + + + + + + + + + + + + +
NameTypeAttributeDescription
expected*

value

+
optionsobject

configuring the behaviour of AssertSream

+
+
+
+ + + + + + + + + + + + + + + +
+
+

Public Members

+ +
+

+ public + + + + + expected: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + tapper: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

Public Methods

+ +
+

+ public + + + + + _write(chunk: string | object, enc: string, cb: function): * + + + + source + +

+ + + + +

implementation of the write function. transforms data, +so that it can be compared, emits end on match, otherwise +continues.

+
+ + + +
+

Params:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributeDescription
chunkstring | object

of data

+
encstring

of data

+
cbfunction

when operation finished

+
+
+
+ +
+

Return:

+ + + + + +
*
+
+
+
+ + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/class/src/Expected.js~Expected.html b/ExpectStreamBak/docs/class/src/Expected.js~Expected.html new file mode 100644 index 0000000..e7660fa --- /dev/null +++ b/ExpectStreamBak/docs/class/src/Expected.js~Expected.html @@ -0,0 +1,983 @@ + + + + + + Expected | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +
+
import Expected from 'expect-stream/src/Expected.js'
+ public + class + + + + | source +
+ +
+

Expected

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

Static Method Summary

+ + + + + + + + + +
Static Public Methods
+ public + static + + + + +
+

+ of(args: *): Expected +

+
+
+ + +

Creates an ExpectationClass, that checks, +whether an incoming value matches the +expectations

+
+
+
+ + +
+
+

Constructor Summary

+ + + + + + + + + +
Public Constructor
+ public + + + + + +
+

+ constructor(expected: *, options: object) +

+
+
+ + +

Constructor of Expected

+
+
+
+ + +
+
+

Member Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Public Members
+ public + + + + + +
+

+ expected: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ expection: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ filter: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ matcher: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ messages: * +

+
+
+ + + +
+
+ + +
+ public + + + + + +
+

+ onMisMatch: * +

+
+
+ + + +
+
+ + +
+
+

Method Summary

+ + + + + + + + + + + + + + + + + + + +
Public Methods
+ public + + + + + +
+

+ getError(): Error +

+
+
+ + +

produces the error containing the expected vs actual results

+
+
+
+ + +
+ public + + + + + +
+

+ includes(value: *): Number +

+
+
+ + +

Checks if next value in list matches the input

+
+
+
+ + +
+ public + + + + + +
+

+ match(value: *): Number +

+
+
+ + +

Compares input with expectations

+
+
+
+ + +
+
+ + + + +

Static Public Methods

+ +
+

+ public + static + + + + of(args: *): Expected + + + + source + +

+ + + + +

Creates an ExpectationClass, that checks, +whether an incoming value matches the +expectations

+
+ + + +
+

Params:

+ + + + + + + + + + + + + +
NameTypeAttributeDescription
args*

needed for creation

+
+
+
+ +
+

Return:

+ + + + + +
Expected
+
+
+
+ + + + + + + + + + + + + +
+
+

Public Constructors

+ +
+

+ public + + + + + constructor(expected: *, options: object) + + + + source + +

+ + + + +

Constructor of Expected

+
+ + + +
+

Params:

+ + + + + + + + + + + + + + + + + + + +
NameTypeAttributeDescription
expected*

compared with input

+
optionsobject

for custom matcning behaviour

+
+
+
+ + + + + + + + + + + + + + + +
+
+

Public Members

+ +
+

+ public + + + + + expected: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + expection: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + filter: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + matcher: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + messages: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

+ public + + + + + onMisMatch: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+

Public Methods

+ +
+

+ public + + + + + getError(): Error + + + + source + +

+ + + + +

produces the error containing the expected vs actual results

+
+ + + +
+
+ +
+

Return:

+ + + + + +
Error
+
+
+
+ + + + + + + + + + + + + +
+
+

+ public + + + + + includes(value: *): Number + + + + source + +

+ + + + +

Checks if next value in list matches the input

+
+ + + +
+

Params:

+ + + + + + + + + + + + + +
NameTypeAttributeDescription
value*

to be compared

+
+
+
+ +
+

Return:

+ + + + + +
Number
+
+
+
+ + + + + + + + + + + + + +
+
+

+ public + + + + + match(value: *): Number + + + + source + +

+ + + + +

Compares input with expectations

+
+ + + +
+

Params:

+ + + + + + + + + + + + + +
NameTypeAttributeDescription
value*

to be compared

+
+
+
+ +
+

Return:

+ + + + + +
Number
+
+
+
+ + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/coverage.json b/ExpectStreamBak/docs/coverage.json new file mode 100644 index 0000000..05c148e --- /dev/null +++ b/ExpectStreamBak/docs/coverage.json @@ -0,0 +1,33 @@ +{ + "coverage": "50%", + "expectCount": 18, + "actualCount": 9, + "files": { + "src/AssertStream.js": { + "expectCount": 5, + "actualCount": 3, + "undocumentLines": [ + 25, + 26 + ] + }, + "src/Expected.js": { + "expectCount": 12, + "actualCount": 5, + "undocumentLines": [ + 8, + 32, + 31, + 35, + 33, + 30, + 34 + ] + }, + "src/StreamHelper.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + } + } +} \ No newline at end of file diff --git a/ExpectStreamBak/docs/css/prettify-tomorrow.css b/ExpectStreamBak/docs/css/prettify-tomorrow.css new file mode 100644 index 0000000..b6f92a7 --- /dev/null +++ b/ExpectStreamBak/docs/css/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/ExpectStreamBak/docs/css/style.css b/ExpectStreamBak/docs/css/style.css new file mode 100644 index 0000000..baf349f --- /dev/null +++ b/ExpectStreamBak/docs/css/style.css @@ -0,0 +1,944 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700); + +* { + margin: 0; + padding: 0; + text-decoration: none; +} + +html +{ + font-family: 'Roboto', sans-serif; + overflow: auto; + font-size: 14px; + /*color: #4d4e53;*/ + color: rgba(0, 0, 0, .68); + background-color: #fff; +} + +a { + /*color: #0095dd;*/ + /*color:rgb(37, 138, 175);*/ + color: #039BE5; +} + +code a:hover { + text-decoration: underline; +} + +ul, ol { + padding-left: 20px; +} + +ul li { + list-style: disc; + margin: 4px 0; +} + +ol li { + margin: 4px 0; +} + +h1 { + margin-bottom: 10px; + font-size: 34px; + font-weight: 300; + border-bottom: solid 1px #ddd; +} + +h2 { + margin-top: 24px; + margin-bottom: 10px; + font-size: 20px; + border-bottom: solid 1px #ddd; + font-weight: 300; +} + +h3 { + position: relative; + font-size: 16px; + margin-bottom: 12px; + background-color: #E2E2E2; + padding: 4px; + font-weight: 300; +} + +del { + text-decoration: line-through; +} + +p { + margin-bottom: 15px; + line-height: 1.5; +} + +p > code { + background-color: #f5f5f5; + border-radius: 3px; +} + +pre > code { + display: block; +} + +pre.prettyprint, pre > code { + padding: 4px; + margin: 1em 0; + background-color: #f5f5f5; + border-radius: 3px; +} + +pre.prettyprint > code { + margin: 0; +} + +p > code, +li > code { + padding: 0 4px; + border-radius: 3px; +} + +.import-path pre.prettyprint, +.import-path pre.prettyprint code { + margin: 0; + padding: 0; + border: none; + background: white; +} + +.layout-container { + /*display: flex;*/ + /*flex-direction: row;*/ + /*justify-content: flex-start;*/ + /*align-items: stretch;*/ +} + +.layout-container > header { + height: 40px; + line-height: 40px; + font-size: 16px; + padding: 0 10px; + margin: 0; + position: fixed; + width: 100%; + z-index: 1; + background-color: white; + top: 0; + border-bottom: solid 1px #E02130; +} +.layout-container > header > a{ + margin: 0 5px; +} + +.layout-container > header > a.repo-url-github { + font-size: 0; + display: inline-block; + width: 20px; + height: 38px; + background: url("../image/github.png") no-repeat center; + background-size: 20px; + vertical-align: top; +} + +.navigation { + position: fixed; + top: 0; + left: 0; + box-sizing: border-box; + width: 250px; + height: 100%; + padding-top: 40px; + padding-left: 15px; + padding-bottom: 2em; + margin-top:1em; + overflow-x: scroll; + box-shadow: rgba(255, 255, 255, 1) -1px 0 0 inset; + border-right: 1px solid rgba(0, 0, 0, 0.1); +} + +.navigation ul { + padding: 0; +} + +.navigation li { + list-style: none; + margin: 4px 0; + white-space: nowrap; +} + +.navigation .nav-dir-path { + margin-top: 0.7em; + margin-bottom: 0.25em; + font-size: 0.8em; + color: #aaa; +} + +.kind-class, +.kind-interface, +.kind-function, +.kind-typedef, +.kind-variable, +.kind-external { + margin-left: 0.75em; + width: 1.2em; + height: 1.2em; + display: inline-block; + text-align: center; + border-radius: 0.2em; + margin-right: 0.2em; + font-weight: bold; +} + +.kind-class { + color: #009800; + background-color: #bfe5bf; +} + +.kind-interface { + color: #fbca04; + background-color: #fef2c0; +} + +.kind-function { + color: #6b0090; + background-color: #d6bdde; +} + +.kind-variable { + color: #eb6420; + background-color: #fad8c7; +} + +.kind-typedef { + color: #db001e; + background-color: #edbec3; +} + +.kind-external { + color: #0738c3; + background-color: #bbcbea; +} + +h1 .version, +h1 .url a { + font-size: 14px; + color: #aaa; +} + +.content { + margin-top: 40px; + margin-left: 250px; + padding: 10px 50px 10px 20px; +} + +.header-notice { + font-size: 14px; + color: #aaa; + margin: 0; +} + +.expression-extends .prettyprint { + margin-left: 10px; + background: white; +} + +.extends-chain { + border-bottom: 1px solid#ddd; + padding-bottom: 10px; + margin-bottom: 10px; +} + +.extends-chain span:nth-of-type(1) { + padding-left: 10px; +} + +.extends-chain > div { + margin: 5px 0; +} + +.description table { + font-size: 14px; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +.description thead { + background: #999; + color: white; +} + +.description table td, +.description table th { + border: solid 1px #ddd; + padding: 4px; + font-weight: normal; +} + +.flat-list ul { + padding-left: 0; +} + +.flat-list li { + display: inline; + list-style: none; +} + +table.summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.summary thead { + background: #999; + color: white; +} + +table.summary td { + border: solid 1px #ddd; + padding: 4px 10px; +} + +table.summary tbody td:nth-child(1) { + text-align: right; + white-space: nowrap; + min-width: 64px; + vertical-align: top; +} + +table.summary tbody td:nth-child(2) { + width: 100%; + border-right: none; +} + +table.summary tbody td:nth-child(3) { + white-space: nowrap; + border-left: none; + vertical-align: top; +} + +table.summary td > div:nth-of-type(2) { + padding-top: 4px; + padding-left: 15px; +} + +table.summary td p { + margin-bottom: 0; +} + +.inherited-summary thead td { + padding-left: 2px; +} + +.inherited-summary thead a { + color: white; +} + +.inherited-summary .summary tbody { + display: none; +} + +.inherited-summary .summary .toggle { + padding: 0 4px; + font-size: 12px; + cursor: pointer; +} +.inherited-summary .summary .toggle.closed:before { + content: "â–¶"; +} +.inherited-summary .summary .toggle.opened:before { + content: "â–¼"; +} + +.member, .method { + margin-bottom: 24px; +} + +table.params { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.params thead { + background: #eee; + color: #aaa; +} + +table.params td { + padding: 4px; + border: solid 1px #ddd; +} + +table.params td p { + margin: 0; +} + +.content .detail > * { + margin: 15px 0; +} + +.content .detail > h3 { + color: black; +} + +.content .detail > div { + margin-left: 10px; +} + +.content .detail > .import-path { + margin-top: -8px; +} + +.content .detail + .detail { + margin-top: 30px; +} + +.content .detail .throw td:first-child { + padding-right: 10px; +} + +.content .detail h4 + :not(pre) { + padding-left: 0; + margin-left: 10px; +} + +.content .detail h4 + ul li { + list-style: none; +} + +.return-param * { + display: inline; +} + +.argument-params { + margin-bottom: 20px; +} + +.return-type { + padding-right: 10px; + font-weight: normal; +} + +.return-desc { + margin-left: 10px; + margin-top: 4px; +} + +.return-desc p { + margin: 0; +} + +.deprecated, .experimental, .instance-docs { + border-left: solid 5px orange; + padding-left: 4px; + margin: 4px 0; +} + +tr.listen p, +tr.throw p, +tr.emit p{ + margin-bottom: 10px; +} + +.version, .since { + color: #aaa; +} + +h3 .right-info { + position: absolute; + right: 4px; + font-size: 14px; +} + +.version + .since:before { + content: '| '; +} + +.see { + margin-top: 10px; +} + +.see h4 { + margin: 4px 0; +} + +.content .detail h4 + .example-doc { + margin: 6px 0; +} + +.example-caption { + position: relative; + bottom: -1px; + display: inline-block; + padding: 4px; + font-style: italic; + background-color: #f5f5f5; + font-weight: bold; + border-radius: 3px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.example-caption + pre.source-code { + margin-top: 0; + border-top-left-radius: 0; +} + +footer, .file-footer { + text-align: right; + font-style: italic; + font-weight: 100; + font-size: 13px; + margin-right: 50px; + margin-left: 270px; + border-top: 1px solid #ddd; + padding-top: 30px; + margin-top: 20px; + padding-bottom: 10px; +} + +pre.source-code { + background: #f5f5f5; + padding: 4px; +} + +pre.raw-source-code > code { + padding: 0; + margin: 0; +} + +pre.source-code.line-number { + padding: 0; +} + +pre.source-code ol { + background: #eee; + padding-left: 40px; +} + +pre.source-code li { + background: white; + padding-left: 4px; + list-style: decimal; + margin: 0; +} + +pre.source-code.line-number li.active { + background: rgb(255, 255, 150); +} + +pre.source-code.line-number li.error-line { + background: #ffb8bf; +} + +table.files-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; + text-align: right; +} + +table.files-summary tbody tr:hover { + background: #eee; +} + +table.files-summary td:first-child, +table.files-summary td:nth-of-type(2) { + text-align: left; +} + +table.files-summary[data-use-coverage="false"] td.coverage { + display: none; +} + +table.files-summary thead { + background: #999; + color: white; +} + +table.files-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.files-summary td.identifiers > span { + display: block; + margin-top: 4px; +} +table.files-summary td.identifiers > span:first-child { + margin-top: 0; +} + +table.files-summary .coverage-count { + font-size: 12px; + color: #aaa; + display: inline-block; + min-width: 40px; +} + +.total-coverage-count { + position: relative; + bottom: 2px; + font-size: 12px; + color: #666; + font-weight: 500; + padding-left: 5px; +} + +table.test-summary thead { + background: #999; + color: white; +} + +table.test-summary thead .test-description { + width: 50%; +} + +table.test-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.test-summary thead .test-count { + width: 3em; +} + +table.test-summary tbody tr:hover { + background-color: #eee; +} + +table.test-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.test-summary td p { + margin: 0; +} + +table.test-summary tr.test-describe .toggle { + display: inline-block; + float: left; + margin-right: 4px; + cursor: pointer; +} + +table.test-summary tr.test-describe .toggle.opened:before { + content: 'â–¼'; +} + +table.test-summary tr.test-describe .toggle.closed:before { + content: 'â–¶'; +} + +table.test-summary .test-target > span { + display: block; + margin-top: 4px; +} +table.test-summary .test-target > span:first-child { + margin-top: 0; +} + +.inner-link-active { + background: rgb(255, 255, 150); +} + +/* search box */ +.search-box { + position: absolute; + top: 10px; + right: 50px; + padding-right: 8px; + padding-bottom: 10px; + line-height: normal; + font-size: 12px; +} + +.search-box img { + width: 20px; + vertical-align: top; +} + +.search-input { + display: inline; + visibility: hidden; + width: 0; + padding: 2px; + height: 1.5em; + outline: none; + background: transparent; + border: 1px #0af; + border-style: none none solid none; + vertical-align: bottom; +} + +.search-input-edge { + display: none; + width: 1px; + height: 5px; + background-color: #0af; + vertical-align: bottom; +} + +.search-result { + position: absolute; + display: none; + height: 600px; + width: 100%; + padding: 0; + margin-top: 5px; + margin-left: 24px; + background: white; + box-shadow: 1px 1px 4px rgb(0,0,0); + white-space: nowrap; + overflow-y: scroll; +} + +.search-result-import-path { + color: #aaa; + font-size: 12px; +} + +.search-result li { + list-style: none; + padding: 2px 4px; +} + +.search-result li a { + display: block; +} + +.search-result li.selected { + background: #ddd; +} + +.search-result li.search-separator { + background: rgb(37, 138, 175); + color: white; +} + +.search-box.active .search-input { + visibility: visible; + transition: width 0.2s ease-out; + width: 300px; +} + +.search-box.active .search-input-edge { + display: inline-block; +} + +/* coverage badge */ +.esdoc-coverage { + display: inline-block; + height: 20px; + vertical-align: top; +} + +h1 .esdoc-coverage { + position: relative; + top: -4px; +} + +.esdoc-coverage-wrap { + color: white; + font-size: 12px; + font-weight: 500; +} + +.esdoc-coverage-label { + padding: 3px 4px 3px 6px; + background: linear-gradient(to bottom, #5e5e5e 0%,#4c4c4c 100%); + border-radius: 4px 0 0 4px; + display: inline-block; + height: 20px; + box-sizing: border-box; + line-height: 14px; +} + +.esdoc-coverage-ratio { + padding: 3px 6px 3px 4px; + border-radius: 0 4px 4px 0; + display: inline-block; + height: 20px; + box-sizing: border-box; + line-height: 14px; +} + +.esdoc-coverage-low { + background: linear-gradient(to bottom, #db654f 0%,#c9533d 100%); +} + +.esdoc-coverage-middle { + background: linear-gradient(to bottom, #dab226 0%,#c9a179 100%); +} + +.esdoc-coverage-high { + background: linear-gradient(to bottom, #4fc921 0%,#3eb810 100%); +} + +.github-markdown .manual-toc { + padding-left: 0; +} + +/** manual */ + +.manual-root .navigation { + padding-left: 0; +} + +.navigation .manual-toc-title { + margin: 0; + padding: 0.5em 0 0.5em 1em; + border: none; + font-size: 1em; + font-weight: normal; +} + +.navigation .manual-toc-title:first-child { + margin-top: 0; +} + +.navigation .manual-toc { + display: none; + margin-left: 0.5em; + margin-top: -0.25em; +} + +.github-markdown .manual-toc-title a { + color: inherit; +} + +.manual-breadcrumb-list { + font-size: 0.8em; + margin-bottom: 1em; +} + +.manual-toc-title a:hover { + color: #039BE5; +} + +.manual-toc li { + margin: 0.75em 0; + list-style-type: none; +} + +.manual-toc .indent-h1 { + margin-left: 0; +} +.manual-toc .indent-h2 { + margin-left: 1em; +} +.manual-toc .indent-h3 { + margin-left: 3em; +} +.manual-toc .indent-h4 { + margin-left: 4em; +} +.manual-toc .indent-h5 { + margin-left: 5em; +} + +.manual-nav li { + margin: 0.75em 0; +} + +.manual-dot { + margin-left: 0.75em; + width: 0.6em; + height: 0.6em; + display: inline-block; + border-radius: 0.3em; + margin-right: 0.3em; + background-color: #bfe5bf; +} + +/* github markdown */ +.github-markdown { + font-size: 16px; +} + +.github-markdown h1, +.github-markdown h2, +.github-markdown h3, +.github-markdown h4, +.github-markdown h5 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + padding: 0; +} + +.github-markdown h1:nth-of-type(1) { + margin-top: 0; +} + +.github-markdown h1 { + font-size: 2em; + padding-bottom: 0.3em; +} + +.github-markdown h2 { + font-size: 1.75em; + padding-bottom: 0.3em; +} + +.github-markdown h3 { + font-size: 1.5em; + background-color: transparent; +} + +.github-markdown h4 { + font-size: 1.25em; +} + +.github-markdown h5 { + font-size: 1em; +} + +.github-markdown ul, .github-markdown ol { + padding-left: 2em; +} + +.github-markdown pre > code { + font-size: 0.85em; +} + +.github-markdown table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.github-markdown table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.github-markdown table th, +.github-markdown table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.github-markdown table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +/** badge(.svg) does not have border */ +.github-markdown img:not([src*=".svg"]) { + max-width: 100%; + box-shadow: 1px 1px 1px rgba(0,0,0,0.5); +} diff --git a/ExpectStreamBak/docs/dump.json b/ExpectStreamBak/docs/dump.json new file mode 100644 index 0000000..4089451 --- /dev/null +++ b/ExpectStreamBak/docs/dump.json @@ -0,0 +1,1582 @@ +[ + { + "__docId__": 0, + "kind": "file", + "static": true, + "variation": null, + "name": "src/AssertStream.js", + "memberof": null, + "longname": "src/AssertStream.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import { Writable } from \"stream\";\nimport Expected from \"./Expected\";\nimport defaults from \"set-default-value\";\n\n/**\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n */\nexport default class AssertStream extends Writable {\n\n /**\n * constructor for this stream\n *\n * @constructor\n * @param {*} expected value\n * @param {object} options configuring the behaviour of AssertSream\n */\n constructor(expected, options) {\n super({\n objectMode: true\n });\n\n this.expected = Expected.of(expected, options);\n this.tapper = defaults(options.tapper).to(() => {});\n }\n\n /**\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n */\n _write(chunk, enc, cb) {\n const data = Buffer.isBuffer(chunk) ? chunk.toString() : chunk;\n const result = this.expected.match(data);\n\n this.tapper(data, result);\n\n return result === -1 ? this.emit(\"error\", this.expected.getError()) : setTimeout(() => result === 1 ? this.emit(\"done\") : cb(), 1);\n }\n}\n" + }, + { + "__docId__": 1, + "kind": "class", + "static": true, + "variation": null, + "name": "AssertStream", + "memberof": "src/AssertStream.js", + "longname": "src/AssertStream.js~AssertStream", + "access": null, + "export": true, + "importPath": "expect-stream/src/AssertStream.js", + "importStyle": "AssertStream", + "description": "this stream is used to be piped into.\nit ends if the expected value was received.", + "lineNumber": 11, + "unknown": [ + { + "tagName": "@author", + "tagValue": "Marco Sliwa " + } + ], + "interface": false, + "extends": [ + "stream~Writable" + ] + }, + { + "__docId__": 2, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#constructor", + "access": null, + "description": "constructor for this stream", + "lineNumber": 20, + "unknown": [ + { + "tagName": "@constructor", + "tagValue": "" + } + ], + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "expected", + "description": "value" + }, + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "options", + "description": "configuring the behaviour of AssertSream" + } + ], + "generator": false + }, + { + "__docId__": 3, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#expected", + "access": null, + "description": null, + "lineNumber": 25, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 4, + "kind": "member", + "static": false, + "variation": null, + "name": "tapper", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#tapper", + "access": null, + "description": null, + "lineNumber": 26, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 5, + "kind": "method", + "static": false, + "variation": null, + "name": "_write", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#_write", + "access": null, + "description": "implementation of the write function. transforms data,\nso that it can be compared, emits end on match, otherwise\ncontinues.", + "lineNumber": 39, + "params": [ + { + "nullable": null, + "types": [ + "string", + "object" + ], + "spread": false, + "optional": false, + "name": "chunk", + "description": "of data" + }, + { + "nullable": null, + "types": [ + "string" + ], + "spread": false, + "optional": false, + "name": "enc", + "description": "of data" + }, + { + "nullable": null, + "types": [ + "function" + ], + "spread": false, + "optional": false, + "name": "cb", + "description": "when operation finished" + } + ], + "return": { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 6, + "kind": "file", + "static": true, + "variation": null, + "name": "src/Expected.js", + "memberof": null, + "longname": "src/Expected.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isArray from \"lodash.isarray\";\nimport isEqual from \"lodash.isequal\";\nimport isFunction from \"lodash.isfunction\";\nimport isNil from \"lodash.isnil\";\nimport isMatch from \"lodash.ismatch\";\nimport { expect } from \"chai\";\n\nexport default class Expected {\n\n /**\n * Creates an ExpectationClass, that checks,\n * whether an incoming value matches the\n * expectations\n *\n * @param {*} args needed for creation\n * @return {Expected}\n */\n static of(...args) {\n return new Expected(...args);\n }\n\n /**\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n */\n constructor(expected, { filter, eventually, strict }) {\n this.messages = [];\n this.expection = isArray(expected) ? expected.slice(0) : expected;\n this.expected = expected;\n this.matcher = isNil(strict) ? isMatch : isEqual;\n this.onMisMatch = isNil(eventually) ? -1 : 0;\n this.filter = isNil(filter) ? () => true : filter;\n }\n\n /**\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n */\n includes(value) {\n const expected = this.expected.shift();\n const matches = this.matcher(value, expected);\n const onMatch = this.expected.length === 0 ? 1 : 0;\n\n this.expected = matches ? this.expected : [expected].concat(this.expected);\n\n return matches ? onMatch : this.onMisMatch;\n }\n\n /**\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n */\n match(value) { // eslint-disable-line\n this.messages.push(value);\n\n if(!this.filter(value)) return 0;\n if(isFunction(this.expected)) return this.expected(value);\n if(isArray(this.expected)) return this.includes(value);\n\n return this.matcher(value, this.expected) ? 1 : this.onMisMatch;\n }\n\n /**\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n */\n getError() {\n if(isFunction(this.expection)) return new Error(`the messages ${JSON.stringify(this.messages)} do not match your expectations.`);\n\n try {\n expect(this.messages).to.eql(this.expection);\n\n return null;\n } catch(e) {\n return e;\n }\n }\n}\n" + }, + { + "__docId__": 7, + "kind": "class", + "static": true, + "variation": null, + "name": "Expected", + "memberof": "src/Expected.js", + "longname": "src/Expected.js~Expected", + "access": null, + "export": true, + "importPath": "expect-stream/src/Expected.js", + "importStyle": "Expected", + "description": null, + "lineNumber": 8, + "undocument": true, + "interface": false + }, + { + "__docId__": 8, + "kind": "method", + "static": true, + "variation": null, + "name": "of", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected.of", + "access": null, + "description": "Creates an ExpectationClass, that checks,\nwhether an incoming value matches the\nexpectations", + "lineNumber": 18, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "args", + "description": "needed for creation" + } + ], + "return": { + "nullable": null, + "types": [ + "Expected" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 9, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#constructor", + "access": null, + "description": "Constructor of Expected", + "lineNumber": 29, + "unknown": [ + { + "tagName": "@constructor", + "tagValue": "" + } + ], + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "expected", + "description": "compared with input" + }, + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "options", + "description": "for custom matcning behaviour" + } + ], + "generator": false + }, + { + "__docId__": 10, + "kind": "member", + "static": false, + "variation": null, + "name": "messages", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#messages", + "access": null, + "description": null, + "lineNumber": 30, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 11, + "kind": "member", + "static": false, + "variation": null, + "name": "expection", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expection", + "access": null, + "description": null, + "lineNumber": 31, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 12, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expected", + "access": null, + "description": null, + "lineNumber": 32, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 13, + "kind": "member", + "static": false, + "variation": null, + "name": "matcher", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#matcher", + "access": null, + "description": null, + "lineNumber": 33, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 14, + "kind": "member", + "static": false, + "variation": null, + "name": "onMisMatch", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#onMisMatch", + "access": null, + "description": null, + "lineNumber": 34, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 15, + "kind": "member", + "static": false, + "variation": null, + "name": "filter", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#filter", + "access": null, + "description": null, + "lineNumber": 35, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 16, + "kind": "method", + "static": false, + "variation": null, + "name": "includes", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#includes", + "access": null, + "description": "Checks if next value in list matches the input", + "lineNumber": 44, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "value", + "description": "to be compared" + } + ], + "return": { + "nullable": null, + "types": [ + "Number" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 17, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expected", + "access": null, + "description": null, + "lineNumber": 49, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 18, + "kind": "method", + "static": false, + "variation": null, + "name": "match", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#match", + "access": null, + "description": "Compares input with expectations", + "lineNumber": 60, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "value", + "description": "to be compared" + } + ], + "return": { + "nullable": null, + "types": [ + "Number" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 19, + "kind": "method", + "static": false, + "variation": null, + "name": "getError", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#getError", + "access": null, + "description": "produces the error containing the expected vs actual results", + "lineNumber": 75, + "params": [], + "return": { + "nullable": null, + "types": [ + "Error" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 20, + "kind": "file", + "static": true, + "variation": null, + "name": "src/StreamHelper.js", + "memberof": null, + "longname": "src/StreamHelper.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isFunction from \"lodash.isfunction\";\nimport assert from \"assert\";\nimport AssertStream from \"./AssertStream\";\nimport defaults from \"set-default-value\";\n\n/**\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n */\nconst StreamHelper = function({ Assertion }) {\n Assertion.addChainableMethod(\"exactly\", function(expected) {\n this.expected = defaults(expected).to(this.expected);\n this.strictEquality = true;\n }, function() {\n this.strictEquality = true;\n });\n\n Assertion.addChainableMethod(\"produce\", function(expected) {\n this.expected = expected;\n this.args = [];\n }, function() {\n this.args = [];\n });\n\n Assertion.addProperty(\"eventually\", function() {\n this.checkAllResults = true;\n });\n\n Assertion.addMethod(\"filter\", function(filter) {\n this.filterMethod = filter;\n });\n\n Assertion.addMethod(\"notify\", function(done) {\n const sink = new AssertStream(this.expected, {\n filter: this.filterMethod,\n tapper: this.tapper,\n eventually: this.checkAllResults,\n strict: this.strictEquality\n });\n\n this._obj.pipe(sink) // eslint-disable-line\n .on(\"done\", done)\n .on(\"error\", done);\n\n this.args.forEach(arg => this._obj.write(arg)); // eslint-disable-line\n });\n\n Assertion.addMethod(\"tap\", function(tapper) {\n this.tapper = tapper;\n });\n\n Assertion.addMethod(\"on\", function(...args) {\n const { write } = this._obj; // eslint-disable-line\n\n assert(\n (args.length > 0 && isFunction(write)) ||\n (args.length === 0 && !isFunction(write)\n ), \"You can only use arguments with a writable stream.\");\n\n this.args = args;\n });\n};\n\nexport default StreamHelper;\n" + }, + { + "__docId__": 21, + "kind": "function", + "static": true, + "variation": null, + "name": "StreamHelper", + "memberof": "src/StreamHelper.js", + "longname": "src/StreamHelper.js~StreamHelper", + "access": null, + "export": true, + "importPath": "expect-stream/src/StreamHelper.js", + "importStyle": "StreamHelper", + "description": "this function adds the new methods to the Assertion\nchain, where they have the following responsibilities:\n\nproduce: sets the expected value of the stream\non: gives a set of input values, if testing\n a transformer\nnotify: cb for error and done notifications", + "lineNumber": 17, + "params": [ + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "chai", + "description": "to be extended" + } + ], + "generator": false + }, + { + "__docId__": 22, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/AssertStreamTest.js", + "memberof": null, + "longname": "src/__tests__/AssertStreamTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import AssertStream from \"../AssertStream\";\nimport sinon from \"sinon\";\nimport { expect } from \"chai\";\n\ndescribe(\"AssertStreamTest\", function() {\n it(\"writes to an assert stream with a value expectation, until it ends with the expected value.\", function(done) {\n const tapSpy = sinon.spy();\n const onEnd = sinon.spy();\n const stream = new AssertStream({\n test: \"test\"\n }, {\n tapper: tapSpy,\n eventually: true\n });\n\n stream.on(\"done\", onEnd);\n\n stream.write(\"bla\");\n stream.write({});\n stream.write({\n test: \"test\"\n });\n\n setTimeout(function() {\n expect(onEnd.callCount).to.equal(1);\n expect(tapSpy.firstCall.args.shift()).to.equal(\"bla\");\n expect(tapSpy.firstCall.args.shift()).to.equal(0);\n expect(tapSpy.secondCall.args.shift()).to.eql({});\n expect(tapSpy.secondCall.args.shift()).to.equal(0);\n expect(tapSpy.thirdCall.args.shift()).to.eql({\n test: \"test\"\n });\n expect(tapSpy.thirdCall.args.shift()).to.equal(1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n }, 20);\n });\n\n it(\"writes to an assert stream with a function expectation, until it ends with the expected value.\", function(done) {\n const onEnd = sinon.spy();\n const stream = new AssertStream(x => x.test === \"test\" ? 1 : 0, {});\n\n stream.on(\"done\", onEnd);\n\n stream.write(\"bla\");\n stream.write({});\n stream.write({\n test: \"test\"\n });\n\n setTimeout(function() {\n expect(onEnd.callCount).to.equal(1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n }, 20);\n });\n\n it(\"writes to an assert stream with a function expectation, until it ends with the expected value.\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream(x => x.test === \"test\" ? 1 : -1, {\n tapper: tapSpy\n });\n\n stream.on(\"error\", e => {\n expect(e.message).to.equal(\"the messages [\\\"bla\\\"] do not match your expectations.\");\n expect(tapSpy.firstCall.args.shift()).to.equal(\"bla\");\n expect(tapSpy.firstCall.args.shift()).to.equal(-1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n });\n\n stream.write(\"bla\");\n });\n\n it(\"writes to an assert stream, that expects multiple messages\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream([\"test1\", \"test2\", \"test3\"], {\n tapper: tapSpy\n });\n const onEnd = function() {\n expect(tapSpy.firstCall.calledWith(\"test1\", 0));\n expect(tapSpy.secondCall.calledWith(\"test2\", 0));\n expect(tapSpy.thirdCall.calledWith(\"test3\", 1));\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n };\n\n stream.on(\"done\", onEnd);\n stream.write(\"test1\");\n stream.write(\"test2\");\n stream.write(\"test3\");\n });\n\n it(\"writes to an assert stream, filtering some messages\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream([\"test1\", \"test2\"], {\n tapper: tapSpy,\n filter: value => value !== \"test4\"\n });\n\n const onEnd = function() {\n expect(tapSpy.firstCall.calledWith(\"test4\", 0));\n expect(tapSpy.secondCall.calledWith(\"test1\", 0));\n expect(tapSpy.thirdCall.calledWith(\"test2\", 1));\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n };\n\n stream.on(\"done\", onEnd);\n stream.write(\"test4\");\n stream.write(\"test1\");\n stream.write(\"test2\");\n });\n});\n" + }, + { + "__docId__": 23, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/ExpectStreamTest.js", + "memberof": null, + "longname": "src/__tests__/ExpectStreamTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isArray from \"lodash.isarray\";\nimport { expect } from \"../index\";\nimport { Readable, Transform } from \"stream\";\nimport assert from \"assert\";\nimport sinon from \"sinon\";\n\nclass ReadStream extends Readable {\n constructor(messages = \"lala\") {\n super({ objectMode: true });\n\n this.messages = messages;\n }\n\n _read() {\n this.push(\n isArray(this.messages) ?\n this.messages.shift() :\n this.messages\n );\n }\n}\n\nclass TransformStream extends Transform {\n _transform(chunk, enc, cb) {\n this.push(chunk);\n setTimeout(cb, 20);\n }\n}\n\n\nclass ReadObjectStream extends Readable {\n constructor() {\n super({\n objectMode: true\n });\n }\n\n _read() {\n this.push({\n test: {\n test: []\n }\n });\n }\n}\n\nclass TransformObjStream extends Transform {\n constructor() {\n super({\n objectMode: true\n });\n }\n\n _transform(obj, enc, cb) {\n this.push(obj);\n setTimeout(cb, 20);\n }\n}\n\n\ndescribe(\"ExpectStreamTest\", function() { // eslint-disable-line\n it(\"uses the produce assertion with a readstream, matching exactly\", function(done) {\n expect(new ReadStream([\"lala1\", \"lala2\", \"lala3\"]))\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, matching on strict equality\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.exactly.produce({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, matching on strict equality - part2\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.produce.exactly({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, containing at least key test\", function(done) {\n expect(new ReadStream({ test: \"lala\", another: \"lulu\" }))\n .to.produce({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, containing at least key test\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.produce({ test: \"lala\", another: \"lulu\" })\n .notify(e => e ? done() : done(new Error(\"Shouldn't end up here.\")));\n });\n\n it(\"uses the produce assertion with a readstream, matching exactly and fails\", function(done) {\n const stream = new ReadStream([\"lala1\", \"lala\", \"lala3\"]);\n\n expect(stream)\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(e => {\n if(!e) return done(new Error(\"Should fail\"));\n\n try {\n expect(stream._readableState.ended).to.equal(false); // eslint-disable-line\n\n return done();\n } catch(e2) {\n return done(e2);\n }\n });\n });\n\n it(\"uses the produce assertion with a readstream, matching not exactly\", function(done) {\n const stream = new ReadStream([\"lala1\", \"lala\", \"lala2\", \"lala3\"]);\n\n expect(stream)\n .to.eventually.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(e => {\n if(e) return done(e);\n\n try {\n expect(stream._readableState.ended).to.equal(false); // eslint-disable-line\n\n return done();\n } catch(e2) {\n return done(e2);\n }\n });\n });\n\n it(\"uses the produce assertion with a readstream, matching exactly, but filtering some messages\", function(done) {\n expect(new ReadStream([\"lala1\", \"lala\", \"lala2\", \"lala3\"]))\n .filter(value => value !== \"lala\")\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(done);\n });\n\n it(\"uses the eventually produce assertion with a readstream, producing buffers.\", function(done) {\n expect(new ReadStream()).to.eventually.produce(\"lala\").notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, producing objects.\", function(done) {\n expect(new ReadObjectStream()).to.eventually.produce({\n test: {\n test: []\n }\n }).notify(done);\n });\n\n it(\"fails the produce assertion on the readstream with buffers.\", function(done) {\n expect(new ReadStream()).to.eventually.produce(\"lulu\").notify(() => done(new Error(\"should not finish\")));\n setTimeout(() => done(), 20);\n });\n\n it(\"fails the produce assertion on the readstream with objects.\", function(done) {\n expect(new ReadStream()).to.eventually.produce({\n test: \"test2\"\n }).notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 20);\n });\n\n it(\"uses the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream()).to.eventually.produce(\"huhu\").on(\"lala\", \"test\", \"huhu\").notify(done);\n });\n\n it(\"uses the produce assertion with a transformstream, producing objects.\", function(done) {\n expect(new TransformObjStream()).to.eventually.produce({\n test: {\n test: []\n }\n }).on(\"lala\", \"test\", \"huhu\", {\n test: {\n test: []\n }\n }).notify(done);\n });\n\n it(\"fails the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream())\n .to.eventually.produce(\"huhu\")\n .on(\"lala\", \"test\")\n .notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 70);\n });\n\n it(\"fails the produce assertion with a transformstream, producing objects.\", function(done) {\n expect(new TransformObjStream())\n .to.eventually.produce({\n test: {\n test: []\n }\n })\n .on(\"lala\", \"test\", {\n test: {\n test: 1\n }\n })\n .notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 70);\n });\n\n it(\"tries to test a readstream with input\", function(done) {\n try {\n expect(new ReadStream()).to.eventually.produce(\"test\").on(\"bla\").notify(done);\n } catch(e) {\n assert.equal(e.message, \"You can only use arguments with a writable stream.\");\n done();\n }\n });\n\n it(\"tries to test a transformstream without input\", function(done) {\n try {\n expect(new TransformStream()).to.eventually.produce(\"test\").on().notify(done);\n } catch(e) {\n assert.equal(e.message, \"You can only use arguments with a writable stream.\");\n done();\n }\n });\n\n it(\"uses the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream())\n .to.produce(x => x === \"huhu\" ? 1 : -1)\n .on(\"lala\", \"test\", \"huhu\")\n .notify(e => e instanceof Error ? done() : done(new Error(\"should throw\")));\n });\n\n it(\"taps a stream under test.\", function(done) {\n const spy = sinon.spy();\n\n expect(new TransformStream())\n .to.eventually.produce(\"huhu\")\n .on(\"lala\", \"test\", \"huhu\")\n .tap(spy)\n .notify(() => {\n try {\n expect(spy.callCount).to.equal(3);\n expect(spy.firstCall.args.shift()).to.equal(\"lala\");\n expect(spy.firstCall.args.shift()).to.equal(0);\n expect(spy.secondCall.args.shift()).to.equal(\"test\");\n expect(spy.secondCall.args.shift()).to.equal(0);\n expect(spy.thirdCall.args.shift()).to.equal(\"huhu\");\n expect(spy.thirdCall.args.shift()).to.equal(1);\n done();\n } catch(e) {\n done(e);\n }\n });\n });\n});\n" + }, + { + "__docId__": 24, + "kind": "class", + "static": true, + "variation": null, + "name": "ReadStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 7, + "undocument": true, + "interface": false, + "extends": [ + "stream~Readable" + ] + }, + { + "__docId__": 25, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#constructor", + "access": null, + "description": null, + "lineNumber": 8, + "undocument": true, + "params": [ + { + "name": "messages", + "optional": true, + "types": [ + "string" + ], + "defaultRaw": "lala", + "defaultValue": "lala" + } + ], + "generator": false + }, + { + "__docId__": 26, + "kind": "member", + "static": false, + "variation": null, + "name": "messages", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#messages", + "access": null, + "description": null, + "lineNumber": 11, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 27, + "kind": "method", + "static": false, + "variation": null, + "name": "_read", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#_read", + "access": null, + "description": null, + "lineNumber": 14, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 28, + "kind": "class", + "static": true, + "variation": null, + "name": "TransformStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~TransformStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 23, + "undocument": true, + "interface": false, + "extends": [ + "stream~Transform" + ] + }, + { + "__docId__": 29, + "kind": "method", + "static": false, + "variation": null, + "name": "_transform", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformStream#_transform", + "access": null, + "description": null, + "lineNumber": 24, + "undocument": true, + "params": [ + { + "name": "chunk", + "types": [ + "*" + ] + }, + { + "name": "enc", + "types": [ + "*" + ] + }, + { + "name": "cb", + "types": [ + "*" + ] + } + ], + "generator": false + }, + { + "__docId__": 30, + "kind": "class", + "static": true, + "variation": null, + "name": "ReadObjectStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 31, + "undocument": true, + "interface": false, + "extends": [ + "stream~Readable" + ] + }, + { + "__docId__": 31, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream#constructor", + "access": null, + "description": null, + "lineNumber": 32, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 32, + "kind": "method", + "static": false, + "variation": null, + "name": "_read", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream#_read", + "access": null, + "description": null, + "lineNumber": 38, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 33, + "kind": "class", + "static": true, + "variation": null, + "name": "TransformObjStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 47, + "undocument": true, + "interface": false, + "extends": [ + "stream~Transform" + ] + }, + { + "__docId__": 34, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream#constructor", + "access": null, + "description": null, + "lineNumber": 48, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 35, + "kind": "method", + "static": false, + "variation": null, + "name": "_transform", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream#_transform", + "access": null, + "description": null, + "lineNumber": 54, + "undocument": true, + "params": [ + { + "name": "obj", + "types": [ + "*" + ] + }, + { + "name": "enc", + "types": [ + "*" + ] + }, + { + "name": "cb", + "types": [ + "*" + ] + } + ], + "generator": false + }, + { + "__docId__": 36, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/ExpectedTest.js", + "memberof": null, + "longname": "src/__tests__/ExpectedTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import Expected from \"../Expected\";\nimport { expect } from \"chai\";\n\ndescribe(\"Expected\", function() {\n it(\"compares a single value with the expected one\", function() {\n const expected = Expected.of(\"Test\", {});\n\n expect(expected.match(\"Test\")).to.equal(1);\n expect(expected.match(\"NotTest\")).to.equal(-1);\n });\n\n it(\"compares a single value with the expected one, skipping all not matching ones\", function() {\n const expected = Expected.of(\"Test\", {\n eventually: true\n });\n\n expect(expected.match(\"Test\")).to.equal(1);\n expect(expected.match(\"NotTest\")).to.equal(0);\n });\n\n it(\"compares a list of values with another list of values\", function() {\n const expected = Expected.of([\"Test1\", \"Test2\", \"Test3\"], {});\n\n expect(expected.match(\"Test1\")).to.equal(0);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n\n it(\"compares a list of values with another list, skipping all non-matches\", function() {\n const expected = Expected.of([\"Test3\", \"Test4\", \"Test5\"], {\n eventually: true\n });\n\n expect(expected.match(\"Test3\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test5\")).to.equal(1);\n });\n\n it(\"compares a list of values with a filter\", function() {\n const expected = Expected.of([\"Test3\", \"Test4\", \"Test5\"], {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test3\")).to.equal(0);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test5\")).to.equal(1);\n });\n\n it(\"compares a single of values with a filter\", function() {\n const expected = Expected.of(\"Test3\", {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n\n it(\"compares with a function\", function() {\n const expected = Expected.of(value => value === \"Test3\" ? 1 : -1, {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test1\")).to.equal(-1);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n});\n" + }, + { + "__docId__": 37, + "kind": "file", + "static": true, + "variation": null, + "name": "src/examples/test.js", + "memberof": null, + "longname": "src/examples/test.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "" + }, + { + "__docId__": 38, + "kind": "file", + "static": true, + "variation": null, + "name": "src/index.js", + "memberof": null, + "longname": "src/index.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import StreamHelper from \"./StreamHelper\";\n\nconst chai = require(\"chai\");\n\nchai.use(StreamHelper);\n\nmodule.exports = chai;\n" + }, + { + "__docId__": 39, + "kind": "variable", + "static": true, + "variation": null, + "name": "chai", + "memberof": "src/index.js", + "longname": "src/index.js~chai", + "access": null, + "export": false, + "importPath": "expect-stream/src/index.js", + "importStyle": null, + "description": null, + "lineNumber": 3, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 41, + "kind": "external", + "static": true, + "variation": null, + "name": "Infinity", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 42, + "kind": "external", + "static": true, + "variation": null, + "name": "NaN", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 43, + "kind": "external", + "static": true, + "variation": null, + "name": "undefined", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 44, + "kind": "external", + "static": true, + "variation": null, + "name": "null", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~null", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 45, + "kind": "external", + "static": true, + "variation": null, + "name": "Object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 46, + "kind": "external", + "static": true, + "variation": null, + "name": "object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 47, + "kind": "external", + "static": true, + "variation": null, + "name": "Function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 48, + "kind": "external", + "static": true, + "variation": null, + "name": "function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 49, + "kind": "external", + "static": true, + "variation": null, + "name": "Boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 50, + "kind": "external", + "static": true, + "variation": null, + "name": "boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 51, + "kind": "external", + "static": true, + "variation": null, + "name": "Symbol", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 52, + "kind": "external", + "static": true, + "variation": null, + "name": "Error", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Error", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 53, + "kind": "external", + "static": true, + "variation": null, + "name": "EvalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 54, + "kind": "external", + "static": true, + "variation": null, + "name": "InternalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 55, + "kind": "external", + "static": true, + "variation": null, + "name": "RangeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 56, + "kind": "external", + "static": true, + "variation": null, + "name": "ReferenceError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 57, + "kind": "external", + "static": true, + "variation": null, + "name": "SyntaxError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 58, + "kind": "external", + "static": true, + "variation": null, + "name": "TypeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 59, + "kind": "external", + "static": true, + "variation": null, + "name": "URIError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 60, + "kind": "external", + "static": true, + "variation": null, + "name": "Number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 61, + "kind": "external", + "static": true, + "variation": null, + "name": "number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 62, + "kind": "external", + "static": true, + "variation": null, + "name": "Date", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Date", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 63, + "kind": "external", + "static": true, + "variation": null, + "name": "String", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~String", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 64, + "kind": "external", + "static": true, + "variation": null, + "name": "string", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~string", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 65, + "kind": "external", + "static": true, + "variation": null, + "name": "RegExp", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 66, + "kind": "external", + "static": true, + "variation": null, + "name": "Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 67, + "kind": "external", + "static": true, + "variation": null, + "name": "Int8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 68, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 69, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint8ClampedArray", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 70, + "kind": "external", + "static": true, + "variation": null, + "name": "Int16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 71, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 72, + "kind": "external", + "static": true, + "variation": null, + "name": "Int32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 73, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 74, + "kind": "external", + "static": true, + "variation": null, + "name": "Float32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 75, + "kind": "external", + "static": true, + "variation": null, + "name": "Float64Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 76, + "kind": "external", + "static": true, + "variation": null, + "name": "Map", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Map", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 77, + "kind": "external", + "static": true, + "variation": null, + "name": "Set", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Set", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 78, + "kind": "external", + "static": true, + "variation": null, + "name": "WeakMap", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 79, + "kind": "external", + "static": true, + "variation": null, + "name": "WeakSet", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 80, + "kind": "external", + "static": true, + "variation": null, + "name": "ArrayBuffer", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 81, + "kind": "external", + "static": true, + "variation": null, + "name": "DataView", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 82, + "kind": "external", + "static": true, + "variation": null, + "name": "JSON", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 83, + "kind": "external", + "static": true, + "variation": null, + "name": "Promise", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 84, + "kind": "external", + "static": true, + "variation": null, + "name": "Generator", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 85, + "kind": "external", + "static": true, + "variation": null, + "name": "GeneratorFunction", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 86, + "kind": "external", + "static": true, + "variation": null, + "name": "Reflect", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 87, + "kind": "external", + "static": true, + "variation": null, + "name": "Proxy", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 89, + "kind": "external", + "static": true, + "variation": null, + "name": "CanvasRenderingContext2D", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 90, + "kind": "external", + "static": true, + "variation": null, + "name": "DocumentFragment", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 91, + "kind": "external", + "static": true, + "variation": null, + "name": "Element", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Element", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 92, + "kind": "external", + "static": true, + "variation": null, + "name": "Event", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Event", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 93, + "kind": "external", + "static": true, + "variation": null, + "name": "Node", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Node", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 94, + "kind": "external", + "static": true, + "variation": null, + "name": "NodeList", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~NodeList", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 95, + "kind": "external", + "static": true, + "variation": null, + "name": "XMLHttpRequest", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 96, + "kind": "external", + "static": true, + "variation": null, + "name": "AudioContext", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~AudioContext", + "access": null, + "description": "", + "builtinExternal": true + } +] \ No newline at end of file diff --git a/ExpectStreamBak/docs/file/src/AssertStream.js.html b/ExpectStreamBak/docs/file/src/AssertStream.js.html new file mode 100644 index 0000000..be0a994 --- /dev/null +++ b/ExpectStreamBak/docs/file/src/AssertStream.js.html @@ -0,0 +1,106 @@ + + + + + + src/AssertStream.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/AssertStream.js

+
import { Writable } from "stream";
+import Expected from "./Expected";
+import defaults from "set-default-value";
+
+/**
+ * this stream is used to be piped into.
+ * it ends if the expected value was received.
+ *
+ * @author Marco Sliwa <marco@circle.ai>
+ */
+export default class AssertStream extends Writable {
+
+    /**
+     * constructor for this stream
+     *
+     * @constructor
+     * @param       {*}      expected value
+     * @param       {object} options  configuring the behaviour of AssertSream
+     */
+    constructor(expected, options) {
+        super({
+            objectMode: true
+        });
+
+        this.expected = Expected.of(expected, options);
+        this.tapper   = defaults(options.tapper).to(() => {});
+    }
+
+    /**
+     * implementation of the write function. transforms data,
+     * so that it can be compared, emits end on match, otherwise
+     * continues.
+     *
+     * @param  {string|object} chunk of data
+     * @param  {string}        enc   of data
+     * @param  {function}      cb    when operation finished
+     * @return {*}
+     */
+    _write(chunk, enc, cb) {
+        const data   = Buffer.isBuffer(chunk) ? chunk.toString() : chunk;
+        const result = this.expected.match(data);
+
+        this.tapper(data, result);
+
+        return result === -1 ? this.emit("error", this.expected.getError()) : setTimeout(() => result === 1 ? this.emit("done") : cb(), 1);
+    }
+}
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/Expected.js.html b/ExpectStreamBak/docs/file/src/Expected.js.html new file mode 100644 index 0000000..5aadf3f --- /dev/null +++ b/ExpectStreamBak/docs/file/src/Expected.js.html @@ -0,0 +1,145 @@ + + + + + + src/Expected.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/Expected.js

+
import isArray from "lodash.isarray";
+import isEqual from "lodash.isequal";
+import isFunction from "lodash.isfunction";
+import isNil from "lodash.isnil";
+import isMatch from "lodash.ismatch";
+import { expect } from "chai";
+
+export default class Expected {
+
+    /**
+     * Creates an ExpectationClass, that checks,
+     * whether an incoming value matches the
+     * expectations
+     *
+     * @param  {*}        args needed for creation
+     * @return {Expected}
+     */
+    static of(...args) {
+        return new Expected(...args);
+    }
+
+    /**
+     * Constructor of Expected
+     *
+     * @constructor
+     * @param       {*}      expected   compared with input
+     * @param       {object} options    for custom matcning behaviour
+     */
+    constructor(expected, { filter, eventually, strict }) {
+        this.messages   = [];
+        this.expection  = isArray(expected) ? expected.slice(0) : expected;
+        this.expected   = expected;
+        this.matcher    = isNil(strict) ? isMatch : isEqual;
+        this.onMisMatch = isNil(eventually) ? -1 : 0;
+        this.filter     = isNil(filter) ? () => true : filter;
+    }
+
+    /**
+     * Checks if next value in list matches the input
+     *
+     * @param  {*}      value to be compared
+     * @return {Number}
+     */
+    includes(value) {
+        const expected = this.expected.shift();
+        const matches  = this.matcher(value, expected);
+        const onMatch  = this.expected.length === 0 ? 1 : 0;
+
+        this.expected = matches ? this.expected : [expected].concat(this.expected);
+
+        return matches ? onMatch : this.onMisMatch;
+    }
+
+    /**
+     * Compares input with expectations
+     *
+     * @param  {*}      value to be compared
+     * @return {Number}
+     */
+    match(value) { // eslint-disable-line
+        this.messages.push(value);
+
+        if(!this.filter(value))       return 0;
+        if(isFunction(this.expected)) return this.expected(value);
+        if(isArray(this.expected))    return this.includes(value);
+
+        return this.matcher(value, this.expected) ? 1 : this.onMisMatch;
+    }
+
+    /**
+     * produces the error containing the expected vs actual results
+     *
+     * @return {Error}
+     */
+    getError() {
+        if(isFunction(this.expection)) return new Error(`the messages ${JSON.stringify(this.messages)} do not match your expectations.`);
+
+        try {
+            expect(this.messages).to.eql(this.expection);
+
+            return null;
+        } catch(e) {
+            return e;
+        }
+    }
+}
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/StreamHelper.js.html b/ExpectStreamBak/docs/file/src/StreamHelper.js.html new file mode 100644 index 0000000..acdc482 --- /dev/null +++ b/ExpectStreamBak/docs/file/src/StreamHelper.js.html @@ -0,0 +1,130 @@ + + + + + + src/StreamHelper.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/StreamHelper.js

+
import isFunction from "lodash.isfunction";
+import assert from "assert";
+import AssertStream from "./AssertStream";
+import defaults from "set-default-value";
+
+/**
+ * this function adds the new methods to the Assertion
+ * chain, where they have the following responsibilities:
+ *
+ * produce: sets the expected value of the stream
+ * on:      gives a set of input values, if testing
+ *          a transformer
+ * notify:  cb for error and done notifications
+ *
+ * @param {object} chai  to be extended
+ */
+const StreamHelper = function({ Assertion }) {
+    Assertion.addChainableMethod("exactly", function(expected) {
+        this.expected       = defaults(expected).to(this.expected);
+        this.strictEquality = true;
+    }, function() {
+        this.strictEquality = true;
+    });
+
+    Assertion.addChainableMethod("produce", function(expected) {
+        this.expected = expected;
+        this.args     = [];
+    }, function() {
+        this.args = [];
+    });
+
+    Assertion.addProperty("eventually", function() {
+        this.checkAllResults = true;
+    });
+
+    Assertion.addMethod("filter", function(filter) {
+        this.filterMethod = filter;
+    });
+
+    Assertion.addMethod("notify", function(done) {
+        const sink = new AssertStream(this.expected, {
+            filter:     this.filterMethod,
+            tapper:     this.tapper,
+            eventually: this.checkAllResults,
+            strict:     this.strictEquality
+        });
+
+        this._obj.pipe(sink)     // eslint-disable-line
+            .on("done", done)
+            .on("error", done);
+
+        this.args.forEach(arg => this._obj.write(arg)); // eslint-disable-line
+    });
+
+    Assertion.addMethod("tap", function(tapper) {
+        this.tapper = tapper;
+    });
+
+    Assertion.addMethod("on", function(...args) {
+        const { write } = this._obj; // eslint-disable-line
+
+        assert(
+            (args.length > 0 && isFunction(write)) ||
+            (args.length === 0 && !isFunction(write)
+        ), "You can only use arguments with a writable stream.");
+
+        this.args = args;
+    });
+};
+
+export default StreamHelper;
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/__tests__/AssertStreamTest.js.html b/ExpectStreamBak/docs/file/src/__tests__/AssertStreamTest.js.html new file mode 100644 index 0000000..fce224b --- /dev/null +++ b/ExpectStreamBak/docs/file/src/__tests__/AssertStreamTest.js.html @@ -0,0 +1,173 @@ + + + + + + src/__tests__/AssertStreamTest.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/__tests__/AssertStreamTest.js

+
import AssertStream from "../AssertStream";
+import sinon from "sinon";
+import { expect } from "chai";
+
+describe("AssertStreamTest", function() {
+    it("writes to an assert stream with a value expectation, until it ends with the expected value.", function(done) {
+        const tapSpy = sinon.spy();
+        const onEnd  = sinon.spy();
+        const stream = new AssertStream({
+            test: "test"
+        }, {
+            tapper:     tapSpy,
+            eventually: true
+        });
+
+        stream.on("done", onEnd);
+
+        stream.write("bla");
+        stream.write({});
+        stream.write({
+            test: "test"
+        });
+
+        setTimeout(function() {
+            expect(onEnd.callCount).to.equal(1);
+            expect(tapSpy.firstCall.args.shift()).to.equal("bla");
+            expect(tapSpy.firstCall.args.shift()).to.equal(0);
+            expect(tapSpy.secondCall.args.shift()).to.eql({});
+            expect(tapSpy.secondCall.args.shift()).to.equal(0);
+            expect(tapSpy.thirdCall.args.shift()).to.eql({
+                test: "test"
+            });
+            expect(tapSpy.thirdCall.args.shift()).to.equal(1);
+            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
+            done();
+        }, 20);
+    });
+
+    it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) {
+        const onEnd  = sinon.spy();
+        const stream = new AssertStream(x => x.test === "test" ? 1 : 0, {});
+
+        stream.on("done", onEnd);
+
+        stream.write("bla");
+        stream.write({});
+        stream.write({
+            test: "test"
+        });
+
+        setTimeout(function() {
+            expect(onEnd.callCount).to.equal(1);
+            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
+            done();
+        }, 20);
+    });
+
+    it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) {
+        const tapSpy = sinon.spy();
+        const stream = new AssertStream(x => x.test === "test" ? 1 : -1, {
+            tapper: tapSpy
+        });
+
+        stream.on("error", e => {
+            expect(e.message).to.equal("the messages [\"bla\"] do not match your expectations.");
+            expect(tapSpy.firstCall.args.shift()).to.equal("bla");
+            expect(tapSpy.firstCall.args.shift()).to.equal(-1);
+            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
+            done();
+        });
+
+        stream.write("bla");
+    });
+
+    it("writes to an assert stream, that expects multiple messages", function(done) {
+        const tapSpy = sinon.spy();
+        const stream = new AssertStream(["test1", "test2", "test3"], {
+            tapper: tapSpy
+        });
+        const onEnd = function() {
+            expect(tapSpy.firstCall.calledWith("test1", 0));
+            expect(tapSpy.secondCall.calledWith("test2", 0));
+            expect(tapSpy.thirdCall.calledWith("test3", 1));
+            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
+            done();
+        };
+
+        stream.on("done", onEnd);
+        stream.write("test1");
+        stream.write("test2");
+        stream.write("test3");
+    });
+
+    it("writes to an assert stream, filtering some messages", function(done) {
+        const tapSpy = sinon.spy();
+        const stream = new AssertStream(["test1", "test2"], {
+            tapper: tapSpy,
+            filter: value => value !== "test4"
+        });
+
+        const onEnd = function() {
+            expect(tapSpy.firstCall.calledWith("test4", 0));
+            expect(tapSpy.secondCall.calledWith("test1", 0));
+            expect(tapSpy.thirdCall.calledWith("test2", 1));
+            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
+            done();
+        };
+
+        stream.on("done", onEnd);
+        stream.write("test4");
+        stream.write("test1");
+        stream.write("test2");
+    });
+});
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/__tests__/ExpectStreamTest.js.html b/ExpectStreamBak/docs/file/src/__tests__/ExpectStreamTest.js.html new file mode 100644 index 0000000..b93f428 --- /dev/null +++ b/ExpectStreamBak/docs/file/src/__tests__/ExpectStreamTest.js.html @@ -0,0 +1,308 @@ + + + + + + src/__tests__/ExpectStreamTest.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/__tests__/ExpectStreamTest.js

+
import isArray from "lodash.isarray";
+import { expect } from "../index";
+import { Readable, Transform } from "stream";
+import assert from "assert";
+import sinon from "sinon";
+
+class ReadStream extends Readable {
+    constructor(messages = "lala") {
+        super({ objectMode: true });
+
+        this.messages = messages;
+    }
+
+    _read() {
+        this.push(
+            isArray(this.messages) ?
+            this.messages.shift() :
+            this.messages
+        );
+    }
+}
+
+class TransformStream extends Transform {
+    _transform(chunk, enc, cb) {
+        this.push(chunk);
+        setTimeout(cb, 20);
+    }
+}
+
+
+class ReadObjectStream extends Readable {
+    constructor() {
+        super({
+            objectMode: true
+        });
+    }
+
+    _read() {
+        this.push({
+            test: {
+                test: []
+            }
+        });
+    }
+}
+
+class TransformObjStream extends Transform {
+    constructor() {
+        super({
+            objectMode: true
+        });
+    }
+
+    _transform(obj, enc, cb) {
+        this.push(obj);
+        setTimeout(cb, 20);
+    }
+}
+
+
+describe("ExpectStreamTest", function() { // eslint-disable-line
+    it("uses the produce assertion with a readstream, matching exactly", function(done) {
+        expect(new ReadStream(["lala1", "lala2", "lala3"]))
+            .to.produce(["lala1", "lala2", "lala3"])
+            .notify(done);
+    });
+
+    it("uses the produce assertion with a readstream, matching on strict equality", function(done) {
+        expect(new ReadStream({ test: "lala" }))
+            .to.exactly.produce({ test: "lala" })
+            .notify(done);
+    });
+
+    it("uses the produce assertion with a readstream, matching on strict equality - part2", function(done) {
+        expect(new ReadStream({ test: "lala" }))
+            .to.produce.exactly({ test: "lala" })
+            .notify(done);
+    });
+
+    it("uses the produce assertion with a readstream, containing at least key test", function(done) {
+        expect(new ReadStream({ test: "lala", another: "lulu" }))
+            .to.produce({ test: "lala" })
+            .notify(done);
+    });
+
+    it("uses the produce assertion with a readstream, containing at least key test", function(done) {
+        expect(new ReadStream({ test: "lala" }))
+            .to.produce({ test: "lala", another: "lulu" })
+            .notify(e => e ? done() : done(new Error("Shouldn't end up here.")));
+    });
+
+    it("uses the produce assertion with a readstream, matching exactly and fails", function(done) {
+        const stream = new ReadStream(["lala1", "lala", "lala3"]);
+
+        expect(stream)
+            .to.produce(["lala1", "lala2", "lala3"])
+            .notify(e => {
+                if(!e) return done(new Error("Should fail"));
+
+                try {
+                    expect(stream._readableState.ended).to.equal(false); // eslint-disable-line
+
+                    return done();
+                } catch(e2) {
+                    return done(e2);
+                }
+            });
+    });
+
+    it("uses the produce assertion with a readstream, matching not exactly", function(done) {
+        const stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]);
+
+        expect(stream)
+            .to.eventually.produce(["lala1", "lala2", "lala3"])
+            .notify(e => {
+                if(e) return done(e);
+
+                try {
+                    expect(stream._readableState.ended).to.equal(false); // eslint-disable-line
+
+                    return done();
+                } catch(e2) {
+                    return done(e2);
+                }
+            });
+    });
+
+    it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function(done) {
+        expect(new ReadStream(["lala1", "lala", "lala2", "lala3"]))
+            .filter(value => value !== "lala")
+            .to.produce(["lala1", "lala2", "lala3"])
+            .notify(done);
+    });
+
+    it("uses the eventually produce assertion with a readstream, producing buffers.", function(done) {
+        expect(new ReadStream()).to.eventually.produce("lala").notify(done);
+    });
+
+    it("uses the produce assertion with a readstream, producing objects.", function(done) {
+        expect(new ReadObjectStream()).to.eventually.produce({
+            test: {
+                test: []
+            }
+        }).notify(done);
+    });
+
+    it("fails the produce assertion on the readstream with buffers.", function(done) {
+        expect(new ReadStream()).to.eventually.produce("lulu").notify(() => done(new Error("should not finish")));
+        setTimeout(() => done(), 20);
+    });
+
+    it("fails the produce assertion on the readstream with objects.", function(done) {
+        expect(new ReadStream()).to.eventually.produce({
+            test: "test2"
+        }).notify(() => done(new Error("should not finish")));
+
+        setTimeout(() => done(), 20);
+    });
+
+    it("uses the produce assertion with a transformstream, producing buffers.", function(done) {
+        expect(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").notify(done);
+    });
+
+    it("uses the produce assertion with a transformstream, producing objects.", function(done) {
+        expect(new TransformObjStream()).to.eventually.produce({
+            test: {
+                test: []
+            }
+        }).on("lala", "test", "huhu", {
+            test: {
+                test: []
+            }
+        }).notify(done);
+    });
+
+    it("fails the produce assertion with a transformstream, producing buffers.", function(done) {
+        expect(new TransformStream())
+            .to.eventually.produce("huhu")
+            .on("lala", "test")
+            .notify(() => done(new Error("should not finish")));
+
+        setTimeout(() => done(), 70);
+    });
+
+    it("fails the produce assertion with a transformstream, producing objects.", function(done) {
+        expect(new TransformObjStream())
+            .to.eventually.produce({
+                test: {
+                    test: []
+                }
+            })
+            .on("lala", "test", {
+                test: {
+                    test: 1
+                }
+            })
+            .notify(() => done(new Error("should not finish")));
+
+        setTimeout(() => done(), 70);
+    });
+
+    it("tries to test a readstream with input", function(done) {
+        try {
+            expect(new ReadStream()).to.eventually.produce("test").on("bla").notify(done);
+        } catch(e) {
+            assert.equal(e.message, "You can only use arguments with a writable stream.");
+            done();
+        }
+    });
+
+    it("tries to test a transformstream without input", function(done) {
+        try {
+            expect(new TransformStream()).to.eventually.produce("test").on().notify(done);
+        } catch(e) {
+            assert.equal(e.message, "You can only use arguments with a writable stream.");
+            done();
+        }
+    });
+
+    it("uses the produce assertion with a transformstream, producing buffers.", function(done) {
+        expect(new TransformStream())
+            .to.produce(x => x === "huhu" ? 1 : -1)
+            .on("lala", "test", "huhu")
+            .notify(e => e instanceof Error ? done() : done(new Error("should throw")));
+    });
+
+    it("taps a stream under test.", function(done) {
+        const spy = sinon.spy();
+
+        expect(new TransformStream())
+            .to.eventually.produce("huhu")
+            .on("lala", "test", "huhu")
+            .tap(spy)
+            .notify(() => {
+                try {
+                    expect(spy.callCount).to.equal(3);
+                    expect(spy.firstCall.args.shift()).to.equal("lala");
+                    expect(spy.firstCall.args.shift()).to.equal(0);
+                    expect(spy.secondCall.args.shift()).to.equal("test");
+                    expect(spy.secondCall.args.shift()).to.equal(0);
+                    expect(spy.thirdCall.args.shift()).to.equal("huhu");
+                    expect(spy.thirdCall.args.shift()).to.equal(1);
+                    done();
+                } catch(e) {
+                    done(e);
+                }
+            });
+    });
+});
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/__tests__/ExpectedTest.js.html b/ExpectStreamBak/docs/file/src/__tests__/ExpectedTest.js.html new file mode 100644 index 0000000..e700adb --- /dev/null +++ b/ExpectStreamBak/docs/file/src/__tests__/ExpectedTest.js.html @@ -0,0 +1,128 @@ + + + + + + src/__tests__/ExpectedTest.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/__tests__/ExpectedTest.js

+
import Expected from "../Expected";
+import { expect } from "chai";
+
+describe("Expected", function() {
+    it("compares a single value with the expected one", function() {
+        const expected = Expected.of("Test", {});
+
+        expect(expected.match("Test")).to.equal(1);
+        expect(expected.match("NotTest")).to.equal(-1);
+    });
+
+    it("compares a single value with the expected one, skipping all not matching ones", function() {
+        const expected = Expected.of("Test", {
+            eventually: true
+        });
+
+        expect(expected.match("Test")).to.equal(1);
+        expect(expected.match("NotTest")).to.equal(0);
+    });
+
+    it("compares a list of values with another list of values", function() {
+        const expected = Expected.of(["Test1", "Test2", "Test3"], {});
+
+        expect(expected.match("Test1")).to.equal(0);
+        expect(expected.match("Test2")).to.equal(0);
+        expect(expected.match("Test3")).to.equal(1);
+    });
+
+    it("compares a list of values with another list, skipping all non-matches", function() {
+        const expected = Expected.of(["Test3", "Test4", "Test5"], {
+            eventually: true
+        });
+
+        expect(expected.match("Test3")).to.equal(0);
+        expect(expected.match("Test4")).to.equal(0);
+        expect(expected.match("Test4")).to.equal(0);
+        expect(expected.match("Test5")).to.equal(1);
+    });
+
+    it("compares a list of values with a filter", function() {
+        const expected = Expected.of(["Test3", "Test4", "Test5"], {
+            filter: value => value !== "Test2"
+        });
+
+        expect(expected.match("Test3")).to.equal(0);
+        expect(expected.match("Test2")).to.equal(0);
+        expect(expected.match("Test4")).to.equal(0);
+        expect(expected.match("Test5")).to.equal(1);
+    });
+
+    it("compares a single of values with a filter", function() {
+        const expected = Expected.of("Test3", {
+            filter: value => value !== "Test2"
+        });
+
+        expect(expected.match("Test2")).to.equal(0);
+        expect(expected.match("Test3")).to.equal(1);
+    });
+
+    it("compares with a function", function() {
+        const expected = Expected.of(value => value === "Test3" ? 1 : -1, {
+            filter: value => value !== "Test2"
+        });
+
+        expect(expected.match("Test1")).to.equal(-1);
+        expect(expected.match("Test2")).to.equal(0);
+        expect(expected.match("Test3")).to.equal(1);
+    });
+});
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/examples/test.js.html b/ExpectStreamBak/docs/file/src/examples/test.js.html new file mode 100644 index 0000000..8aa9ce9 --- /dev/null +++ b/ExpectStreamBak/docs/file/src/examples/test.js.html @@ -0,0 +1,59 @@ + + + + + + src/examples/test.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/examples/test.js

+

+

Sorry, this documentation does not provide source code.

+
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/file/src/index.js.html b/ExpectStreamBak/docs/file/src/index.js.html new file mode 100644 index 0000000..fa7b29a --- /dev/null +++ b/ExpectStreamBak/docs/file/src/index.js.html @@ -0,0 +1,66 @@ + + + + + + src/index.js | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

src/index.js

+
import StreamHelper from "./StreamHelper";
+
+const chai = require("chai");
+
+chai.use(StreamHelper);
+
+module.exports = chai;
+
+ +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/function/index.html b/ExpectStreamBak/docs/function/index.html new file mode 100644 index 0000000..ca2df35 --- /dev/null +++ b/ExpectStreamBak/docs/function/index.html @@ -0,0 +1,157 @@ + + + + + + Function | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

Function

+
+ + + + + + + + + +
Static Public Summary
+ public + + + + + +
+

+ StreamHelper(chai: object) +

+
+
+ + +

this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

+
+
+
+ + +
+
+

Static Public

+ +
+

+ public + + + + + StreamHelper(chai: object) + + + + source + +

+ +
import StreamHelper from 'expect-stream/src/StreamHelper.js'
+ + +

this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

+

produce: sets the expected value of the stream +on: gives a set of input values, if testing + a transformer +notify: cb for error and done notifications

+
+ + + +
+

Params:

+ + + + + + + + + + + + + +
NameTypeAttributeDescription
chaiobject

to be extended

+
+
+
+ + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/identifiers.html b/ExpectStreamBak/docs/identifiers.html new file mode 100644 index 0000000..53cb573 --- /dev/null +++ b/ExpectStreamBak/docs/identifiers.html @@ -0,0 +1,153 @@ + + + + + + Index | API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

References

+

Class Summary

+ + + + + + + + + + + + + + +
Static Public Class Summary
+ public + + + + + +
+

+ AssertStream +

+
+
+ + +

this stream is used to be piped into.

+
+
+
+ + +
+ public + + + + + +
+

+ Expected +

+
+
+ + + +
+
+ + +
+
+ +

Function Summary

+ + + + + + + + + +
Static Public Function Summary
+ public + + + + + +
+

+ StreamHelper(chai: object) +

+
+
+ + +

this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

+
+
+
+ + +
+
+ + + +
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/image/badge.svg b/ExpectStreamBak/docs/image/badge.svg new file mode 100644 index 0000000..324db4c --- /dev/null +++ b/ExpectStreamBak/docs/image/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + @ratio@ + @ratio@ + + diff --git a/ExpectStreamBak/docs/image/github.png b/ExpectStreamBak/docs/image/github.png new file mode 100644 index 0000000000000000000000000000000000000000..ea6ff545a246caa64074ba809bbc86fcb8589071 GIT binary patch literal 4268 zcmaJ_c|25m+@2YcEGe=tO+zT_42H4qTL_VT8D=nHX3PwRki9HfBH7BIQ7JCj_beeI z(PA%IQuZumf5*MI`@VnN`<~A^=eL~adA{p8f1EgTGXqv8J|+MFz-nZuYe^f)M;9Xl z?T$df2WbN@Nzaya1?NEuL=w;dEfmfT4L0&cdZI1SNK}yDE3_&AKqrE+vL)G?nkc*D ze5H{`7-_OEp2h|MR5i$Wq`Nno1a?DvVz6qEm4+4w7=u!S*eICFn&NfPUKqn*0{Tj@ znU#C6w>ts_(NG7gl9g!!zGxB>O!oD`5|znnkUw>mY4f9P83_1K2+3Ow@|RP#rsiNB z903hhkd~8jmxV&XaJV#7UI7k=N`hgsP?(G??SxA~<&_oS$}mOn-v@+djezn{w$#=C z+ZJu52Js@1@X9hWfq{Y2fpXF~f~O1=fj}H-z+h4|gcLCdOG1*RuteeC3c6^bI{||y zVQ^URks{I!=TB0D&^-Ms1Yi6=vRLBZX`&@ehK$6^K&54mLi!CfHU0mgzP|sUi6l$( z|N8r{!bGbeJX*#QO~m;V+-ZgL5I!=6SJok*kt7_!3WxLgokepm90^DC!r{R>SKwfA zQ=~fvd$e)kPllD+ zRvxaUgpifj{ms?Ix%>N~v83Nz6pahhl84G`Y3tCq(0}C~HG?mnW?2_azyzRC`UIRW z_|Kq~G5_t0?0@_67Z>#}zWf~rt)x_q6t=RejnvErW>9V+3xJmC z`WZuvjAn72w+0gZ!c zA#ROc&m%S~RCo}xuD5jUEbXg(tZCM@w!T|#S$ju3+PKnZvOq!Te!k1i>ZlAY2d$hq zcr3hl)6*dTc>dY=Qd5hg9F-3ZJx12?th3 zY?KG;EA_?MEA`bUgvx84mEd_1K6WD6Zh&~3v&UiJT=<@uGaZ9%(IN9U?-o?uhZNz# z0#o|=;zl}_TF1jsmf+jyEQ<#bNr0KCAUYnr%4g{D(N{m#MffRnz-^cE<1DqGVEx5r zS9<&IEpl`xM442IxYkCk*}6`7oUa@Kl_Om(Wi)GrS2ItP;Ou5QroVSmsVXN0)hk8e z;lQ7wszq5KKkzMEul9)W#^WhAdM9n0$1xd~J`)gN+?&lyrT2u#TL&e_WNZu=06!YS z_X6e%y?CXFn(qe)=6ByvLZ1sdi9L_*4O%9s*q`)g@<+ngXLPynb=p>5ndD-SPd(4C`aTbdZ?bxKHELC zZeth7;3PqZD?s#@He`g7m$B$qvPY*AnR5l@#vg7e+&xsaNZJ7s<$W$OK|T@wSM zh`E>hGt7-jtmLJrt}Ivhf&`2+J~l%A7}}Xca7jJxI^wvclcjQLM5Eta<3kf9Toscy z2I56cmFzMI1s+2ser!B|B({ns8CaFV`-AdpPxNlkWi`M4xfYlJ>bcQa_Db9t&LAY; zx^2E~@4$Karl&<}9jvxNSjTQMt#zzn;Qqi*Jw&F8Na(c1_Jsc6N8&(xJElah#X~^m zO$FtV=RBR5){5SC5(*jhk?uKK7`fi`Y}eJ#ci%vh-fi6~JE0;=vP_jpjlbT?{#e-Q zg~+X2Dcc7K^U`4_pWG;HNCdX~rJUssvKg;+f3y~ob_om7(fWQVrk~|8c+5Oyh)!0u zH&@f%C3-|i_!B$Ex|tDNvP7;t@z^Uj(%<;2W8RZEAuh0EPbru^)k9_D$^x*({E+n& z{y0*heI0x$J9Uj|T}LA6SZHS^U1@BX{##YX50iv${&P>g_W{k;`KLa}>>L)9+be$H za1Hq$db|JP;I|C#s!D6abpfQ!SMEJxNrX5Po=~2~$zN$@d{C4ae%`0;u5lJIc<5zV zW0x;w_KUnGPtktlP2P#J6QNQr*8K9PVlhCrtEJW_VcAdqvfOn2!G(Z&x2T5n3f@d6yv9qGdpFIWgxra94$P&Yhsnc!#t)-Gv2pxFx>U@5&M# z7#U*2+|*`pSdAT(GQiPE$Ex`}N+I!wwb~zatxGDuvCL1$dV-cI>A&21r3eoG;Lk8> zhmAcpb*$KgS=PzD#t!=+rn>kYXx#YR)Dn+tD7G%>f%NHRvzUhtr}1(z(HiB$A-%vD z`5X-Jp!>%UspC}u?_WmmD;h%*I*Zz09eZ~A{G;;OSqJ&?c>WA=&gyqG%p)(6V*26E z{`k1QNoE~O9dKi0)Wme|c} zpD9V60svR6jT^^lPq@XY4fnzWFP@(qA|#AoRZ#%ui7nS&g(Xw!JO=DIRz0X4b&exr zkY`td`J1Q{ea9M&%2%T#Ta;&a<1sj6L)n2PV_y7NO8EsgholQRo&m^2^@skl2bJt` zu{-&e43fXh6JRAQ*3k{gK53WkKIN2vD)Z{THopDGy|Ji5&I%H;Ecs!{lt{IB9_h<_F@CJB{)}FVpTFvK zXP(=eD=e5uI3>NH`X-wAtvibZtmZ?rL z7wsuLRIVuCeEjQ}R}+ZAfvu;^h{(w;f2~*YCtDTpuuti0eA}tHeTR8%o~dzA^q5{z zUQNy_)>BQCr4&n zY9ifZI%XxIcTU~-B#>+|02RG{!zI=^*x31j0>MV-*^bTh_(BK8Ju&5MRoaw8+1sG1 zL%CEWY*}Ha7nicSa&3PfVrP_f!DVI}!S&!{Ym;aR{feM{vMO6NOZr%GWB(&Z`wMOR z#)*@43&=FFCXmN^kEWAz)MHgZ6DzNPf8RC_rbOG((u3cI+!P)?mdoPYwy+W=xS^mz zfWC?vOdizPc*paTy;7&k%4PvouNbGIDHnoj<91_&*-aZqO)}LOa&*pZeF>N7l>Pz< zd;rv0z9>AUFFFYW!822_#dpkxb^lmTJyFw~@j`t0>4*7~9p0D`MHX1=O>e$JdK(YU zaj~=9#M%X_gvkYeC*Lkko|dT;vWBG#k0&O6W2g6_Mv4}FWx^J#7cBEjg3w2YH@g)Q zuPcXBzOk0d9;`^u*e`sV2s~bPHkR-tDYRo6Xua4hTUwLG+tvh)QIX*oR|Y1Ov28Zk zylyfJyrpjDH=Jjhz5$=Jg(|PB@fV!q?btPZ{rS$TKfdo!+1YTi23~<47U94_5&pH} znfUigS(B@ik&Xh(E?Ua@PItu=bDG)ZUT{R;eznP5G{Em}%@vdRrM`+tN6I(JQMxzt zzG?+!S4Ta~BX5?vtMn^pahCg%YIEzN%1z!wZj%6cu}N6lF1c=c&0t!fJ{z?E+8|pX ztL03D#Wef7T$WgBgBg5GX1JT$UHCk!=iSaW`dgj`dWdyaEzWVS!D%kH>i&#|Y?8|9 z-4$lE_MykI*a<$47lk7Bjbdv}w_`*zdXZuGN3Iu`_YOWZs2xJ(qa;J)R&SUlR@|sR zt8oL;Vk6BgD)ama+gNdT3rq5$E=wTS_vPNL5v7O8(WRT)ia$MvhreFxtoojl@A>L* z?V3N9{Or`QzB8zrK~Wzy9(B6iNvvA2IDC!4FDT_F{|-W_zsO%Zd!zcZU$$SrY)QbT z+}KQlk=a`^_W*hzPZ#yMhjHq8PQ9i6db5c4WxBN_N7p?>>OOl+NcT)WrFk4NdiE{l z;%pD)D#!i39~nk@^PUQri!2Iu0oQ(*7KqFFs)#t$B7j`oGM}O2VyLY`9N-5vh@n;< zRNIc6&UJhY@?%IVdD-=xjGWJqn^0=jZBU)tv{v1U7ED&2v5=oi(iJ2&r=CAe0V;*$ zW$8S9fv(wveNqLlBQuhxlIr{{L<<*+21HMjNzwF5+p`Q`+5~JF9k>|vUCpaTL{(Py zw>le+8;vV|Ci0p)i8;A|+2>n*&Llb{e1az3q!#5`h2t?5>RN5A0%e*-$ySQrj$M&HIK~a9W)6d?W8J*D|_Nsk$ zGP@D92-<(_m%Dt`w&=aK1L=et-x-8!#A~nMjd>p5y_E~xqvBa(g-xz$rbrZzJy}@V zMDqqtV5Q@0Jnd^ZegdA!J_j+KUwf*Q89r!GpX^tCjM-_vCiKDr%LHG*Tq?b|4*FY1 zr|I5VzQbkN?NfI!QSV9w{6i7N+PZuZNn#B7s)KDhPO1TQJe zZL1UgBIOOdRP;I*>7?O<3ezgLDn5OQ67L#>r1#{bKe8hz0Pg XLyRvu{aX3a{{tgEGu={c*U0|?Dtn-9 literal 0 HcmV?d00001 diff --git a/ExpectStreamBak/docs/image/search.png b/ExpectStreamBak/docs/image/search.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d84b697dad0c856a822c2df0a0da46ee3e9be3 GIT binary patch literal 12704 zcmaKTWn9x?_ct&$YBY?JE+wS96+raD)ZuW1T?Qn3UDI*M)-R57?D8{(G_ySR4Gggm^{a$ULZ`#Vl zSlI`9mR!860V&>^<>UGzD;4vViC})Ksa(fDL<)3`tNaT<{#2fw6lCrH>lD%OOh1aR z{Ml3g&0cbLo?W29O1rl;uYT|AlgnY5Wtk1R4fA56Y@{{Pk0y=hB9{g+(RJ5@-qNKjvOa^8CutOT_;keeKu@ z_jbkrr}T`M16BPOI@rG9dBd#DW>VRJ{#&#a8mSRjo@tTgVYnW?I9&fK^9LShqHR~{ z$R8L1OsSy~UIrW)mz5GLf*fiZIk{GSRhg^GGSMTs5zUk{PaJsQ(w^F#!a7XW=3U4z z4AJNt+u{kXwD)tMoSOx<=h4l5%wHVe@dVNP&MLuWh1Nm$=FKKwST}t}sBfyOa%w{a zt*5?f$bHex6HV#uP?MDB799wW=oz*W;m{eUa$fY6N&MX(9$!b-Ay}kWEZ1M{-ZfZj ztfc=7_nOtZen*(ef%;30)NJ++p(aumNd_c-=ORnXHxYRM-9%7MW`)tAhQMZFkn_GZc{UxHU(d&vI}-CD{u{JKt_sfMQ2f+e~1PX}g) z=yU{p!`wmdNnG#vywP9q0H0o*oEwx2n(2G_J-osbVltnfT=GJ4pl|k=v()=_&RSY5 zR5mY`_i4<2oKA25su*5#9{k+=oTsJ)aB`bWEi5aGb`j9x9uQm2mGv-ua!l-*Jvw3* z1X?C5dRE~*EjdJM^sBnO`TZP9lzJ5Hh&U~3?Y^W>OGkIyXRgjLjt`qEOIMvw zycfYPd#0*UcinQ^hHp&Er~`K?PP!Q9A~D(l>taQ51Sf4Bs~ex6{sATF%hoJkF>h(E zE_ybPL1AYGC|*@LRw>52Dk(-e3ywR;nB9?*362NUnTeko2S-rqnX1Z5DDG|`si(nI zrsM^8EfpT&5bu|0HkTVsJmagd1P@u}avO(Ek;zcy^VBCsU9!U`GR!yY4wWC8emffV zYafJtq~HooGv@!Utu_nFlx!q^>QKY1*1BJ`&_mJVb8v@TUtd?)o~d?o zuYZ{K1mtW53*8t^9!?W%XEb^BK)VaL>P@Za7JeS@Zk$t5s&dY#hc=H!vsn5wx0su> zzFWJhGVJaifQ5i{F;t#&p+FKf2Rpk|Wi1VMwqlA;+f?!f->oRRnnMCfYTVwsxh=mk zGYfnK6b@wrD2gg0<5VQ~T1inT)E#5^^SYK7(cekWU4a%9U9N=7inEQtSKfgZKS0FE%iFV;^>)0OMy$LK|I|vXh zhzS`bUcxGt*WTX#XN1@~M{>JivVMc5%K8~u&7`NN=j1n&`t`(D?vw;ry2`WoLc6zD z`&~@73ej4wk^1A^P?oyR-I}Y?3d71vQpNV30bCc!{E!+#^UF`%n)d9;{`8N0K3}+! z{KO;7*YfdoKKVPv6jH=5&Gju4%!PtYg-Ut-o%~i*RCI+&>0W-c$-}Edj*9+{6TZ*3 z&VKu5rpiobW@cu%fZ%Qb<_G#l1ON2tQ_izw9>GUyXB16%C+5QRY;_%+vn)!Uo4Qle zm8Pa($%xU%2$)M~dQ8=}5BobMWi=lI!t2sLRoeho<@2EUsy$-ZUtK`F@_;fc=o_Vc zd|ME$zGmJZg*L?{Qgp?_@1B&jHTtPQ3D{o~ZU*`k+}}VQmWysauEfuUBkJ}JaD_0x z;g76ITZ75>bgT^0qs|Gl*|kZCet^Svwfbq2uSD1m@EB*(YxH(fr1b+rx*na|A2ht3 z(6-UF;Vtmsi=(;=XNXMVz|GB$jNf}^>p9W0Bd_nQ-ggGVcb8em><`TyD-)-f?Bmf^y4J)XZpWkt?yEJIHL;|^ zqGfuKDhYtv#8n|%1QRHJ;L~VC2RW)^T7L&lgr}rQ%eva#_&DINL&vu`Fd?8^On$5T z!#$Zpi?OGWF|$($sMo<*n?sZ%?@a zE$BdYA)$SKo4)u92}8@3c8QmMgRgZ%9H1>0KHNN1Gwh>rKZ=tE7VU8|mmX@p%rh}D zxhR~stA}GmDK_Qd7e^Zwao_eNV$Glc;j}d>YAPlw&e{(vL82c803mkJIEWzMrypc0 zfp&ETz5!5r#QPRjjS?dRgGPRN!-*Hw^n_eJVY7>oNwbwSa@7ltI;~WkRQyz8r^Zh- zL#+{KU>#98B1=z`!%)$zldOK6y{%m2Hiu@$R_2D>^XR}4%%31FTUe-d=>uXgf`jg9 z4D-^27{Vl${W5K3@Xfb{@V>t6(OAGEIq`)Fe}Z`9HT>G#2SbS1!0#RKEKf@m$i+fR%YM7?i7qaDm~gM-c1?+)uTau(h;h~V$@ z12S1=(pY?7?|3I}iuh;0F%;}Pr>BW|9ukd8i;az4tm&=(!O0vzSG4zHQg9yZ zoSr>sdsyb7_kdtohdY=DMaTrmBg_+6%FNEb0^#qArBPq9FwRe8u%4R2Kd+F^&K349 zX~6-uvg>k7M63fZ{^lEm4pY-(kQZ3TvGrPYlG?A5Z_*1HCouf5daZqluY{wIElxIU zSH^jJG<7a=QMF>l%yHSdQ`I*HZnB!{M?2$Ev_qK`1=*Dq5bslHgutrLBu!f z!c5OzwFFQjb7nZ)-aYwi0^ecQup3fom_0zu+SF-X2!mqubfL?P$t%0DL>M5GrSuBf zr_ON~s%6hXi2d046z zJ|L$SM7XmYfw9YY0}%FMpSUX8ZRP@>Jh!aTAHj@MzPzIgbts?R1>FKO%sG<7FX*h; zIIfrbJ<}XtQAl!TJGKSg;i{YnW2hPv?k;coB8@U!I)rQkw zl5ly$AeqKlo6qp!&#cez)wXXL$wqG%D*EWRq8_|MW`u3=^SUFiEN+5cUM9ZI;I_xD zrq50TvZU16Nqzf5Am}c%;ZIm_Q8F5ejENH2zP-x`ouSF0CphWJw)JP;0{>s?+{^tcB z4xW3<n?TI268$OEjv^(LV{gTY{{8e~Ct41a%03AJRl?|+|V8n3x zv<$)A1zwYER6%xBtf<0&(nRQj2mwzod-b6Yz3x4|LGWuZx5-@PQ zr0R1J=;^jEi6~)$d3-Vmh}VX2!EsIJJ=@9n)jHyMeHi|J zMe#NX$-*uoPSkv~MZZ#QQ*sDen^VVklQ(sef z7gvw+Yh=$Qj*nC4tIt-sNP$a}fKU#GW`F;0=Z^w7IuDw7Hi|X1G@a#yLL9ONu#3a= z$Q>oYXYpw-4Gfsa<3-|UdwExx)|x6lxU4NO5V`3hd&KIgJ-BlUr$pn4tNuK~dDS6i z8-1=8@P)Rpx2dfKI@jP=9TBNY6-)LY z<%0@q6{8Dry;g5WLn}?2n=-V5=xgECRGTy40r&8UNZ5ldi256EHr*- z?#R_gJ7jhvaFAiYH5)_v1M|~ssE92}zKw{G9YhO#FD27C+YwKw-OsFL7lgvlAp~Bb zQT@poizbi)Y+~Z!so;Bm^!hQiycXhK0)MqYNaZ>?w8_TPt({RBf0Y=ps((<)AJO_U zy0^0dH$B!ygqUHI7n%Vx32iW+Vzic@E(f_qSTJ{wW=n*Wh0llzD;WU@zD3E8umDT(y2YHDiA?5s=1JrKlS zmw7(@)(Mc+Qj0tM1Zmpj{A=pzR`rA}4P%e&b7=JUKBnV?+^BYn$#D7}P! z>S9RFSo=%j#TI76+ zJ7)F1agox(sZP(pbW}Bd%lIKN%ZrO_afYyT#I+$ci}k?=T$j%2X$ag#F@W2GMn0oz zU7@I@`n~H&mV{e4ig~5MI6zR*$hIS^sUVt~zu=f~DM#jgpOvS^#5>)2gliNncp_RA zi&^7P2G`F_KS~zjfmK?DloQcw>+9uzf3D{J7w$*Eh*zVIaetEi zjYtSnX3F(~T1nD+Z2i59OSf7+ft7wDdWC0KLggh(rS`(`+izuMXcE7oB%1@pgVuBN zxR|WDaEP`uVvG|iY#R!(akr}^NP8#y5x)Y?$v}OG}|Dh(8H7cXZ^2rVG4HyH`DUHqP_K#rTonNVM?Byrd+L2p-8-uU_4U zX5Cxmgt&ChOiKoMMl>1}lQT&=r$Dydm%sS-M3SmEpxMcS87P)D!RMwX0Rf*53e5VwKlA$<$2}XGi-f$2?+e*d+sYD!PpH*D!#og!>0Oqj zka&E>dG6A~o&3lmK7QQ1DgyX=5#@+{bPp+9AOMs^_m0-9PK(N$I^_hUkqz3hSUzkIhCj5JUuf)@|>pjFv1;l|5RXPf9N|a6KhKB!no&_dXQL^3|FOGQltKS-I zr5y0Ea|X`{ds24{sk9$Hxyh8u^FAD%uRQX-s|tX*fU3&p(ESki$x%+|$jFGlcxK!c zwArcqvA~iTY)5)9v ziv^!%KfMOCyd?%Ggwo-*8~2}o^Tav0riU*Ax`p!-+f ztCqDP-?<_fhGwrc+VFhs+vRb0bEZ?Da9uOU*-4Y{SZ`so$dS>X zvNbUJRtNtWjS4Cn(~9wm@lBYG9y9|L5$C-OAb9MEoIZI^#Uyi)*A!>mu%&rw1i9Zck3mV)@DU<12 zto>MgY-g#9G_AKEVIA{YSUSUhzI*^37xhfHf7`7pfF;{W$r{+EJ|h+5660Z37Tu=_ z0@1>sepfo7QZBdS^f&H!GsdwL_AK>jI*Kko+U@nj>D|?r{Y~?Ib#V5_tHev?1{FbJ z{DpJP(kr*REarIiloKqG&`RSgU}c+pEnCX$d9x-7fO!B*UI+ zv?i9An7BN|V^q&!MAA51@Oc2c;+V5OSBXL8O?MUSB@*DiB zIr2AsZ{#F<2fNs`JF9N&V&H}SBhJol#f3!LNU}vpO|IhvnOi0(?UtvsZJ~R-B zgJ)$syj-a`QxB1K1#nmCL!)y!TS$F^IC zBRUs&13r|;h{OHa{Px8r-m6-5^FFiZwT=?}YOK+Mw@?0M(-&2n#rTPM92<-I(9qHO zu(jN2B>+WW(VHv#uF>X9s{2#)Q64_T-~k1>tv<$#UuKRHPxfD^3EU_>KvI*jv7G3a zYTsz$U!?N5@y2dQwv(Xqf$ zb@D?Oa$vj9ekaUVt8@%!Pc()a%^d5mV@Lm^h4}N&I~|a_*~NiF??Sx+(w&#zCwzEdS9~wq@FnAWVSW1|1xUJ9 z7=`Z&8HneW!GfRN`>w~Qf3y5!X5Pc#FX21}NT$#&mi|$NdkK*qni@~>WEqOmKkOQM zx(!?Pi)gj~qNAXpox+CYKG=9fswY2~W1$R(R-Q1{9HZzC4B^M7M@>xj29h`})B&wy zv@dZXp%3@|Z#JmHn^ak7^MR01m!A12Qr0v-y-sesI)A4YPBTjR70Z?G2z^@`@=T-y zctbTUGRbRPvhYAD)-K#T!xd$DF4FOaQPrG>BABG}y&wyyVgj>#-wz}=I)$VDyOo?n z&qkOPQ1BRR{prNkr-4%?LbSb228ypW;#0w7Wu@nmp)gB{>y`b6lGQi-IsJT>p zd?27jncg5HVp!;NuKd5-j8=Yq`pVyQ<-pVm{7-b&svze?Fy~ z0SdiS+V2`IaMgA4B1W(UIMgUaxiFX1J3rQ&ODEFlIsP<{PV}AKLzbK>P(NtlF4KSD zry{anV?G1aasTlzMUE{&xy`yO36WLrvv2z|CRW@)s;~S3{f?QvIWhj_6COGz+UICR z^riDXx%2w>p!a{QKyDsNW7u~30D78ey+OWmG1 zahql0m=l7FDO%?Bs%<^XX9U0l&&>@q$Btr6(uYs9F!;P}FZkVU0$PVN67G|&P7scL zjly9;Y=mIl^8ZV;f~0prr6XAA$Mz4}85&OiSEkhpU*t6O%O(TbR0l|YIz0a~D5ejZ zi2M2+kCI~wtVs5lFdO3wxyyfS=ndgSI;`m{qnoW-biv6w_uk8VV2E5kJdnY?+qlF_ zNtL#O6>Wq|u%ZrLVg85|7yj-~td8?+3=mH+ND5J=FW3Y=^0!Vcxqf2;ceF)5moL5C zUg?RtW2j56J@~M(Z;NmTozrJo6O>$qR902(f!mzL#-8~1Ctey8Fc49L=_v0EfaYoKHUQVF@ArA&DYRL=8=<{MpV@8}pnr3P{;vE{+ zx63E#>FQ#{tNa4MBZXqVukO=J$7*5hjN6DRJnonjO8Lib6d0-M^+olw(I@m_#UIvx4-2wEH=(O_L#B6%z{m2_A}7YoH@t@*)~t`?)9C2v zN>`YNtC64&ho>H2D3LsFk9%%nQ+HNR4|0$ecE^;Y?->I4DpcLVE$YFN>Vlq_D*^#o z|9tuJuaGY&L_CH33jW!Nt=)3MY<%#qW|X3#0W;%@xpTeWz67#57#BvPkO=3Zqje4@ z?c`S|?=G{R@_s91SKHZX-qzw&J2&KRi$8&B7qJffD#(7*MMCXpBrYi#)Lv4u9%fF4 zo@p-8&gJ7cH)_dXpib;KZwwBdaCY|j947~PJ%j63*50BP3u;Ya_-C`8feR1TF=eusR?=)c)HW)h7v;Lndw1a~Z znfg!lK5TvR@)4J>>Ht@p2c=(mW#w++-@kvU2UC>CG$REa`im-e`gbG7hlYm8b5kw% zOr{C(&E;<*70B@98+3K$j{!UdG6@2^fa`^LR@sQ>9QO|w9CL;61bWIJ7cRbIt z8VI|w_1e($strnQ2G{^I@>F_B+o;iNdm2)@rYe_MM3+G8a~ARZ7+d09`iSt15&-w3 z5^MvK{m+iXyg;M6WEyHwzpf=R_D1vkV#YKJHlJ*KAL+27Qm6n{>*x;f3DmO%kRP#F zuo~VAc=CIeq|hI1Hj^N&us2W<#s|uIG{&SHvn|)n;b%n&U&49T^D?dd02M~j$%o(LaX!#3d9tJOP|8oji^l;B?+RO=Ba}V22b_bZuXk%~Z;=IlBR_ zAePIadw-{GSufs^L}jn(9xvF6`I$7uumFYH@_+A{{Y%*$%5#vxfvZ0Mnj|vHTJECQ zQln1oE(cfwZt2Wp8|?nYoxj_?f@u`?%^Z_A^)RpF(`DYT#}AK;bP#n*F>pXhWAk8^ zt)M#{MB0Y6!DHP$2InZfz4rTO!o9m@*TFTdt-h$slkGL&&%%p;x8AWgjh2K=7XwdB z&0}=e5vI$Wrp4x#m?C~)hzVEkU%SgF)>CTLJ^ihFkrH;$LAq?ZM*V0y(rg3cOSKUk zfUPPfOW)Znymv~oxi}*NU>V~?g0NcjW##>bb#*9@_ZiXMZo3YHH&v;N#B5n<2G(WItdU&dH=i`0=5^b);) zWC1Pxs>t`bQ=33Xhyt;>XTC>uAhs_h;P~smTXI2<|BX)?G>Q`iGV+&pn!fKx19$JU z-u%`_xEe9aP>HZ~!BWzvpb1AS0E}P6g>EQ}=sAsYVV9LXT-BbZM-%{oLdvC%lvvs@ z6-0TU9il9q=3*#bC-p4_RslLc?In<+qjPh7LbMwe2r#}Nb}I}3o4V>ze*S#KS0I_S z+$Zq7$N8`k{{eRD&&_wSA9iS1>*($ymK3bUcVanTi4g+mTME#m-HFReKz6K}yE=Yc z;@RMk?ldC!9KP!@U`+q%U=fikDGKvBy(QTD?KS@@OF~4hbOW-^ZZysiP7EqZOBiU)4~k2ZOG$44Vi4yvSbzH#9fj4ZWjIkVH9QwZy>8 zf}bw{n3|fZ<{X~S-tm=RQUbyMec#|9+vk4t#+3xbNvbvoe(c&OHrZF-?9n~sO5aq{ zW}F+7AoLp%SUCg;!C4>g0fgX~N7VRkF7F%;HreRi|M9H?P4aTIL`P95JY*MfK4!nN+l-dGOT+LirWWqu1|nJ#8S`Xfl_g1m$|A3(!udzK#!BGyN;g>q!Q9C@Cg1kP+6_0+t*Pb0B* zGO6~XKE_(4=cdpeC;1af?>HVDa=@wn;o3yt4?K!4j$w~n0dRG;@0N{)CoZn8doG&~ zX~Xj<9uq3t2ThDfEngpE3*I0&G?yWdU7PENCB0<{9eDriWNekoD{LlDNVg9s&?YjS zxL#h01}r=wh8h_d=!ZZcol$!8i-BY0x`8H<-S2omhRj7`hQ&O_+_f9bh5oTs3WQjDiT9z3CRk*I^!7jFB6g^Hn)&G z&joW~?T`@er<8km$SZ4K-;0C}_xsQeEle_)3yGZ}s>4$h$0B@hA$($UA?j-`z%#62 z()?5dBkPC5{q?+1*8SM0nuBoMwS*OwE+^8%GiscF)oq2QgqAK_sFvkm&E7i#TyrBM zqpt;D&|7D;l#JLTbvlw=sl#dHPl7m<^|3I1>x8DQ(E_&(+}WsAof!Q?7gQrZwq{)W znJmG1wDA{M0%bf~Sy?$F)+06@h+mb8Ywstk5Y~9eb2KKJ+sV$?!+^GVb9pa1B+idG zPqB+4i5nY@P0Ab!19ftB2nTqu#@P=ZLo}fN0P1(G!j*;+x zqJxJetputfNtVb}DX6d;kg|-SKCu%oLQim=$Qb}RbyQ_NrVpSYhp3^R0jzF>tMfmj zfqe@6WMTlC4rRCwk|f;QPy_VOvM&oG?z?b`$p_0gxY!o3V&{WAp_k+!K{7pzd~rrZ za>zNB!PWPF`Y53d@u3@_B!MvSmmw@w1JLjMd~99h6g!Fy5c2PWQtm4Cm?&8DI_P8Wc?={EC<|j{rrKcswfGg=0y7neDnOsug<+#C z+<)WVFXygcu>gL|Tu!T@ZO%K0O#eH3E%lgh9Lh40}t?f*`y9eOD&)}tArkf({2#qw-# zkyqHo&P7{WTT=B8gfQQc8K=*M?&0eerZ8%uQVl6F_)CUA7q$pX5ai)&X>NZ0?G1_! zr73$Xy}@u`#yXX8ERl5+?r_%z%hUNFh&dFxqF0*>a#&hv$N;n z@-nMDEW~-)&UFH!mePQKjfA*kS4EYio;f-}dEZV;8DdlBw9=@qQecD%!pTuTOSFcIc&hy{iZ!&NJ1j z!^-~vu(r0AEK+VtymG~;m9p`^+S`$@_qm$s9re6q%0W9el!+Vgk`@&Db#%+LSA9J+ Vu(5TF{pSVFvnSfBRgWw~{|7^yU3&lk literal 0 HcmV?d00001 diff --git a/ExpectStreamBak/docs/index.html b/ExpectStreamBak/docs/index.html new file mode 100644 index 0000000..355baae --- /dev/null +++ b/ExpectStreamBak/docs/index.html @@ -0,0 +1,264 @@ + + + + + + API Document + + + + + + + + + +
+ Home + + Reference + Source + + Repository + +
+ + + +

CoreAssert

+

Testing stuff sucks and testing more esoteric stuff sucks harder. So we build this extension to chai to reduce the suck-factor of comparing images and testing node streams. +Now, let's forget about all the drama and call it a victory:

+

victory

+

API

+

As this module extends chai most of the documentation can be found at their website. CoreAssert extends it with new methods for asserting streams asynchronously and also ships some assertions for image comparison:

+

Streams

+
.produce
+

This method takes either one or multiple values, which are expected to be the only outputs produced by the stream under test or a function that takes the value and checks if it is the expected one. In the latter case, there are three values your callback should return to signal its state:

+
    +
  • If the function returns 0, the input value is not the expected value, but does not represent an error case either. The test will go on (or timeout).

    +
  • +
  • If the function returns 1, it's the signal that the correct value has finally arrived. The assertion will notify the test, that it is successful.

    +
  • +
  • If the function returns -1, it signals that the given input value is erroneous. We will be notified of the error via notify.

    +
  • +
+
.eventually
+

This property allows CoreAssert to ignore mismatches until the correct values are produced.

+

.exactly

+

Using this chainable method will adjust the assertion configuration to strict equality. Otherwise CoreAssert validates, if the produced output contains the expected value.

+
.filter
+

This method accepts a function, that can be used to ignore some outputs, which is signalled by returning false in this callback.

+
.on
+

This method takes the values the stream under test should use to produce its output, if it isn't only a readable stream.

+
.notify
+

This method is used to notify the testrunner if an error occurs or if the streams ended and have produced the expected message

+
.tap
+

With this method you can tap into the stream under test and inspect whats going on, if an error happens

+

Image Comparison

+
.image
+

This function expects the value to be the buffer of the reference image you are testing against.

+
.part
+

In conjunction with the previous method this method enables you to ignore several regions of both images, when comparing them. See ImageComparer if you like to get to know more about regions.

+

Usage

+

Testing Streams

+

Suppose we have a transform stream, that adds a Mr. to the start of every value, that enters it:

+
// src/Misterizer
+import { Transform } from "stream";
+
+export default class Misterizer extends Transform {
+    _transform(name, enc, cb) {
+        this.push(`Mr. ${name}`);
+        cb();
+    }
+}
+
+

Now we'd like to test it, using mocha with CoreAssert:

+
// src/__tests__/MisterizerTest
+import { expect } from "core-assert";
+import Misterizer from "../Misterizer"
+
+describe("MisterizerTest", function() {
+    // this test passes
+    it("Misterizes Circle", function(done) {
+        expect(new Misterizer())
+            .to.exactly.produce("Mr. Circle")
+            .on("Circle")
+            .notify(done);
+    });
+
+    // this test will trigger a timeout
+    it("Misterizes Square", function(done) {
+        expect(new Misterizer())
+            .to.eventually.produce("Mr. Circle")
+            .on("Square")
+            .tap(::console.log) // will print "Square, 0)"
+            .notify(done);
+    });
+});
+
+

But the mighty power of CoreAssert offers much more functionality, which will be presented by FunnyBot:

+
// src/FunnyBot
+import { Readable } from "stream";
+
+export default class FunnyBot extends Readable {
+    constructor(jokes) {
+        super({ objectMode: true });
+
+        this.jokes = jokes;
+    }
+
+    _read() {
+        return this.push(this.jokes.shift());
+    }
+}
+
+

All that is missing now are some funny jokes:

+
// src/__tests__/FunnyBotTest
+import { expect } from "@circle/core-assert";
+import FunnyBot from "../FunnyBot";
+
+describe("FunnyBot", function() {
+    it("tells multiple really funny jokes", function() {
+        expect(new FunnyBot([{
+            date: Date.now(),
+            joke: "Hello, I am FunnyBot!"
+        }, {
+            date: Date.now(),
+            joke: "I am not a joke"
+        }, {
+            date: Date.now(),
+            joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts"
+        }]).filter(x => x.joke !== "I am not a joke").to.produce([{
+            joke: "Hello, I am FunnyBot!" 
+        }, {
+            joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts"
+        }]).notify(done);
+    });
+
+    it("thinks about complex problems", function() {
+        expect(new FunnyBot([{
+            date: Date.now(),
+            joke: "Hello, I am FunnyBot!"
+        }, {
+            date: Date.now(),
+            joke: "I am not a joke"
+        }, {
+            date: Date.now(),
+            joke: "The line is an imaginary invention of imperfect biological life forms."
+        }]).to.eventually.produce([{
+            joke: "Hello, I am FunnyBot!" 
+        }, {
+            joke: "The line is an imaginary invention of imperfect biological life forms."
+        }]).notify(done);
+    });
+
+    it("writes up some new material", function() {
+        expect(new FunnyBot([{
+            firstTry: "Error. Error. Banal."
+        }, {
+            secondTry: "That has been done before."
+        }, {
+            lastTry: "Funnybot is now finished with final joke."
+        }]).to.produce.exactly([{
+            firstTry: "Error. Error. Banal."
+        }, {
+            secondTry: "That has been done before."
+        }, {
+            lastTry: "Funnybot is now finished with final joke."
+        }]).notify(done);    
+    });
+});
+
+

Testing Images

+

Using mocha with CoreAssert for image comparison results in the following:

+
// src/__tests__/ImageComparerTest
+import { expect } from "core-assert";
+import Q from "q";
+import fs from "fs";
+
+describe("ImageComparerTest", function() {
+    // this test results in a full comparison of given image buffers
+    it("ImageComparer (no regions)", async function(done) {
+        try {
+            const image     = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/image.png"));
+            const reference = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/reference.png"));
+
+            expect(image).to.be.image(reference);
+            done();
+        } catch(e) {
+            done(e);
+        }
+    });
+
+    // this test results in a comparison of given image buffers with suppressed regions
+    it("ImageComparer (with regions)", async function(done) {
+        try {
+            const image     = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/image.png"));
+            const reference = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/reference.png"));
+            const regions   = [{
+                absolute: {
+                    x:      10,
+                    y:      10,
+                    height: 5,
+                    width:  5
+                },
+                relative: {
+                    x:      10,
+                    y:      10,
+                    height: 5,
+                    width:  5
+                },
+                precision: 100
+            }];
+
+            expect(image).to.be.part(regions).of.image(reference);
+
+            done();
+        } catch(e) {
+            done(e);
+        }
+    });
+});
+
+

Testing

+

CoreAssert is tested with mocha by executing make test in the root directory of the project.

+

Contributing

+

If you want to contribute to this repository, please ensure ...

+
    +
  • to use make for development (it validates the source code and transpiles it to /lib).
  • +
  • to follow the existing coding style.
  • +
  • to use the linting tools that are listed in the package.json (which you get for free when using make).
  • +
  • to add and/or customize unit tests for any changed code.
  • +
  • to reference the corresponding issue in your pull request with a small description of your changes.
  • +
+

All contributors are listed in the AUTHORS file, sorted by the time of their first contribution.

+
+
+ + + + + + + + + + + + diff --git a/ExpectStreamBak/docs/package.json b/ExpectStreamBak/docs/package.json new file mode 100644 index 0000000..234bb4b --- /dev/null +++ b/ExpectStreamBak/docs/package.json @@ -0,0 +1,638 @@ +{ + "name": "expect-stream", + "version": "0.1.0", + "description": "chai extension for mocha stream tests", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "keywords": [], + "repository": "https://github.com/CircleOfNice/CoreAssert.git", + "author": "TeeAge-Beatz UG", + "license": "GPL-3.0", + "peerDependencies": { + "chai": "3.x" + }, + "dependencies": { + "set-default-value": "0.0.8" + }, + "devDependencies": { + "babel-cli": "^6.18.0", + "babel-eslint": "^7.1.1", + "babel-plugin-transform-class-properties": "^6.19.0", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", + "chai": "^3.5.0", + "esdoc": "^0.4.8", + "esdoc-es7-plugin": "0.0.3", + "eslint": "^3.10.2", + "istanbul": "^0.4.5", + "mocha": "^3.1.2", + "remap-istanbul": "^0.7.0", + "sinon": "^1.17.6" + }, + "eslintConfig": { + "parser": "babel-eslint", + "env": { + "browser": true, + "node": true, + "es6": true, + "mocha": true + }, + "rules": { + "strict": [ + 2 + ], + "curly": [ + 2, + "multi" + ], + "default-case": [ + 2 + ], + "comma-dangle": [ + 2 + ], + "no-cond-assign": [ + 2 + ], + "no-constant-condition": [ + 2 + ], + "no-empty-character-class": [ + 2 + ], + "no-empty": [ + 2 + ], + "no-ex-assign": [ + 2 + ], + "no-extra-boolean-cast": [ + 2 + ], + "no-extra-semi": [ + 2 + ], + "no-func-assign": [ + 2 + ], + "no-inner-declarations": [ + 2 + ], + "no-invalid-regexp": [ + 2 + ], + "no-irregular-whitespace": [ + 2 + ], + "valid-typeof": [ + 2 + ], + "no-unexpected-multiline": [ + 2 + ], + "no-negated-in-lhs": [ + 2 + ], + "no-obj-calls": [ + 2 + ], + "no-regex-spaces": [ + 2 + ], + "no-sparse-arrays": [ + 2 + ], + "no-unreachable": [ + 2 + ], + "use-isnan": [ + 2 + ], + "no-control-regex": [ + 2 + ], + "no-debugger": [ + 2 + ], + "no-dupe-keys": [ + 2 + ], + "no-dupe-args": [ + 2 + ], + "no-duplicate-case": [ + 2 + ], + "accessor-pairs": [ + 2 + ], + "block-scoped-var": [ + 2 + ], + "no-multi-spaces": [ + 2, + { + "exceptions": { + "VariableDeclarator": true, + "AssignmentExpression": true, + "IfStatement": true + } + } + ], + "key-spacing": [ + 2, + { + "align": "value" + } + ], + "new-cap": [ + 0, + { + "capIsNewExceptions": [] + } + ], + "valid-jsdoc": [ + 2, + { + "requireReturn": false, + "requireReturnDescription": false + } + ], + "complexity": [ + 2, + 5 + ], + "consistent-return": [ + 2 + ], + "dot-notation": [ + 2 + ], + "dot-location": [ + 2, + "property" + ], + "eqeqeq": [ + 2 + ], + "guard-for-in": [ + 2 + ], + "no-alert": [ + 2 + ], + "no-caller": [ + 2 + ], + "no-div-regex": [ + 2 + ], + "no-else-return": [ + 2 + ], + "no-labels": [ + 2 + ], + "no-eval": [ + 2 + ], + "no-extra-bind": [ + 2 + ], + "no-eq-null": [ + 2 + ], + "no-extend-native": [ + 2 + ], + "no-fallthrough": [ + 2 + ], + "no-floating-decimal": [ + 2 + ], + "no-implicit-coercion": [ + 2 + ], + "no-implied-eval": [ + 2 + ], + "no-invalid-this": [ + 0 + ], + "no-iterator": [ + 2 + ], + "no-lone-blocks": [ + 2 + ], + "no-loop-func": [ + 2 + ], + "no-multi-str": [ + 2 + ], + "no-native-reassign": [ + 2 + ], + "no-new-func": [ + 2 + ], + "no-new-wrappers": [ + 2 + ], + "no-new": [ + 2 + ], + "keyword-spacing": [ + 2, + { + "overrides": { + "if": { + "after": false + }, + "for": { + "after": false + }, + "while": { + "after": false + }, + "catch": { + "after": false + } + } + } + ], + "no-octal": [ + 2 + ], + "no-octal-escape": [ + 2 + ], + "no-param-reassign": [ + 2 + ], + "no-process-env": [ + 2 + ], + "no-proto": [ + 2 + ], + "no-redeclare": [ + 2 + ], + "no-return-assign": [ + 2 + ], + "no-script-url": [ + 2 + ], + "no-self-compare": [ + 2 + ], + "no-sequences": [ + 2 + ], + "no-throw-literal": [ + 2 + ], + "no-unused-expressions": [ + 2 + ], + "no-useless-call": [ + 2 + ], + "no-void": [ + 2 + ], + "no-warning-comments": [ + 2 + ], + "no-with": [ + 2 + ], + "radix": [ + 2 + ], + "vars-on-top": [ + 2 + ], + "wrap-iife": [ + 2 + ], + "yoda": [ + 2 + ], + "no-undef": [ + 2 + ], + "no-undefined": [ + 2 + ], + "init-declarations": [ + 2, + "always" + ], + "no-catch-shadow": [ + 2 + ], + "no-delete-var": [ + 2 + ], + "no-label-var": [ + 2 + ], + "no-shadow-restricted-names": [ + 2 + ], + "no-shadow": [ + 2 + ], + "no-undef-init": [ + 2 + ], + "no-unused-vars": [ + 2 + ], + "no-use-before-define": [ + 2 + ], + "callback-return": [ + 2 + ], + "handle-callback-err": [ + 2 + ], + "no-mixed-requires": [ + 2 + ], + "no-new-require": [ + 2 + ], + "no-path-concat": [ + 2 + ], + "no-process-exit": [ + 2 + ], + "no-sync": [ + 2 + ], + "func-style": [ + 2, + "expression" + ], + "no-inline-comments": [ + 2 + ], + "no-array-constructor": [ + 2 + ], + "no-multiple-empty-lines": [ + 2 + ], + "array-bracket-spacing": [ + 2, + "never" + ], + "block-spacing": [ + 2, + "always" + ], + "brace-style": [ + 2, + "1tbs" + ], + "camelcase": [ + 2 + ], + "comma-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "computed-property-spacing": [ + 2, + "always" + ], + "consistent-this": [ + 2, + "self" + ], + "eol-last": [ + 2 + ], + "id-length": [ + 2, + { + "min": 2, + "max": 20, + "exceptions": [ + "x", + "e", + "T", + "Q", + "$", + "y", + "a", + "b", + "t", + "c", + "_" + ] + } + ], + "indent": [ + 2 + ], + "lines-around-comment": [ + 2, + { + "beforeBlockComment": true, + "beforeLineComment": false + } + ], + "linebreak-style": [ + 2 + ], + "max-nested-callbacks": [ + 2, + 3 + ], + "new-parens": [ + 2 + ], + "newline-after-var": [ + 2 + ], + "no-continue": [ + 2 + ], + "no-mixed-spaces-and-tabs": [ + 2 + ], + "no-nested-ternary": [ + 2 + ], + "no-new-object": [ + 2 + ], + "no-spaced-func": [ + 2 + ], + "no-trailing-spaces": [ + 2 + ], + "no-underscore-dangle": [ + 2 + ], + "no-unneeded-ternary": [ + 2 + ], + "object-curly-spacing": [ + 2, + "always" + ], + "one-var": [ + 2, + "never" + ], + "operator-assignment": [ + 2, + "never" + ], + "operator-linebreak": [ + 2, + "after" + ], + "padded-blocks": [ + 2, + "never" + ], + "quote-props": [ + 2, + "consistent-as-needed" + ], + "quotes": [ + 2, + "double" + ], + "semi-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "semi": [ + 2, + "always" + ], + "space-before-blocks": [ + 2, + "always" + ], + "space-before-function-paren": [ + 2, + "never" + ], + "space-in-parens": [ + 2, + "never" + ], + "space-infix-ops": [ + 2 + ], + "space-unary-ops": [ + 2, + { + "words": true, + "nonwords": false + } + ], + "spaced-comment": [ + 2, + "always" + ], + "arrow-parens": [ + 2, + "as-needed" + ], + "arrow-spacing": [ + 2, + { + "before": true, + "after": true + } + ], + "constructor-super": [ + 2 + ], + "generator-star-spacing": [ + 0, + { + "before": false, + "after": true + } + ], + "no-class-assign": [ + 2 + ], + "no-const-assign": [ + 2 + ], + "no-dupe-class-members": [ + 2 + ], + "no-this-before-super": [ + 2 + ], + "no-var": [ + 2 + ], + "object-shorthand": [ + 0, + "never" + ], + "prefer-const": [ + 2 + ], + "prefer-spread": [ + 2 + ], + "prefer-reflect": [ + 0 + ], + "prefer-template": [ + 2 + ], + "require-yield": [ + 2 + ], + "max-depth": [ + 2, + 5 + ], + "max-statements": [ + 2, + 10 + ] + }, + "ecmaFeatures": { + "blockBindings": true, + "forOf": true, + "jsx": true, + "arrowFunctions": true, + "spread": true, + "modules": true, + "asyncFunctions": true, + "functionBind": true + } + } +} diff --git a/ExpectStreamBak/docs/script/inherited-summary.js b/ExpectStreamBak/docs/script/inherited-summary.js new file mode 100644 index 0000000..0a35b6d --- /dev/null +++ b/ExpectStreamBak/docs/script/inherited-summary.js @@ -0,0 +1,28 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TABLE' && parent.classList.contains('summary')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var tbody = parent.querySelector('tbody'); + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + tbody.style.display = 'none'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + tbody.style.display = 'block'; + } + } + + var buttons = document.querySelectorAll('.inherited-summary thead .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } +})(); diff --git a/ExpectStreamBak/docs/script/inner-link.js b/ExpectStreamBak/docs/script/inner-link.js new file mode 100644 index 0000000..69a7477 --- /dev/null +++ b/ExpectStreamBak/docs/script/inner-link.js @@ -0,0 +1,31 @@ +// inner link(#foo) can not correctly scroll, because page has fixed header, +// so, I manually scroll. +(function(){ + var matched = location.hash.match(/errorLines=([\d,]+)/); + if (matched) return; + + function adjust() { + window.scrollBy(0, -55); + var el = document.querySelector('.inner-link-active'); + if (el) el.classList.remove('inner-link-active'); + + // ``[ ] . ' " @`` are not valid in DOM id. so must escape these. + var id = location.hash.replace(/([\[\].'"@$])/g, '\\$1'); + var el = document.querySelector(id); + if (el) el.classList.add('inner-link-active'); + } + + window.addEventListener('hashchange', adjust); + + if (location.hash) { + setTimeout(adjust, 0); + } +})(); + +(function(){ + var els = document.querySelectorAll('[href^="#"]'); + for (var i = 0; i < els.length; i++) { + var el = els[i]; + el.href = location.href + el.getAttribute('href'); // because el.href is absolute path + } +})(); diff --git a/ExpectStreamBak/docs/script/manual.js b/ExpectStreamBak/docs/script/manual.js new file mode 100644 index 0000000..125049d --- /dev/null +++ b/ExpectStreamBak/docs/script/manual.js @@ -0,0 +1,13 @@ +(function(){ + var matched = location.pathname.match(/([^/]*)\.html$/); + if (!matched) return; + + var currentName = matched[1]; + var cssClass = '.navigation [data-toc-name="' + currentName + '"]'; + var styleText = cssClass + ' .manual-toc { display: block; }\n'; + styleText += cssClass + ' .manual-toc-title { background-color: #039BE5; }\n'; + styleText += cssClass + ' .manual-toc-title a { color: white; }\n'; + var style = document.createElement('style'); + style.textContent = styleText; + document.querySelector('head').appendChild(style); +})(); diff --git a/ExpectStreamBak/docs/script/patch-for-local.js b/ExpectStreamBak/docs/script/patch-for-local.js new file mode 100644 index 0000000..5756d13 --- /dev/null +++ b/ExpectStreamBak/docs/script/patch-for-local.js @@ -0,0 +1,8 @@ +(function(){ + if (location.protocol === 'file:') { + var elms = document.querySelectorAll('a[href="./"]'); + for (var i = 0; i < elms.length; i++) { + elms[i].href = './index.html'; + } + } +})(); diff --git a/ExpectStreamBak/docs/script/prettify/Apache-License-2.0.txt b/ExpectStreamBak/docs/script/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/ExpectStreamBak/docs/script/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/ExpectStreamBak/docs/script/prettify/prettify.js b/ExpectStreamBak/docs/script/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/ExpectStreamBak/docs/script/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p' + pair[2] + ''); + } + } + + var innerHTML = ''; + for (kind in html) { + var list = html[kind]; + if (!list.length) continue; + innerHTML += '
  • ' + kind + '
  • \n' + list.join('\n'); + } + result.innerHTML = innerHTML; + if (innerHTML) result.style.display = 'block'; + selectedIndex = -1; + }); + + // down, up and enter key are pressed, select search result. + input.addEventListener('keydown', function(ev){ + if (ev.keyCode === 40) { + // arrow down + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex + 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex + 2]; + selectedIndex++; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex++; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 38) { + // arrow up + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex - 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex - 2]; + selectedIndex--; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex--; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 13) { + // enter + var current = result.children[selectedIndex]; + if (current) { + var link = current.querySelector('a'); + if (link) location.href = link.href; + } + } else { + return; + } + + ev.preventDefault(); + }); + + // select search result when search result is mouse over. + result.addEventListener('mousemove', function(ev){ + var current = result.children[selectedIndex]; + if (current) current.classList.remove('selected'); + + var li = ev.target; + while (li) { + if (li.nodeName === 'LI') break; + li = li.parentElement; + } + + if (li) { + selectedIndex = Array.prototype.indexOf.call(result.children, li); + li.classList.add('selected'); + } + }); + + // clear search result when body is clicked. + document.body.addEventListener('click', function(ev){ + selectedIndex = -1; + result.style.display = 'none'; + result.innerHTML = ''; + }); + +})(); diff --git a/ExpectStreamBak/docs/script/search_index.js b/ExpectStreamBak/docs/script/search_index.js new file mode 100644 index 0000000..2007487 --- /dev/null +++ b/ExpectStreamBak/docs/script/search_index.js @@ -0,0 +1,488 @@ +window.esdocSearchIndex = [ + [ + "expect-stream/src/assertstream.js~assertstream", + "class/src/AssertStream.js~AssertStream.html", + "AssertStream expect-stream/src/AssertStream.js", + "class" + ], + [ + "expect-stream/src/expected.js~expected", + "class/src/Expected.js~Expected.html", + "Expected expect-stream/src/Expected.js", + "class" + ], + [ + "expect-stream/src/streamhelper.js~streamhelper", + "function/index.html#static-function-StreamHelper", + "StreamHelper expect-stream/src/StreamHelper.js", + "function" + ], + [ + "builtinexternal/ecmascriptexternal.js~array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~arraybuffer", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~dataview", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~DataView", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~date", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Date", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~error", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Error", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~evalerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float64array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generator", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Generator", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generatorfunction", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~infinity", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int16array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int8array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~internalerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~json", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~JSON", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~map", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Map", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~nan", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~NaN", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~promise", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Promise", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~proxy", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~rangeerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~referenceerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~reflect", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~regexp", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~set", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Set", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~String", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~symbol", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~syntaxerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~typeerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~urierror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~URIError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint16array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8clampedarray", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakmap", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakset", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~null", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~null", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~string", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~undefined", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~undefined", + "external" + ], + [ + "builtinexternal/webapiexternal.js~audiocontext", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~AudioContext", + "external" + ], + [ + "builtinexternal/webapiexternal.js~canvasrenderingcontext2d", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "external" + ], + [ + "builtinexternal/webapiexternal.js~documentfragment", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "external" + ], + [ + "builtinexternal/webapiexternal.js~element", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Element", + "external" + ], + [ + "builtinexternal/webapiexternal.js~event", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Event", + "external" + ], + [ + "builtinexternal/webapiexternal.js~node", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Node", + "external" + ], + [ + "builtinexternal/webapiexternal.js~nodelist", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~NodeList", + "external" + ], + [ + "builtinexternal/webapiexternal.js~xmlhttprequest", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "external" + ], + [ + "src/assertstream.js", + "file/src/AssertStream.js.html", + "src/AssertStream.js", + "file" + ], + [ + "src/assertstream.js~assertstream#_write", + "class/src/AssertStream.js~AssertStream.html#instance-method-_write", + "src/AssertStream.js~AssertStream#_write", + "method" + ], + [ + "src/assertstream.js~assertstream#constructor", + "class/src/AssertStream.js~AssertStream.html#instance-constructor-constructor", + "src/AssertStream.js~AssertStream#constructor", + "method" + ], + [ + "src/assertstream.js~assertstream#expected", + "class/src/AssertStream.js~AssertStream.html#instance-member-expected", + "src/AssertStream.js~AssertStream#expected", + "member" + ], + [ + "src/assertstream.js~assertstream#tapper", + "class/src/AssertStream.js~AssertStream.html#instance-member-tapper", + "src/AssertStream.js~AssertStream#tapper", + "member" + ], + [ + "src/expected.js", + "file/src/Expected.js.html", + "src/Expected.js", + "file" + ], + [ + "src/expected.js~expected#constructor", + "class/src/Expected.js~Expected.html#instance-constructor-constructor", + "src/Expected.js~Expected#constructor", + "method" + ], + [ + "src/expected.js~expected#expected", + "class/src/Expected.js~Expected.html#instance-member-expected", + "src/Expected.js~Expected#expected", + "member" + ], + [ + "src/expected.js~expected#expection", + "class/src/Expected.js~Expected.html#instance-member-expection", + "src/Expected.js~Expected#expection", + "member" + ], + [ + "src/expected.js~expected#filter", + "class/src/Expected.js~Expected.html#instance-member-filter", + "src/Expected.js~Expected#filter", + "member" + ], + [ + "src/expected.js~expected#geterror", + "class/src/Expected.js~Expected.html#instance-method-getError", + "src/Expected.js~Expected#getError", + "method" + ], + [ + "src/expected.js~expected#includes", + "class/src/Expected.js~Expected.html#instance-method-includes", + "src/Expected.js~Expected#includes", + "method" + ], + [ + "src/expected.js~expected#match", + "class/src/Expected.js~Expected.html#instance-method-match", + "src/Expected.js~Expected#match", + "method" + ], + [ + "src/expected.js~expected#matcher", + "class/src/Expected.js~Expected.html#instance-member-matcher", + "src/Expected.js~Expected#matcher", + "member" + ], + [ + "src/expected.js~expected#messages", + "class/src/Expected.js~Expected.html#instance-member-messages", + "src/Expected.js~Expected#messages", + "member" + ], + [ + "src/expected.js~expected#onmismatch", + "class/src/Expected.js~Expected.html#instance-member-onMisMatch", + "src/Expected.js~Expected#onMisMatch", + "member" + ], + [ + "src/expected.js~expected.of", + "class/src/Expected.js~Expected.html#static-method-of", + "src/Expected.js~Expected.of", + "method" + ], + [ + "src/streamhelper.js", + "file/src/StreamHelper.js.html", + "src/StreamHelper.js", + "file" + ], + [ + "src/__tests__/assertstreamtest.js", + "file/src/__tests__/AssertStreamTest.js.html", + "src/__tests__/AssertStreamTest.js", + "file" + ], + [ + "src/__tests__/expectstreamtest.js", + "file/src/__tests__/ExpectStreamTest.js.html", + "src/__tests__/ExpectStreamTest.js", + "file" + ], + [ + "src/__tests__/expectedtest.js", + "file/src/__tests__/ExpectedTest.js.html", + "src/__tests__/ExpectedTest.js", + "file" + ], + [ + "src/examples/test.js", + "file/src/examples/test.js.html", + "src/examples/test.js", + "file" + ], + [ + "src/index.js", + "file/src/index.js.html", + "src/index.js", + "file" + ] +] \ No newline at end of file diff --git a/ExpectStreamBak/docs/script/test-summary.js b/ExpectStreamBak/docs/script/test-summary.js new file mode 100644 index 0000000..2f32cb0 --- /dev/null +++ b/ExpectStreamBak/docs/script/test-summary.js @@ -0,0 +1,54 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TR' && parent.classList.contains('test-describe')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var direction; + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + direction = 'closed'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + direction = 'opened'; + } + + var targetDepth = parseInt(parent.dataset.testDepth, 10) + 1; + var nextElement = parent.nextElementSibling; + while (nextElement) { + var depth = parseInt(nextElement.dataset.testDepth, 10); + if (depth >= targetDepth) { + if (direction === 'opened') { + if (depth === targetDepth) nextElement.style.display = ''; + } else if (direction === 'closed') { + nextElement.style.display = 'none'; + var innerButton = nextElement.querySelector('.toggle'); + if (innerButton && innerButton.classList.contains('opened')) { + innerButton.classList.remove('opened'); + innerButton.classList.add('closed'); + } + } + } else { + break; + } + nextElement = nextElement.nextElementSibling; + } + } + + var buttons = document.querySelectorAll('.test-summary tr.test-describe .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } + + var topDescribes = document.querySelectorAll('.test-summary tr[data-test-depth="0"]'); + for (var i = 0; i < topDescribes.length; i++) { + topDescribes[i].style.display = ''; + } +})(); diff --git a/ExpectStreamBak/docs/source.html b/ExpectStreamBak/docs/source.html new file mode 100644 index 0000000..8171088 --- /dev/null +++ b/ExpectStreamBak/docs/source.html @@ -0,0 +1,137 @@ + + + + + + Source | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    Source 9/18

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileIdentifierDocumentSizeLinesUpdated
    src/AssertStream.jsAssertStream60 %3/51405 byte472016-11-05 12:43:03 (UTC)
    src/Expected.jsExpected41 %5/122512 byte862016-11-05 12:43:03 (UTC)
    src/StreamHelper.jsStreamHelper100 %1/12113 byte712016-11-05 12:43:03 (UTC)
    src/__tests__/AssertStreamTest.js--4025 byte1142016-11-05 12:43:03 (UTC)
    src/__tests__/ExpectStreamTest.js--8142 byte2492016-11-05 12:52:54 (UTC)
    src/__tests__/ExpectedTest.js--2442 byte692016-11-05 12:43:03 (UTC)
    src/examples/test.js--0 byte2016-11-05 12:43:03 (UTC)
    src/index.js--123 byte72016-11-05 12:52:58 (UTC)
    +
    + + + + + + + + + + + + diff --git a/ExpectStreamBak/esdoc.json b/ExpectStreamBak/esdoc.json new file mode 100644 index 0000000..2e814b4 --- /dev/null +++ b/ExpectStreamBak/esdoc.json @@ -0,0 +1,8 @@ +{ + "source": "./src", + "destination": "./docs", + "plugins": [ + {"name": "esdoc-es7-plugin"} + ], + "autoPrivate": false +} diff --git a/ExpectStreamBak/examples/test b/ExpectStreamBak/examples/test new file mode 100755 index 0000000..b7d5729 --- /dev/null +++ b/ExpectStreamBak/examples/test @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict"; + +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/ExpectStreamBak/index.js b/ExpectStreamBak/index.js new file mode 100644 index 0000000..5304ad0 --- /dev/null +++ b/ExpectStreamBak/index.js @@ -0,0 +1 @@ +module.exports = require("./lib/index"); diff --git a/ExpectStreamBak/lib/AssertStream.js b/ExpectStreamBak/lib/AssertStream.js new file mode 100644 index 0000000..89b8bf3 --- /dev/null +++ b/ExpectStreamBak/lib/AssertStream.js @@ -0,0 +1,100 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = require("babel-runtime/helpers/inherits"); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _stream = require("stream"); + +var _Expected = require("./Expected"); + +var _Expected2 = _interopRequireDefault(_Expected); + +var _setDefaultValue = require("set-default-value"); + +var _setDefaultValue2 = _interopRequireDefault(_setDefaultValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * this stream is used to be piped into. + * it ends if the expected value was received. + * + * @author Marco Sliwa + */ +var AssertStream = function (_Writable) { + (0, _inherits3.default)(AssertStream, _Writable); + + /** + * constructor for this stream + * + * @constructor + * @param {*} expected value + * @param {object} options configuring the behaviour of AssertSream + */ + function AssertStream(expected, options) { + (0, _classCallCheck3.default)(this, AssertStream); + + var _this = (0, _possibleConstructorReturn3.default)(this, (AssertStream.__proto__ || (0, _getPrototypeOf2.default)(AssertStream)).call(this, { + objectMode: true + })); + + _this.expected = _Expected2.default.of(expected, options); + _this.tapper = (0, _setDefaultValue2.default)(options.tapper).to(function () {}); + return _this; + } + + /** + * implementation of the write function. transforms data, + * so that it can be compared, emits end on match, otherwise + * continues. + * + * @param {string|object} chunk of data + * @param {string} enc of data + * @param {function} cb when operation finished + * @return {*} + */ + + + (0, _createClass3.default)(AssertStream, [{ + key: "_write", + value: function _write(chunk, enc, cb) { + var _this2 = this; + + var data = Buffer.isBuffer(chunk) ? chunk.toString() : chunk; + var result = this.expected.match(data); + + this.tapper(data, result); + + return result === -1 ? this.emit("error", this.expected.getError()) : setTimeout(function () { + return result === 1 ? _this2.emit("done") : cb(); + }, 1); + } + }]); + return AssertStream; +}(_stream.Writable); + +exports.default = AssertStream; + +//# sourceMappingURL=AssertStream.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/Expected.js b/ExpectStreamBak/lib/Expected.js new file mode 100644 index 0000000..0fee218 --- /dev/null +++ b/ExpectStreamBak/lib/Expected.js @@ -0,0 +1,156 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _lodash = require("lodash.isarray"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _lodash3 = require("lodash.isequal"); + +var _lodash4 = _interopRequireDefault(_lodash3); + +var _lodash5 = require("lodash.isfunction"); + +var _lodash6 = _interopRequireDefault(_lodash5); + +var _lodash7 = require("lodash.isnil"); + +var _lodash8 = _interopRequireDefault(_lodash7); + +var _lodash9 = require("lodash.ismatch"); + +var _lodash10 = _interopRequireDefault(_lodash9); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Expected = function () { + (0, _createClass3.default)(Expected, null, [{ + key: "of", + + + /** + * Creates an ExpectationClass, that checks, + * whether an incoming value matches the + * expectations + * + * @param {*} args needed for creation + * @return {Expected} + */ + value: function of() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return new (Function.prototype.bind.apply(Expected, [null].concat(args)))(); + } + + /** + * Constructor of Expected + * + * @constructor + * @param {*} expected compared with input + * @param {object} options for custom matcning behaviour + */ + + }]); + + function Expected(expected, _ref) { + var filter = _ref.filter, + eventually = _ref.eventually, + strict = _ref.strict; + (0, _classCallCheck3.default)(this, Expected); + + this.messages = []; + this.expection = (0, _lodash2.default)(expected) ? expected.slice(0) : expected; + this.expected = expected; + this.matcher = (0, _lodash8.default)(strict) ? _lodash10.default : _lodash4.default; + this.onMisMatch = (0, _lodash8.default)(eventually) ? -1 : 0; + this.filter = (0, _lodash8.default)(filter) ? function () { + return true; + } : filter; + } + + /** + * Checks if next value in list matches the input + * + * @param {*} value to be compared + * @return {Number} + */ + + + (0, _createClass3.default)(Expected, [{ + key: "includes", + value: function includes(value) { + var expected = this.expected.shift(); + var matches = this.matcher(value, expected); + var onMatch = this.expected.length === 0 ? 1 : 0; + + this.expected = matches ? this.expected : [expected].concat(this.expected); + + return matches ? onMatch : this.onMisMatch; + } + + /** + * Compares input with expectations + * + * @param {*} value to be compared + * @return {Number} + */ + + }, { + key: "match", + value: function match(value) { + // eslint-disable-line + this.messages.push(value); + + if (!this.filter(value)) return 0; + if ((0, _lodash6.default)(this.expected)) return this.expected(value); + if ((0, _lodash2.default)(this.expected)) return this.includes(value); + + return this.matcher(value, this.expected) ? 1 : this.onMisMatch; + } + + /** + * produces the error containing the expected vs actual results + * + * @return {Error} + */ + + }, { + key: "getError", + value: function getError() { + if ((0, _lodash6.default)(this.expection)) return new Error("the messages " + (0, _stringify2.default)(this.messages) + " do not match your expectations."); + + try { + (0, _chai.expect)(this.messages).to.eql(this.expection); + + return null; + } catch (e) { + return e; + } + } + }]); + return Expected; +}(); + +exports.default = Expected; + +//# sourceMappingURL=Expected.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/StreamHelper.js b/ExpectStreamBak/lib/StreamHelper.js new file mode 100644 index 0000000..9b6a208 --- /dev/null +++ b/ExpectStreamBak/lib/StreamHelper.js @@ -0,0 +1,98 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require("lodash.isfunction"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _assert = require("assert"); + +var _assert2 = _interopRequireDefault(_assert); + +var _AssertStream = require("./AssertStream"); + +var _AssertStream2 = _interopRequireDefault(_AssertStream); + +var _setDefaultValue = require("set-default-value"); + +var _setDefaultValue2 = _interopRequireDefault(_setDefaultValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * this function adds the new methods to the Assertion + * chain, where they have the following responsibilities: + * + * produce: sets the expected value of the stream + * on: gives a set of input values, if testing + * a transformer + * notify: cb for error and done notifications + * + * @param {object} chai to be extended + */ +var StreamHelper = function StreamHelper(_ref) { + var Assertion = _ref.Assertion; + + Assertion.addChainableMethod("exactly", function (expected) { + this.expected = (0, _setDefaultValue2.default)(expected).to(this.expected); + this.strictEquality = true; + }, function () { + this.strictEquality = true; + }); + + Assertion.addChainableMethod("produce", function (expected) { + this.expected = expected; + this.args = []; + }, function () { + this.args = []; + }); + + Assertion.addProperty("eventually", function () { + this.checkAllResults = true; + }); + + Assertion.addMethod("filter", function (filter) { + this.filterMethod = filter; + }); + + Assertion.addMethod("notify", function (done) { + var _this = this; + + var sink = new _AssertStream2.default(this.expected, { + filter: this.filterMethod, + tapper: this.tapper, + eventually: this.checkAllResults, + strict: this.strictEquality + }); + + this._obj.pipe(sink) // eslint-disable-line + .on("done", done).on("error", done); + + this.args.forEach(function (arg) { + return _this._obj.write(arg); + }); // eslint-disable-line + }); + + Assertion.addMethod("tap", function (tapper) { + this.tapper = tapper; + }); + + Assertion.addMethod("on", function () { + var write = this._obj.write; // eslint-disable-line + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + (0, _assert2.default)(args.length > 0 && (0, _lodash2.default)(write) || args.length === 0 && !(0, _lodash2.default)(write), "You can only use arguments with a writable stream."); + + this.args = args; + }); +}; + +exports.default = StreamHelper; + +//# sourceMappingURL=StreamHelper.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/__tests__/AssertStreamTest.js b/ExpectStreamBak/lib/__tests__/AssertStreamTest.js new file mode 100644 index 0000000..3a569e9 --- /dev/null +++ b/ExpectStreamBak/lib/__tests__/AssertStreamTest.js @@ -0,0 +1,132 @@ +"use strict"; + +var _AssertStream = require("../AssertStream"); + +var _AssertStream2 = _interopRequireDefault(_AssertStream); + +var _sinon = require("sinon"); + +var _sinon2 = _interopRequireDefault(_sinon); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +describe("AssertStreamTest", function () { + it("writes to an assert stream with a value expectation, until it ends with the expected value.", function (done) { + var tapSpy = _sinon2.default.spy(); + var onEnd = _sinon2.default.spy(); + var stream = new _AssertStream2.default({ + test: "test" + }, { + tapper: tapSpy, + eventually: true + }); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function () { + (0, _chai.expect)(onEnd.callCount).to.equal(1); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal("bla"); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal(0); + (0, _chai.expect)(tapSpy.secondCall.args.shift()).to.eql({}); + (0, _chai.expect)(tapSpy.secondCall.args.shift()).to.equal(0); + (0, _chai.expect)(tapSpy.thirdCall.args.shift()).to.eql({ + test: "test" + }); + (0, _chai.expect)(tapSpy.thirdCall.args.shift()).to.equal(1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function (done) { + var onEnd = _sinon2.default.spy(); + var stream = new _AssertStream2.default(function (x) { + return x.test === "test" ? 1 : 0; + }, {}); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function () { + (0, _chai.expect)(onEnd.callCount).to.equal(1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(function (x) { + return x.test === "test" ? 1 : -1; + }, { + tapper: tapSpy + }); + + stream.on("error", function (e) { + (0, _chai.expect)(e.message).to.equal("the messages [\"bla\"] do not match your expectations."); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal("bla"); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal(-1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }); + + stream.write("bla"); + }); + + it("writes to an assert stream, that expects multiple messages", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(["test1", "test2", "test3"], { + tapper: tapSpy + }); + var onEnd = function onEnd() { + (0, _chai.expect)(tapSpy.firstCall.calledWith("test1", 0)); + (0, _chai.expect)(tapSpy.secondCall.calledWith("test2", 0)); + (0, _chai.expect)(tapSpy.thirdCall.calledWith("test3", 1)); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test1"); + stream.write("test2"); + stream.write("test3"); + }); + + it("writes to an assert stream, filtering some messages", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(["test1", "test2"], { + tapper: tapSpy, + filter: function filter(value) { + return value !== "test4"; + } + }); + + var onEnd = function onEnd() { + (0, _chai.expect)(tapSpy.firstCall.calledWith("test4", 0)); + (0, _chai.expect)(tapSpy.secondCall.calledWith("test1", 0)); + (0, _chai.expect)(tapSpy.thirdCall.calledWith("test2", 1)); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test4"); + stream.write("test1"); + stream.write("test2"); + }); +}); + +//# sourceMappingURL=AssertStreamTest.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/__tests__/ExpectStreamTest.js b/ExpectStreamBak/lib/__tests__/ExpectStreamTest.js new file mode 100644 index 0000000..fefa22b --- /dev/null +++ b/ExpectStreamBak/lib/__tests__/ExpectStreamTest.js @@ -0,0 +1,309 @@ +"use strict"; + +var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = require("babel-runtime/helpers/inherits"); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _lodash = require("lodash.isarray"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require("../index"); + +var _stream = require("stream"); + +var _assert = require("assert"); + +var _assert2 = _interopRequireDefault(_assert); + +var _sinon = require("sinon"); + +var _sinon2 = _interopRequireDefault(_sinon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ReadStream = function (_Readable) { + (0, _inherits3.default)(ReadStream, _Readable); + + function ReadStream() { + var messages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "lala"; + (0, _classCallCheck3.default)(this, ReadStream); + + var _this = (0, _possibleConstructorReturn3.default)(this, (ReadStream.__proto__ || (0, _getPrototypeOf2.default)(ReadStream)).call(this, { objectMode: true })); + + _this.messages = messages; + return _this; + } + + (0, _createClass3.default)(ReadStream, [{ + key: "_read", + value: function _read() { + this.push((0, _lodash2.default)(this.messages) ? this.messages.shift() : this.messages); + } + }]); + return ReadStream; +}(_stream.Readable); + +var TransformStream = function (_Transform) { + (0, _inherits3.default)(TransformStream, _Transform); + + function TransformStream() { + (0, _classCallCheck3.default)(this, TransformStream); + return (0, _possibleConstructorReturn3.default)(this, (TransformStream.__proto__ || (0, _getPrototypeOf2.default)(TransformStream)).apply(this, arguments)); + } + + (0, _createClass3.default)(TransformStream, [{ + key: "_transform", + value: function _transform(chunk, enc, cb) { + this.push(chunk); + setTimeout(cb, 20); + } + }]); + return TransformStream; +}(_stream.Transform); + +var ReadObjectStream = function (_Readable2) { + (0, _inherits3.default)(ReadObjectStream, _Readable2); + + function ReadObjectStream() { + (0, _classCallCheck3.default)(this, ReadObjectStream); + return (0, _possibleConstructorReturn3.default)(this, (ReadObjectStream.__proto__ || (0, _getPrototypeOf2.default)(ReadObjectStream)).call(this, { + objectMode: true + })); + } + + (0, _createClass3.default)(ReadObjectStream, [{ + key: "_read", + value: function _read() { + this.push({ + test: { + test: [] + } + }); + } + }]); + return ReadObjectStream; +}(_stream.Readable); + +var TransformObjStream = function (_Transform2) { + (0, _inherits3.default)(TransformObjStream, _Transform2); + + function TransformObjStream() { + (0, _classCallCheck3.default)(this, TransformObjStream); + return (0, _possibleConstructorReturn3.default)(this, (TransformObjStream.__proto__ || (0, _getPrototypeOf2.default)(TransformObjStream)).call(this, { + objectMode: true + })); + } + + (0, _createClass3.default)(TransformObjStream, [{ + key: "_transform", + value: function _transform(obj, enc, cb) { + this.push(obj); + setTimeout(cb, 20); + } + }]); + return TransformObjStream; +}(_stream.Transform); + +describe("ExpectStreamTest", function () { + // eslint-disable-line + it("uses the produce assertion with a readstream, matching exactly", function (done) { + (0, _index.expect)(new ReadStream(["lala1", "lala2", "lala3"])).to.produce(["lala1", "lala2", "lala3"]).notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.exactly.produce({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality - part2", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.produce.exactly({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala", another: "lulu" })).to.produce({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.produce({ test: "lala", another: "lulu" }).notify(function (e) { + return e ? done() : done(new Error("Shouldn't end up here.")); + }); + }); + + it("uses the produce assertion with a readstream, matching exactly and fails", function (done) { + var stream = new ReadStream(["lala1", "lala", "lala3"]); + + (0, _index.expect)(stream).to.produce(["lala1", "lala2", "lala3"]).notify(function (e) { + if (!e) return done(new Error("Should fail")); + + try { + (0, _index.expect)(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch (e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching not exactly", function (done) { + var stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]); + + (0, _index.expect)(stream).to.eventually.produce(["lala1", "lala2", "lala3"]).notify(function (e) { + if (e) return done(e); + + try { + (0, _index.expect)(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch (e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function (done) { + (0, _index.expect)(new ReadStream(["lala1", "lala", "lala2", "lala3"])).filter(function (value) { + return value !== "lala"; + }).to.produce(["lala1", "lala2", "lala3"]).notify(done); + }); + + it("uses the eventually produce assertion with a readstream, producing buffers.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce("lala").notify(done); + }); + + it("uses the produce assertion with a readstream, producing objects.", function (done) { + (0, _index.expect)(new ReadObjectStream()).to.eventually.produce({ + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion on the readstream with buffers.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce("lulu").notify(function () { + return done(new Error("should not finish")); + }); + setTimeout(function () { + return done(); + }, 20); + }); + + it("fails the produce assertion on the readstream with objects.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce({ + test: "test2" + }).notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 20); + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").notify(done); + }); + + it("uses the produce assertion with a transformstream, producing objects.", function (done) { + (0, _index.expect)(new TransformObjStream()).to.eventually.produce({ + test: { + test: [] + } + }).on("lala", "test", "huhu", { + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test").notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 70); + }); + + it("fails the produce assertion with a transformstream, producing objects.", function (done) { + (0, _index.expect)(new TransformObjStream()).to.eventually.produce({ + test: { + test: [] + } + }).on("lala", "test", { + test: { + test: 1 + } + }).notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 70); + }); + + it("tries to test a readstream with input", function (done) { + try { + (0, _index.expect)(new ReadStream()).to.eventually.produce("test").on("bla").notify(done); + } catch (e) { + _assert2.default.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("tries to test a transformstream without input", function (done) { + try { + (0, _index.expect)(new TransformStream()).to.eventually.produce("test").on().notify(done); + } catch (e) { + _assert2.default.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.produce(function (x) { + return x === "huhu" ? 1 : -1; + }).on("lala", "test", "huhu").notify(function (e) { + return e instanceof Error ? done() : done(new Error("should throw")); + }); + }); + + it("taps a stream under test.", function (done) { + var spy = _sinon2.default.spy(); + + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").tap(spy).notify(function () { + try { + (0, _index.expect)(spy.callCount).to.equal(3); + (0, _index.expect)(spy.firstCall.args.shift()).to.equal("lala"); + (0, _index.expect)(spy.firstCall.args.shift()).to.equal(0); + (0, _index.expect)(spy.secondCall.args.shift()).to.equal("test"); + (0, _index.expect)(spy.secondCall.args.shift()).to.equal(0); + (0, _index.expect)(spy.thirdCall.args.shift()).to.equal("huhu"); + (0, _index.expect)(spy.thirdCall.args.shift()).to.equal(1); + done(); + } catch (e) { + done(e); + } + }); + }); +}); + +//# sourceMappingURL=ExpectStreamTest.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/__tests__/ExpectedTest.js b/ExpectStreamBak/lib/__tests__/ExpectedTest.js new file mode 100644 index 0000000..2740f0d --- /dev/null +++ b/ExpectStreamBak/lib/__tests__/ExpectedTest.js @@ -0,0 +1,86 @@ +"use strict"; + +var _Expected = require("../Expected"); + +var _Expected2 = _interopRequireDefault(_Expected); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +describe("Expected", function () { + it("compares a single value with the expected one", function () { + var expected = _Expected2.default.of("Test", {}); + + (0, _chai.expect)(expected.match("Test")).to.equal(1); + (0, _chai.expect)(expected.match("NotTest")).to.equal(-1); + }); + + it("compares a single value with the expected one, skipping all not matching ones", function () { + var expected = _Expected2.default.of("Test", { + eventually: true + }); + + (0, _chai.expect)(expected.match("Test")).to.equal(1); + (0, _chai.expect)(expected.match("NotTest")).to.equal(0); + }); + + it("compares a list of values with another list of values", function () { + var expected = _Expected2.default.of(["Test1", "Test2", "Test3"], {}); + + (0, _chai.expect)(expected.match("Test1")).to.equal(0); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); + + it("compares a list of values with another list, skipping all non-matches", function () { + var expected = _Expected2.default.of(["Test3", "Test4", "Test5"], { + eventually: true + }); + + (0, _chai.expect)(expected.match("Test3")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test5")).to.equal(1); + }); + + it("compares a list of values with a filter", function () { + var expected = _Expected2.default.of(["Test3", "Test4", "Test5"], { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test3")).to.equal(0); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test5")).to.equal(1); + }); + + it("compares a single of values with a filter", function () { + var expected = _Expected2.default.of("Test3", { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); + + it("compares with a function", function () { + var expected = _Expected2.default.of(function (value) { + return value === "Test3" ? 1 : -1; + }, { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test1")).to.equal(-1); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); +}); + +//# sourceMappingURL=ExpectedTest.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/examples/test.js b/ExpectStreamBak/lib/examples/test.js new file mode 100644 index 0000000..647fe1f --- /dev/null +++ b/ExpectStreamBak/lib/examples/test.js @@ -0,0 +1,3 @@ +"use strict"; + +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/ExpectStreamBak/lib/index.js b/ExpectStreamBak/lib/index.js new file mode 100644 index 0000000..61a3553 --- /dev/null +++ b/ExpectStreamBak/lib/index.js @@ -0,0 +1,15 @@ +"use strict"; + +var _StreamHelper = require("./StreamHelper"); + +var _StreamHelper2 = _interopRequireDefault(_StreamHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chai = require("chai"); + +chai.use(_StreamHelper2.default); + +module.exports = chai; + +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1 @@ + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b516189 --- /dev/null +++ b/Makefile @@ -0,0 +1,139 @@ +.PHONY: test, build, setup, docs, install, clean + +## +# use bash as shell +# +SHELL:=/bin/bash + +## +# root directory (Makefile location) +# +WORKING_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +## +# default value for installdir (= working dir) +# +ifeq ($(INSTALLDIR),) +INSTALLDIR=$(WORKING_DIR) +endif + +## +# find all relevant sources (sources that end with .js) +# and get their path relative to working dir +# +SOURCES_RELATIVE:= \ + $(shell cd $(WORKING_DIR) && find src -type f -iname '*.js') + +## +# save the relative sources to a new variable that holds al SOURCES +# with absolute paths +# +SOURCES:= \ + $(foreach x, $(SOURCES_RELATIVE), $(WORKING_DIR)/$(x)) + +## +# these are our "object"-files - the files that are transpiled from +# es6 to es5 +# +OBJECTS:= \ + $(foreach x, $(SOURCES_RELATIVE), $(WORKING_DIR)/build/$(x)) + +## +# these are our "object"-files - the files that are transpiled from +# es6 to es5 +# +INSTALLED_OBJECTS:= \ + $(foreach x, $(shell cd $(WORKING_DIR)/src && find . -type f -iname '*.js'), $(INSTALLDIR)/lib/$(x)) \ + +## +# These are our example files - they will be moved to a separate +# examples dir in root folder +# +EXAMPLES:= \ + $(foreach x, $(shell cd $(WORKING_DIR)/src && find examples -type f -iname '*.js'), $(INSTALLDIR)/$(basename $(x))) + +all: install + +setup: $(WORKING_DIR)/setupfile + +build: $(OBJECTS) + @+make -s $(WORKING_DIR)/build/src/lib + +test: build + $(WORKING_DIR)/node_modules/.bin/istanbul cover --root $(WORKING_DIR)/build/src -x "**/__tests__/**" $(WORKING_DIR)/node_modules/.bin/_mocha $(shell find $(WORKING_DIR)/build/src -name "*Test.js") -- -R spec --require source-map-support/register + $(WORKING_DIR)/node_modules/.bin/remap-istanbul -i $(WORKING_DIR)/coverage/coverage.json -o $(WORKING_DIR)/coverage/lcov-report -t html + +docs: build + $(WORKING_DIR)/node_modules/.bin/esdoc -c esdoc.json + +install: docs test + @+make -s $(INSTALLED_OBJECTS) + @+make -s $(EXAMPLES) + $(info Copied $(INSTALLED_OBJECTS) to $(INSTALLDIR)) + +clean: + rm -rf $(WORKING_DIR)/build + rm -rf $(WORKING_DIR)/docs + rm -rf $(WORKING_DIR)/lib + rm -rf $(WORKING_DIR)/coverage + rm -rf $(WORKING_DIR)/setupfile + +## +# file to save setup status +# +$(WORKING_DIR)/setupfile: + @echo "setup done" > $(WORKING_DIR)/setupfile + +## +# this targets are necessary to not always trigger a rebuild of +# transpiled files, even if they exist. if the no-op is removed +# this will trigger a rebuild too +# +$(WORKING_DIR)/src/%.js: + @echo "" > /dev/null + +## +# target to create build/src. Used as precondition +# for linking a ne dir lib recursively to src +# +$(WORKING_DIR)/build/src: + mkdir -p $@ + +## +# links a directory "lib" located in build/src to src. +# Used to be able to test binaries, because they use +# the lib after compiling has finished +# +$(WORKING_DIR)/build/src/lib: $(WORKING_DIR)/build/src + ln -s $< $@ + +## +# every transpiled file requires a matching source file +# to be created. +# +$(WORKING_DIR)/build/src/%.js: $(WORKING_DIR)/src/%.js $(WORKING_DIR)/setupfile + mkdir -p $(dir $@) + $(WORKING_DIR)/node_modules/.bin/eslint $< + $(WORKING_DIR)/node_modules/.bin/babel $< --out-file $@ --source-maps --presets stage-0,es2015 --plugins transform-decorators-legacy,transform-runtime,transform-class-properties + +## +# every destination file needs a transpiled +# source that is tested +# +$(INSTALLDIR)/lib/%.js: $(WORKING_DIR)/build/src/%.js + mkdir -p $(dir $@) + cp $< $@ + +$(WORKING_DIR)/build/src/%.png: $(WORKING_DIR)/src/%.png + mkdir -p $(dir $@) + cp $< $@ + +## +# every destination file needs a transpiled +# source that is tested +# +$(INSTALLDIR)/examples/%: $(WORKING_DIR)/build/src/examples/%.js + mkdir -p $(dir $@) + echo "#!/usr/bin/env node" > $@ + cat $< >> $@ + chmod +x $@ diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..9c96bf6 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +**Fixes** +# + +#### Proposed Changes +* +* +* +* diff --git a/README.md b/README.md new file mode 100644 index 0000000..79046fe --- /dev/null +++ b/README.md @@ -0,0 +1,169 @@ +# ExpectStream + +Testing streams sucks. So we built this extension to chai to reduce the suck-factor of testing node streams. +Now, let's forget about all the drama and call it a victory: + +![victory](http://www.quotesmeme.com/wp-content/uploads/2015/06/f60752b4481e83013217fa3d82f616bd.jpg "victory") + +# API + +As this module extends [chai](http://chaijs.com) most of the documentation can be found at their website. ExpectStream extends it with new methods for asserting streams asynchronously: + +##### .produce +This method takes either one or multiple values, which are expected to be the only outputs produced by the stream under test or a function that takes the value and checks if it is the expected one. In the latter case, there are three values your callback should return to signal its state: + +* If the function returns `0`, the input value is not the expected value, but does not represent an error case either. The test will go on (or timeout). + +* If the function returns `1`, it's the signal that the correct value has finally arrived. The assertion will notify the test, that it is successful. + +* If the function returns `-1`, it signals that the given input value is erroneous. We will be notified of the error via `notify`. + +##### .eventually +This property allows ExpectStream to ignore mismatches until the correct values are produced. + +#### .exactly +Using this chainable method will adjust the assertion configuration to strict equality. Otherwise ```ExpectStream``` validates, if the produced output contains the expected value. + +##### .filter +This method accepts a function, that can be used to ignore some outputs, which is signalled by returning ```false``` in this callback. + +##### .on +This method takes the values the stream under test should use to produce its output, if it isn't only a readable stream. + +##### .notify +This method is used to notify the testrunner if an error occurs or if the streams ended and have produced the expected message + +##### .tap +With this method you can tap into the stream under test and inspect whats going on, if an error happens + +# Usage + +Suppose we have a transform stream, that adds a Mr. to the start of every value, that enters it: + +```js +// src/Misterizer +import { Transform } from "stream"; + +export default class Misterizer extends Transform { + _transform(name, enc, cb) { + this.push(`Mr. ${name}`); + cb(); + } +} +``` + +Now we'd like to test it, using mocha with ExpectStream: + +```js +// src/__tests__/MisterizerTest +import { expect } from "core-assert"; +import Misterizer from "../Misterizer" + +describe("MisterizerTest", function() { + // this test passes + it("Misterizes Circle", function(done) { + expect(new Misterizer()) + .to.exactly.produce("Mr. Circle") + .on("Circle") + .notify(done); + }); + + // this test will trigger a timeout + it("Misterizes Square", function(done) { + expect(new Misterizer()) + .to.eventually.produce("Mr. Circle") + .on("Square") + .tap(::console.log) // will print "Square, 0)" + .notify(done); + }); +}); +``` +But the mighty power of ```ExpectStream``` offers much more functionality, which will be presented by FunnyBot: +```js +// src/FunnyBot +import { Readable } from "stream"; + +export default class FunnyBot extends Readable { + constructor(jokes) { + super({ objectMode: true }); + + this.jokes = jokes; + } + + _read() { + return this.push(this.jokes.shift()); + } +} +``` +All that is missing now are some funny jokes: +```js +// src/__tests__/FunnyBotTest +import { expect } from "@circle/core-assert"; +import FunnyBot from "../FunnyBot"; + +describe("FunnyBot", function() { + it("tells multiple really funny jokes", function() { + expect(new FunnyBot([{ + date: Date.now(), + joke: "Hello, I am FunnyBot!" + }, { + date: Date.now(), + joke: "I am not a joke" + }, { + date: Date.now(), + joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts" + }]).filter(x => x.joke !== "I am not a joke").to.produce([{ + joke: "Hello, I am FunnyBot!" + }, { + joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts" + }]).notify(done); + }); + + it("thinks about complex problems", function() { + expect(new FunnyBot([{ + date: Date.now(), + joke: "Hello, I am FunnyBot!" + }, { + date: Date.now(), + joke: "I am not a joke" + }, { + date: Date.now(), + joke: "The line is an imaginary invention of imperfect biological life forms." + }]).to.eventually.produce([{ + joke: "Hello, I am FunnyBot!" + }, { + joke: "The line is an imaginary invention of imperfect biological life forms." + }]).notify(done); + }); + + it("writes up some new material", function() { + expect(new FunnyBot([{ + firstTry: "Error. Error. Banal." + }, { + secondTry: "That has been done before." + }, { + lastTry: "Funnybot is now finished with final joke." + }]).to.produce.exactly([{ + firstTry: "Error. Error. Banal." + }, { + secondTry: "That has been done before." + }, { + lastTry: "Funnybot is now finished with final joke." + }]).notify(done); + }); +}); +``` +# Testing + +ExpectStream is tested with mocha by executing ```make test``` in the root directory of the project. + +# Contributing + +If you want to contribute to this repository, please ensure ... + - to use ```make``` for development (it validates the source code and transpiles it to ```/lib```). + - to follow the existing coding style. + - to use the linting tools that are listed in the ```package.json``` (which you get for free when using ```make```). + - to add and/or customize unit tests for any changed code. + - to reference the corresponding issue in your pull request with a small description of your changes. + +All contributors are listed in the ```AUTHORS``` file, sorted by the time of their first contribution. diff --git a/docs/ast/source/AssertStream.js.json b/docs/ast/source/AssertStream.js.json new file mode 100644 index 0000000..a4782be --- /dev/null +++ b/docs/ast/source/AssertStream.js.json @@ -0,0 +1,2233 @@ +{ + "type": "Program", + "start": 0, + "end": 1405, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 48, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "Writable" + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "Writable" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": "stream", + "rawValue": "stream", + "raw": "\"stream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 35, + "end": 69, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 42, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 42, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "Expected" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 56, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 33 + } + }, + "value": "./Expected", + "rawValue": "./Expected", + "raw": "\"./Expected\"" + } + }, + { + "type": "ImportDeclaration", + "start": 70, + "end": 111, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 77, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 77, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "defaults" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 91, + "end": 110, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 40 + } + }, + "value": "set-default-value", + "rawValue": "set-default-value", + "raw": "\"set-default-value\"" + }, + "trailingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ] + }, + { + "type": "ExportDefaultDeclaration", + "start": 253, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "declaration": { + "type": "ClassDeclaration", + "start": 268, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 274, + "end": 286, + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "name": "AssertStream", + "leadingComments": null + }, + "superClass": { + "type": "Identifier", + "start": 295, + "end": 303, + "loc": { + "start": { + "line": 11, + "column": 42 + }, + "end": { + "line": 11, + "column": 50 + } + }, + "name": "Writable" + }, + "body": { + "type": "ClassBody", + "start": 304, + "end": 1404, + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 47, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 512, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 512, + "end": 523, + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 15 + } + }, + "name": "constructor", + "leadingComments": null + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 523, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 524, + "end": 532, + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 24 + } + }, + "name": "expected" + }, + { + "type": "Identifier", + "start": 534, + "end": 541, + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 33 + } + }, + "name": "options" + } + ], + "body": { + "type": "BlockStatement", + "start": 543, + "end": 727, + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 601, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 23, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 600, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 23, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 553, + "end": 558, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 559, + "end": 599, + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 23, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 573, + "end": 589, + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 573, + "end": 583, + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 585, + "end": 589, + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 611, + "end": 658, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 55 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 611, + "end": 657, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 54 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 611, + "end": 624, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 611, + "end": 615, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 616, + "end": 624, + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 627, + "end": 657, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 627, + "end": 638, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 636, + "end": 638, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 639, + "end": 647, + "loc": { + "start": { + "line": 25, + "column": 36 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "name": "expected" + }, + { + "type": "Identifier", + "start": 649, + "end": 656, + "loc": { + "start": { + "line": 25, + "column": 46 + }, + "end": { + "line": 25, + "column": 53 + } + }, + "name": "options" + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 667, + "end": 721, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 62 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 667, + "end": 720, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 61 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 667, + "end": 678, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 667, + "end": 671, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 672, + "end": 678, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 683, + "end": 720, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 683, + "end": 710, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 683, + "end": 707, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 683, + "end": 691, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 692, + "end": 706, + "loc": { + "start": { + "line": 26, + "column": 33 + }, + "end": { + "line": 26, + "column": 47 + } + }, + "object": { + "type": "Identifier", + "start": 692, + "end": 699, + "loc": { + "start": { + "line": 26, + "column": 33 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "name": "options" + }, + "property": { + "type": "Identifier", + "start": 700, + "end": 706, + "loc": { + "start": { + "line": 26, + "column": 41 + }, + "end": { + "line": 26, + "column": 47 + } + }, + "name": "tapper" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 708, + "end": 710, + "loc": { + "start": { + "line": 26, + "column": 49 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 711, + "end": 719, + "loc": { + "start": { + "line": 26, + "column": 52 + }, + "end": { + "line": 26, + "column": 60 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 717, + "end": 719, + "loc": { + "start": { + "line": 26, + "column": 58 + }, + "end": { + "line": 26, + "column": 60 + } + }, + "body": [] + } + } + ] + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * constructor for this stream\n *\n * @constructor\n * @param {*} expected value\n * @param {object} options configuring the behaviour of AssertSream\n ", + "start": 311, + "end": 507, + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 7 + } + }, + "range": [ + 311, + 507 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n ", + "start": 733, + "end": 1066, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "range": [ + 733, + 1066 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1071, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1071, + "end": 1077, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 10 + } + }, + "name": "_write", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1077, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 10 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1078, + "end": 1083, + "loc": { + "start": { + "line": 39, + "column": 11 + }, + "end": { + "line": 39, + "column": 16 + } + }, + "name": "chunk" + }, + { + "type": "Identifier", + "start": 1085, + "end": 1088, + "loc": { + "start": { + "line": 39, + "column": 18 + }, + "end": { + "line": 39, + "column": 21 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 1090, + "end": 1092, + "loc": { + "start": { + "line": 39, + "column": 23 + }, + "end": { + "line": 39, + "column": 25 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 1094, + "end": 1402, + "loc": { + "start": { + "line": 39, + "column": 27 + }, + "end": { + "line": 46, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1104, + "end": 1169, + "loc": { + "start": { + "line": 40, + "column": 8 + }, + "end": { + "line": 40, + "column": 73 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1110, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "id": { + "type": "Identifier", + "start": 1110, + "end": 1114, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 18 + } + }, + "name": "data" + }, + "init": { + "type": "ConditionalExpression", + "start": 1119, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "test": { + "type": "CallExpression", + "start": 1119, + "end": 1141, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 45 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1119, + "end": 1134, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 1119, + "end": 1125, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 29 + } + }, + "name": "Buffer" + }, + "property": { + "type": "Identifier", + "start": 1126, + "end": 1134, + "loc": { + "start": { + "line": 40, + "column": 30 + }, + "end": { + "line": 40, + "column": 38 + } + }, + "name": "isBuffer" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1135, + "end": 1140, + "loc": { + "start": { + "line": 40, + "column": 39 + }, + "end": { + "line": 40, + "column": 44 + } + }, + "name": "chunk" + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 1144, + "end": 1160, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 64 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1144, + "end": 1158, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 62 + } + }, + "object": { + "type": "Identifier", + "start": 1144, + "end": 1149, + "loc": { + "start": { + "line": 40, + "column": 48 + }, + "end": { + "line": 40, + "column": 53 + } + }, + "name": "chunk" + }, + "property": { + "type": "Identifier", + "start": 1150, + "end": 1158, + "loc": { + "start": { + "line": 40, + "column": 54 + }, + "end": { + "line": 40, + "column": 62 + } + }, + "name": "toString" + }, + "computed": false + }, + "arguments": [] + }, + "alternate": { + "type": "Identifier", + "start": 1163, + "end": 1168, + "loc": { + "start": { + "line": 40, + "column": 67 + }, + "end": { + "line": 40, + "column": 72 + } + }, + "name": "chunk" + } + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1178, + "end": 1219, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 49 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1184, + "end": 1218, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 1184, + "end": 1190, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "result" + }, + "init": { + "type": "CallExpression", + "start": 1193, + "end": 1218, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1193, + "end": 1212, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 42 + } + }, + "object": { + "type": "MemberExpression", + "start": 1193, + "end": 1206, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "object": { + "type": "ThisExpression", + "start": 1193, + "end": 1197, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 27 + } + } + }, + "property": { + "type": "Identifier", + "start": 1198, + "end": 1206, + "loc": { + "start": { + "line": 41, + "column": 28 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1207, + "end": 1212, + "loc": { + "start": { + "line": 41, + "column": 37 + }, + "end": { + "line": 41, + "column": 42 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1213, + "end": 1217, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 47 + } + }, + "name": "data" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1229, + "end": 1255, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 34 + } + }, + "expression": { + "type": "CallExpression", + "start": 1229, + "end": 1254, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1229, + "end": 1240, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1229, + "end": 1233, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1234, + "end": 1240, + "loc": { + "start": { + "line": 43, + "column": 13 + }, + "end": { + "line": 43, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1241, + "end": 1245, + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 24 + } + }, + "name": "data" + }, + { + "type": "Identifier", + "start": 1247, + "end": 1253, + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 43, + "column": 32 + } + }, + "name": "result" + } + ] + } + }, + { + "type": "ReturnStatement", + "start": 1265, + "end": 1396, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 139 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 1272, + "end": 1395, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 138 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1272, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "left": { + "type": "Identifier", + "start": 1272, + "end": 1278, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 21 + } + }, + "name": "result" + }, + "operator": "===", + "right": { + "type": "UnaryExpression", + "start": 1283, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 26 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 1284, + "end": 1285, + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + }, + "consequent": { + "type": "CallExpression", + "start": 1288, + "end": 1332, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 75 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1288, + "end": 1297, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 40 + } + }, + "object": { + "type": "ThisExpression", + "start": 1288, + "end": 1292, + "loc": { + "start": { + "line": 45, + "column": 31 + }, + "end": { + "line": 45, + "column": 35 + } + } + }, + "property": { + "type": "Identifier", + "start": 1293, + "end": 1297, + "loc": { + "start": { + "line": 45, + "column": 36 + }, + "end": { + "line": 45, + "column": 40 + } + }, + "name": "emit" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1298, + "end": 1305, + "loc": { + "start": { + "line": 45, + "column": 41 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "CallExpression", + "start": 1307, + "end": 1331, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 74 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1307, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 72 + } + }, + "object": { + "type": "MemberExpression", + "start": 1307, + "end": 1320, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 63 + } + }, + "object": { + "type": "ThisExpression", + "start": 1307, + "end": 1311, + "loc": { + "start": { + "line": 45, + "column": 50 + }, + "end": { + "line": 45, + "column": 54 + } + } + }, + "property": { + "type": "Identifier", + "start": 1312, + "end": 1320, + "loc": { + "start": { + "line": 45, + "column": 55 + }, + "end": { + "line": 45, + "column": 63 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1321, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 64 + }, + "end": { + "line": 45, + "column": 72 + } + }, + "name": "getError" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "alternate": { + "type": "CallExpression", + "start": 1335, + "end": 1395, + "loc": { + "start": { + "line": 45, + "column": 78 + }, + "end": { + "line": 45, + "column": 138 + } + }, + "callee": { + "type": "Identifier", + "start": 1335, + "end": 1345, + "loc": { + "start": { + "line": 45, + "column": 78 + }, + "end": { + "line": 45, + "column": 88 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1346, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 89 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "ConditionalExpression", + "start": 1352, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1352, + "end": 1364, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 107 + } + }, + "left": { + "type": "Identifier", + "start": 1352, + "end": 1358, + "loc": { + "start": { + "line": 45, + "column": 95 + }, + "end": { + "line": 45, + "column": 101 + } + }, + "name": "result" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1363, + "end": 1364, + "loc": { + "start": { + "line": 45, + "column": 106 + }, + "end": { + "line": 45, + "column": 107 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + }, + "consequent": { + "type": "CallExpression", + "start": 1367, + "end": 1384, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 127 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1367, + "end": 1376, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 119 + } + }, + "object": { + "type": "ThisExpression", + "start": 1367, + "end": 1371, + "loc": { + "start": { + "line": 45, + "column": 110 + }, + "end": { + "line": 45, + "column": 114 + } + } + }, + "property": { + "type": "Identifier", + "start": 1372, + "end": 1376, + "loc": { + "start": { + "line": 45, + "column": 115 + }, + "end": { + "line": 45, + "column": 119 + } + }, + "name": "emit" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1377, + "end": 1383, + "loc": { + "start": { + "line": 45, + "column": 120 + }, + "end": { + "line": 45, + "column": 126 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + } + ] + }, + "alternate": { + "type": "CallExpression", + "start": 1387, + "end": 1391, + "loc": { + "start": { + "line": 45, + "column": 130 + }, + "end": { + "line": 45, + "column": 134 + } + }, + "callee": { + "type": "Identifier", + "start": 1387, + "end": 1389, + "loc": { + "start": { + "line": 45, + "column": 130 + }, + "end": { + "line": 45, + "column": 132 + } + }, + "name": "cb" + }, + "arguments": [] + } + } + }, + { + "type": "Literal", + "start": 1393, + "end": 1394, + "loc": { + "start": { + "line": 45, + "column": 136 + }, + "end": { + "line": 45, + "column": 137 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + } + ] + } + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n ", + "start": 733, + "end": 1066, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "range": [ + 733, + 1066 + ] + } + ] + } + ] + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n ", + "start": 113, + "end": 252, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + }, + "range": [ + 113, + 252 + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/Expected.js.json b/docs/ast/source/Expected.js.json new file mode 100644 index 0000000..a5270eb --- /dev/null +++ b/docs/ast/source/Expected.js.json @@ -0,0 +1,4876 @@ +{ + "type": "Program", + "start": 0, + "end": 2512, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 87, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "isArray" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 20, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": "lodash.isarray", + "rawValue": "lodash.isarray", + "raw": "\"lodash.isarray\"" + } + }, + { + "type": "ImportDeclaration", + "start": 38, + "end": 75, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 45, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 45, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "name": "isEqual" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 58, + "end": 74, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 36 + } + }, + "value": "lodash.isequal", + "rawValue": "lodash.isequal", + "raw": "\"lodash.isequal\"" + } + }, + { + "type": "ImportDeclaration", + "start": 76, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 83, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "local": { + "type": "Identifier", + "start": 83, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "isFunction" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 99, + "end": 118, + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 42 + } + }, + "value": "lodash.isfunction", + "rawValue": "lodash.isfunction", + "raw": "\"lodash.isfunction\"" + } + }, + { + "type": "ImportDeclaration", + "start": 120, + "end": 153, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 127, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 127, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "name": "isNil" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 138, + "end": 152, + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 32 + } + }, + "value": "lodash.isnil", + "rawValue": "lodash.isnil", + "raw": "\"lodash.isnil\"" + } + }, + { + "type": "ImportDeclaration", + "start": 154, + "end": 191, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "name": "isMatch" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 174, + "end": 190, + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 36 + } + }, + "value": "lodash.ismatch", + "rawValue": "lodash.ismatch", + "raw": "\"lodash.ismatch\"" + } + }, + { + "type": "ImportDeclaration", + "start": 192, + "end": 222, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 201, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 215, + "end": 221, + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExportDefaultDeclaration", + "start": 224, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "declaration": { + "type": "ClassDeclaration", + "start": 239, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 245, + "end": 253, + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "name": "Expected" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 254, + "end": 2511, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 86, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 475, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 482, + "end": 484, + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "of" + }, + "static": true, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 484, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 485, + "end": 492, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 21 + } + }, + "argument": { + "type": "Identifier", + "start": 488, + "end": 492, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 494, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 504, + "end": 533, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 37 + } + }, + "argument": { + "type": "NewExpression", + "start": 511, + "end": 532, + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 515, + "end": 523, + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 27 + } + }, + "name": "Expected" + }, + "arguments": [ + { + "type": "SpreadElement", + "start": 524, + "end": 531, + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 35 + } + }, + "argument": { + "type": "Identifier", + "start": 527, + "end": 531, + "loc": { + "start": { + "line": 19, + "column": 31 + }, + "end": { + "line": 19, + "column": 35 + } + }, + "name": "args" + } + } + ] + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Creates an ExpectationClass, that checks,\n * whether an incoming value matches the\n * expectations\n *\n * @param {*} args needed for creation\n * @return {Expected}\n ", + "start": 261, + "end": 470, + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 17, + "column": 7 + } + }, + "range": [ + 261, + 470 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n ", + "start": 545, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 28, + "column": 7 + } + }, + "range": [ + 545, + 744 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 749, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 749, + "end": 760, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 15 + } + }, + "name": "constructor", + "leadingComments": null + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 760, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 761, + "end": 769, + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 24 + } + }, + "name": "expected" + }, + { + "type": "ObjectPattern", + "start": 771, + "end": 801, + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 56 + } + }, + "properties": [ + { + "type": "Property", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "name": "filter" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 773, + "end": 779, + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 34 + } + }, + "name": "filter" + } + }, + { + "type": "Property", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "name": "eventually" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 781, + "end": 791, + "loc": { + "start": { + "line": 29, + "column": 36 + }, + "end": { + "line": 29, + "column": 46 + } + }, + "name": "eventually" + } + }, + { + "type": "Property", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "name": "strict" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 793, + "end": 799, + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 54 + } + }, + "name": "strict" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 803, + "end": 1130, + "loc": { + "start": { + "line": 29, + "column": 58 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 813, + "end": 834, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 813, + "end": 833, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 813, + "end": 826, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 813, + "end": 817, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 818, + "end": 826, + "loc": { + "start": { + "line": 30, + "column": 13 + }, + "end": { + "line": 30, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 831, + "end": 833, + "loc": { + "start": { + "line": 30, + "column": 26 + }, + "end": { + "line": 30, + "column": 28 + } + }, + "elements": [] + } + } + }, + { + "type": "ExpressionStatement", + "start": 843, + "end": 910, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 75 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 843, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 843, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "object": { + "type": "ThisExpression", + "start": 843, + "end": 847, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 848, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "expection" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 861, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "test": { + "type": "CallExpression", + "start": 861, + "end": 878, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 43 + } + }, + "callee": { + "type": "Identifier", + "start": 861, + "end": 868, + "loc": { + "start": { + "line": 31, + "column": 26 + }, + "end": { + "line": 31, + "column": 33 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "Identifier", + "start": 869, + "end": 877, + "loc": { + "start": { + "line": 31, + "column": 34 + }, + "end": { + "line": 31, + "column": 42 + } + }, + "name": "expected" + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 881, + "end": 898, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 881, + "end": 895, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 60 + } + }, + "object": { + "type": "Identifier", + "start": 881, + "end": 889, + "loc": { + "start": { + "line": 31, + "column": 46 + }, + "end": { + "line": 31, + "column": 54 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 890, + "end": 895, + "loc": { + "start": { + "line": 31, + "column": 55 + }, + "end": { + "line": 31, + "column": 60 + } + }, + "name": "slice" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 896, + "end": 897, + "loc": { + "start": { + "line": 31, + "column": 61 + }, + "end": { + "line": 31, + "column": 62 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + }, + "alternate": { + "type": "Identifier", + "start": 901, + "end": 909, + "loc": { + "start": { + "line": 31, + "column": 66 + }, + "end": { + "line": 31, + "column": 74 + } + }, + "name": "expected" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 919, + "end": 946, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 919, + "end": 945, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 919, + "end": 932, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 919, + "end": 923, + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 924, + "end": 932, + "loc": { + "start": { + "line": 32, + "column": 13 + }, + "end": { + "line": 32, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 937, + "end": 945, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 34 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 955, + "end": 1007, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 60 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 955, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 955, + "end": 967, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 20 + } + }, + "object": { + "type": "ThisExpression", + "start": 955, + "end": 959, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 960, + "end": 967, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 20 + } + }, + "name": "matcher" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 973, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "test": { + "type": "CallExpression", + "start": 973, + "end": 986, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 973, + "end": 978, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 979, + "end": 985, + "loc": { + "start": { + "line": 33, + "column": 32 + }, + "end": { + "line": 33, + "column": 38 + } + }, + "name": "strict" + } + ] + }, + "consequent": { + "type": "Identifier", + "start": 989, + "end": 996, + "loc": { + "start": { + "line": 33, + "column": 42 + }, + "end": { + "line": 33, + "column": 49 + } + }, + "name": "isMatch" + }, + "alternate": { + "type": "Identifier", + "start": 999, + "end": 1006, + "loc": { + "start": { + "line": 33, + "column": 52 + }, + "end": { + "line": 33, + "column": 59 + } + }, + "name": "isEqual" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 1016, + "end": 1061, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 53 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1016, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1016, + "end": 1031, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "object": { + "type": "ThisExpression", + "start": 1016, + "end": 1020, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1021, + "end": 1031, + "loc": { + "start": { + "line": 34, + "column": 13 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "name": "onMisMatch" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1034, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "test": { + "type": "CallExpression", + "start": 1034, + "end": 1051, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 43 + } + }, + "callee": { + "type": "Identifier", + "start": 1034, + "end": 1039, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1040, + "end": 1050, + "loc": { + "start": { + "line": 34, + "column": 32 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "name": "eventually" + } + ] + }, + "consequent": { + "type": "UnaryExpression", + "start": 1054, + "end": 1056, + "loc": { + "start": { + "line": 34, + "column": 46 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 1055, + "end": 1056, + "loc": { + "start": { + "line": 34, + "column": 47 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + }, + "alternate": { + "type": "Literal", + "start": 1059, + "end": 1060, + "loc": { + "start": { + "line": 34, + "column": 51 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 1070, + "end": 1124, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 62 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1070, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1070, + "end": 1081, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1070, + "end": 1074, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1075, + "end": 1081, + "loc": { + "start": { + "line": 35, + "column": 13 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "name": "filter" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1088, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "test": { + "type": "CallExpression", + "start": 1088, + "end": 1101, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1088, + "end": 1093, + "loc": { + "start": { + "line": 35, + "column": 26 + }, + "end": { + "line": 35, + "column": 31 + } + }, + "name": "isNil" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1094, + "end": 1100, + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 38 + } + }, + "name": "filter" + } + ] + }, + "consequent": { + "type": "ArrowFunctionExpression", + "start": 1104, + "end": 1114, + "loc": { + "start": { + "line": 35, + "column": 42 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "Literal", + "start": 1110, + "end": 1114, + "loc": { + "start": { + "line": 35, + "column": 48 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + }, + "alternate": { + "type": "Identifier", + "start": 1117, + "end": 1123, + "loc": { + "start": { + "line": 35, + "column": 55 + }, + "end": { + "line": 35, + "column": 61 + } + }, + "name": "filter" + } + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n ", + "start": 545, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 28, + "column": 7 + } + }, + "range": [ + 545, + 744 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1136, + "end": 1277, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 43, + "column": 7 + } + }, + "range": [ + 1136, + 1277 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1282, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1282, + "end": 1290, + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 44, + "column": 12 + } + }, + "name": "includes", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1290, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1291, + "end": 1296, + "loc": { + "start": { + "line": 44, + "column": 13 + }, + "end": { + "line": 44, + "column": 18 + } + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 1298, + "end": 1608, + "loc": { + "start": { + "line": 44, + "column": 20 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1308, + "end": 1347, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1314, + "end": 1346, + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 46 + } + }, + "id": { + "type": "Identifier", + "start": 1314, + "end": 1322, + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1325, + "end": 1346, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 46 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1325, + "end": 1344, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 1325, + "end": 1338, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "object": { + "type": "ThisExpression", + "start": 1325, + "end": 1329, + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1330, + "end": 1338, + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1339, + "end": 1344, + "loc": { + "start": { + "line": 45, + "column": 39 + }, + "end": { + "line": 45, + "column": 44 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1356, + "end": 1403, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 55 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1362, + "end": 1402, + "loc": { + "start": { + "line": 46, + "column": 14 + }, + "end": { + "line": 46, + "column": 54 + } + }, + "id": { + "type": "Identifier", + "start": 1362, + "end": 1369, + "loc": { + "start": { + "line": 46, + "column": 14 + }, + "end": { + "line": 46, + "column": 21 + } + }, + "name": "matches" + }, + "init": { + "type": "CallExpression", + "start": 1373, + "end": 1402, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1373, + "end": 1385, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "object": { + "type": "ThisExpression", + "start": 1373, + "end": 1377, + "loc": { + "start": { + "line": 46, + "column": 25 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1378, + "end": 1385, + "loc": { + "start": { + "line": 46, + "column": 30 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "name": "matcher" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1386, + "end": 1391, + "loc": { + "start": { + "line": 46, + "column": 38 + }, + "end": { + "line": 46, + "column": 43 + } + }, + "name": "value" + }, + { + "type": "Identifier", + "start": 1393, + "end": 1401, + "loc": { + "start": { + "line": 46, + "column": 45 + }, + "end": { + "line": 46, + "column": 53 + } + }, + "name": "expected" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1412, + "end": 1464, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 60 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1418, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 14 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "id": { + "type": "Identifier", + "start": 1418, + "end": 1425, + "loc": { + "start": { + "line": 47, + "column": 14 + }, + "end": { + "line": 47, + "column": 21 + } + }, + "name": "onMatch" + }, + "init": { + "type": "ConditionalExpression", + "start": 1429, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1429, + "end": 1455, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "left": { + "type": "MemberExpression", + "start": 1429, + "end": 1449, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 1429, + "end": 1442, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "object": { + "type": "ThisExpression", + "start": 1429, + "end": 1433, + "loc": { + "start": { + "line": 47, + "column": 25 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 1434, + "end": 1442, + "loc": { + "start": { + "line": 47, + "column": 30 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "name": "expected" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1443, + "end": 1449, + "loc": { + "start": { + "line": 47, + "column": 39 + }, + "end": { + "line": 47, + "column": 45 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1454, + "end": 1455, + "loc": { + "start": { + "line": 47, + "column": 50 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "consequent": { + "type": "Literal", + "start": 1458, + "end": 1459, + "loc": { + "start": { + "line": 47, + "column": 54 + }, + "end": { + "line": 47, + "column": 55 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 1462, + "end": 1463, + "loc": { + "start": { + "line": 47, + "column": 58 + }, + "end": { + "line": 47, + "column": 59 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1474, + "end": 1549, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 83 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1474, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1474, + "end": 1487, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 1474, + "end": 1478, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1479, + "end": 1487, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "ConditionalExpression", + "start": 1490, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "test": { + "type": "Identifier", + "start": 1490, + "end": 1497, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 31 + } + }, + "name": "matches" + }, + "consequent": { + "type": "MemberExpression", + "start": 1500, + "end": 1513, + "loc": { + "start": { + "line": 49, + "column": 34 + }, + "end": { + "line": 49, + "column": 47 + } + }, + "object": { + "type": "ThisExpression", + "start": 1500, + "end": 1504, + "loc": { + "start": { + "line": 49, + "column": 34 + }, + "end": { + "line": 49, + "column": 38 + } + } + }, + "property": { + "type": "Identifier", + "start": 1505, + "end": 1513, + "loc": { + "start": { + "line": 49, + "column": 39 + }, + "end": { + "line": 49, + "column": 47 + } + }, + "name": "expected" + }, + "computed": false + }, + "alternate": { + "type": "CallExpression", + "start": 1516, + "end": 1548, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 82 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1516, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 67 + } + }, + "object": { + "type": "ArrayExpression", + "start": 1516, + "end": 1526, + "loc": { + "start": { + "line": 49, + "column": 50 + }, + "end": { + "line": 49, + "column": 60 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 1517, + "end": 1525, + "loc": { + "start": { + "line": 49, + "column": 51 + }, + "end": { + "line": 49, + "column": 59 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1527, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 61 + }, + "end": { + "line": 49, + "column": 67 + } + }, + "name": "concat" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1534, + "end": 1547, + "loc": { + "start": { + "line": 49, + "column": 68 + }, + "end": { + "line": 49, + "column": 81 + } + }, + "object": { + "type": "ThisExpression", + "start": 1534, + "end": 1538, + "loc": { + "start": { + "line": 49, + "column": 68 + }, + "end": { + "line": 49, + "column": 72 + } + } + }, + "property": { + "type": "Identifier", + "start": 1539, + "end": 1547, + "loc": { + "start": { + "line": 49, + "column": 73 + }, + "end": { + "line": 49, + "column": 81 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + } + }, + { + "type": "ReturnStatement", + "start": 1559, + "end": 1602, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 51 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 1566, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 15 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "test": { + "type": "Identifier", + "start": 1566, + "end": 1573, + "loc": { + "start": { + "line": 51, + "column": 15 + }, + "end": { + "line": 51, + "column": 22 + } + }, + "name": "matches" + }, + "consequent": { + "type": "Identifier", + "start": 1576, + "end": 1583, + "loc": { + "start": { + "line": 51, + "column": 25 + }, + "end": { + "line": 51, + "column": 32 + } + }, + "name": "onMatch" + }, + "alternate": { + "type": "MemberExpression", + "start": 1586, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 35 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "object": { + "type": "ThisExpression", + "start": 1586, + "end": 1590, + "loc": { + "start": { + "line": 51, + "column": 35 + }, + "end": { + "line": 51, + "column": 39 + } + } + }, + "property": { + "type": "Identifier", + "start": 1591, + "end": 1601, + "loc": { + "start": { + "line": 51, + "column": 40 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "name": "onMisMatch" + }, + "computed": false + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1136, + "end": 1277, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 43, + "column": 7 + } + }, + "range": [ + 1136, + 1277 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1614, + "end": 1741, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 59, + "column": 7 + } + }, + "range": [ + 1614, + 1741 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 1746, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 1746, + "end": 1751, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 60, + "column": 9 + } + }, + "name": "match", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1751, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1752, + "end": 1757, + "loc": { + "start": { + "line": 60, + "column": 10 + }, + "end": { + "line": 60, + "column": 15 + } + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 1759, + "end": 2081, + "loc": { + "start": { + "line": 60, + "column": 17 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1792, + "end": 1818, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "expression": { + "type": "CallExpression", + "start": 1792, + "end": 1817, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1792, + "end": 1810, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 1792, + "end": 1805, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 1792, + "end": 1796, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 61, + "column": 12 + } + }, + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1797, + "end": 1805, + "loc": { + "start": { + "line": 61, + "column": 13 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false, + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1806, + "end": 1810, + "loc": { + "start": { + "line": 61, + "column": 22 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "name": "push" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 32 + } + }, + "name": "value" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1761, + "end": 1783, + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 41 + } + }, + "range": [ + 1761, + 1783 + ] + } + ] + }, + { + "type": "IfStatement", + "start": 1828, + "end": 1867, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "test": { + "type": "UnaryExpression", + "start": 1831, + "end": 1850, + "loc": { + "start": { + "line": 63, + "column": 11 + }, + "end": { + "line": 63, + "column": 30 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1832, + "end": 1850, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1832, + "end": 1843, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 23 + } + }, + "object": { + "type": "ThisExpression", + "start": 1832, + "end": 1836, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 63, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 1837, + "end": 1843, + "loc": { + "start": { + "line": 63, + "column": 17 + }, + "end": { + "line": 63, + "column": 23 + } + }, + "name": "filter" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1844, + "end": 1849, + "loc": { + "start": { + "line": 63, + "column": 24 + }, + "end": { + "line": 63, + "column": 29 + } + }, + "name": "value" + } + ] + } + }, + "consequent": { + "type": "ReturnStatement", + "start": 1858, + "end": 1867, + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "argument": { + "type": "Literal", + "start": 1865, + "end": 1866, + "loc": { + "start": { + "line": 63, + "column": 45 + }, + "end": { + "line": 63, + "column": 46 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 1876, + "end": 1934, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 66 + } + }, + "test": { + "type": "CallExpression", + "start": 1879, + "end": 1904, + "loc": { + "start": { + "line": 64, + "column": 11 + }, + "end": { + "line": 64, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 1879, + "end": 1889, + "loc": { + "start": { + "line": 64, + "column": 11 + }, + "end": { + "line": 64, + "column": 21 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1890, + "end": 1903, + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1890, + "end": 1894, + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 26 + } + } + }, + "property": { + "type": "Identifier", + "start": 1895, + "end": 1903, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 35 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 1906, + "end": 1934, + "loc": { + "start": { + "line": 64, + "column": 38 + }, + "end": { + "line": 64, + "column": 66 + } + }, + "argument": { + "type": "CallExpression", + "start": 1913, + "end": 1933, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1913, + "end": 1926, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 58 + } + }, + "object": { + "type": "ThisExpression", + "start": 1913, + "end": 1917, + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 49 + } + } + }, + "property": { + "type": "Identifier", + "start": 1918, + "end": 1926, + "loc": { + "start": { + "line": 64, + "column": 50 + }, + "end": { + "line": 64, + "column": 58 + } + }, + "name": "expected" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1927, + "end": 1932, + "loc": { + "start": { + "line": 64, + "column": 59 + }, + "end": { + "line": 64, + "column": 64 + } + }, + "name": "value" + } + ] + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 1943, + "end": 2001, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 66 + } + }, + "test": { + "type": "CallExpression", + "start": 1946, + "end": 1968, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 1946, + "end": 1953, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 18 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1954, + "end": 1967, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "object": { + "type": "ThisExpression", + "start": 1954, + "end": 1958, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 23 + } + } + }, + "property": { + "type": "Identifier", + "start": 1959, + "end": 1967, + "loc": { + "start": { + "line": 65, + "column": 24 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 1973, + "end": 2001, + "loc": { + "start": { + "line": 65, + "column": 38 + }, + "end": { + "line": 65, + "column": 66 + } + }, + "argument": { + "type": "CallExpression", + "start": 1980, + "end": 2000, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1980, + "end": 1993, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 58 + } + }, + "object": { + "type": "ThisExpression", + "start": 1980, + "end": 1984, + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 49 + } + } + }, + "property": { + "type": "Identifier", + "start": 1985, + "end": 1993, + "loc": { + "start": { + "line": 65, + "column": 50 + }, + "end": { + "line": 65, + "column": 58 + } + }, + "name": "includes" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1994, + "end": 1999, + "loc": { + "start": { + "line": 65, + "column": 59 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "name": "value" + } + ] + } + }, + "alternate": null + }, + { + "type": "ReturnStatement", + "start": 2011, + "end": 2075, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 72 + } + }, + "argument": { + "type": "ConditionalExpression", + "start": 2018, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "test": { + "type": "CallExpression", + "start": 2018, + "end": 2052, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2018, + "end": 2030, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 2018, + "end": 2022, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 19 + } + } + }, + "property": { + "type": "Identifier", + "start": 2023, + "end": 2030, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 27 + } + }, + "name": "matcher" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 2031, + "end": 2036, + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 33 + } + }, + "name": "value" + }, + { + "type": "MemberExpression", + "start": 2038, + "end": 2051, + "loc": { + "start": { + "line": 67, + "column": 35 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "object": { + "type": "ThisExpression", + "start": 2038, + "end": 2042, + "loc": { + "start": { + "line": 67, + "column": 35 + }, + "end": { + "line": 67, + "column": 39 + } + } + }, + "property": { + "type": "Identifier", + "start": 2043, + "end": 2051, + "loc": { + "start": { + "line": 67, + "column": 40 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "name": "expected" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "Literal", + "start": 2055, + "end": 2056, + "loc": { + "start": { + "line": 67, + "column": 52 + }, + "end": { + "line": 67, + "column": 53 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "MemberExpression", + "start": 2059, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 56 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "object": { + "type": "ThisExpression", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 56 + }, + "end": { + "line": 67, + "column": 60 + } + } + }, + "property": { + "type": "Identifier", + "start": 2064, + "end": 2074, + "loc": { + "start": { + "line": 67, + "column": 61 + }, + "end": { + "line": 67, + "column": 71 + } + }, + "name": "onMisMatch" + }, + "computed": false + } + } + } + ], + "trailingComments": null + }, + "trailingComments": null + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n ", + "start": 1614, + "end": 1741, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 59, + "column": 7 + } + }, + "range": [ + 1614, + 1741 + ] + } + ], + "trailingComments": [ + { + "type": "Block", + "value": "*\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n ", + "start": 2087, + "end": 2196, + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 74, + "column": 7 + } + }, + "range": [ + 2087, + 2196 + ] + } + ] + }, + { + "type": "MethodDefinition", + "start": 2201, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 2201, + "end": 2209, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 75, + "column": 12 + } + }, + "name": "getError", + "leadingComments": null + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 2209, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 12 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2212, + "end": 2509, + "loc": { + "start": { + "line": 75, + "column": 15 + }, + "end": { + "line": 85, + "column": 5 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 2222, + "end": 2351, + "loc": { + "start": { + "line": 76, + "column": 8 + }, + "end": { + "line": 76, + "column": 137 + } + }, + "test": { + "type": "CallExpression", + "start": 2225, + "end": 2251, + "loc": { + "start": { + "line": 76, + "column": 11 + }, + "end": { + "line": 76, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 2225, + "end": 2235, + "loc": { + "start": { + "line": 76, + "column": 11 + }, + "end": { + "line": 76, + "column": 21 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2236, + "end": 2250, + "loc": { + "start": { + "line": 76, + "column": 22 + }, + "end": { + "line": 76, + "column": 36 + } + }, + "object": { + "type": "ThisExpression", + "start": 2236, + "end": 2240, + "loc": { + "start": { + "line": 76, + "column": 22 + }, + "end": { + "line": 76, + "column": 26 + } + } + }, + "property": { + "type": "Identifier", + "start": 2241, + "end": 2250, + "loc": { + "start": { + "line": 76, + "column": 27 + }, + "end": { + "line": 76, + "column": 36 + } + }, + "name": "expection" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "ReturnStatement", + "start": 2253, + "end": 2351, + "loc": { + "start": { + "line": 76, + "column": 39 + }, + "end": { + "line": 76, + "column": 137 + } + }, + "argument": { + "type": "NewExpression", + "start": 2260, + "end": 2350, + "loc": { + "start": { + "line": 76, + "column": 46 + }, + "end": { + "line": 76, + "column": 136 + } + }, + "callee": { + "type": "Identifier", + "start": 2264, + "end": 2269, + "loc": { + "start": { + "line": 76, + "column": 50 + }, + "end": { + "line": 76, + "column": 55 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "TemplateLiteral", + "start": 2270, + "end": 2349, + "loc": { + "start": { + "line": 76, + "column": 56 + }, + "end": { + "line": 76, + "column": 135 + } + }, + "expressions": [ + { + "type": "CallExpression", + "start": 2286, + "end": 2315, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 101 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2286, + "end": 2300, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 86 + } + }, + "object": { + "type": "Identifier", + "start": 2286, + "end": 2290, + "loc": { + "start": { + "line": 76, + "column": 72 + }, + "end": { + "line": 76, + "column": 76 + } + }, + "name": "JSON" + }, + "property": { + "type": "Identifier", + "start": 2291, + "end": 2300, + "loc": { + "start": { + "line": 76, + "column": 77 + }, + "end": { + "line": 76, + "column": 86 + } + }, + "name": "stringify" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2301, + "end": 2314, + "loc": { + "start": { + "line": 76, + "column": 87 + }, + "end": { + "line": 76, + "column": 100 + } + }, + "object": { + "type": "ThisExpression", + "start": 2301, + "end": 2305, + "loc": { + "start": { + "line": 76, + "column": 87 + }, + "end": { + "line": 76, + "column": 91 + } + } + }, + "property": { + "type": "Identifier", + "start": 2306, + "end": 2314, + "loc": { + "start": { + "line": 76, + "column": 92 + }, + "end": { + "line": 76, + "column": 100 + } + }, + "name": "messages" + }, + "computed": false + } + ] + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 2271, + "end": 2284, + "loc": { + "start": { + "line": 76, + "column": 57 + }, + "end": { + "line": 76, + "column": 70 + } + }, + "value": { + "raw": "the messages ", + "cooked": "the messages " + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 2316, + "end": 2348, + "loc": { + "start": { + "line": 76, + "column": 102 + }, + "end": { + "line": 76, + "column": 134 + } + }, + "value": { + "raw": " do not match your expectations.", + "cooked": " do not match your expectations." + }, + "tail": true + } + ] + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 2361, + "end": 2503, + "loc": { + "start": { + "line": 78, + "column": 8 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 2365, + "end": 2460, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 82, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2379, + "end": 2424, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 57 + } + }, + "expression": { + "type": "CallExpression", + "start": 2379, + "end": 2423, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 56 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2379, + "end": 2407, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2379, + "end": 2403, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 36 + } + }, + "object": { + "type": "CallExpression", + "start": 2379, + "end": 2400, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 2379, + "end": 2385, + "loc": { + "start": { + "line": 79, + "column": 12 + }, + "end": { + "line": 79, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2386, + "end": 2399, + "loc": { + "start": { + "line": 79, + "column": 19 + }, + "end": { + "line": 79, + "column": 32 + } + }, + "object": { + "type": "ThisExpression", + "start": 2386, + "end": 2390, + "loc": { + "start": { + "line": 79, + "column": 19 + }, + "end": { + "line": 79, + "column": 23 + } + } + }, + "property": { + "type": "Identifier", + "start": 2391, + "end": 2399, + "loc": { + "start": { + "line": 79, + "column": 24 + }, + "end": { + "line": 79, + "column": 32 + } + }, + "name": "messages" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2401, + "end": 2403, + "loc": { + "start": { + "line": 79, + "column": 34 + }, + "end": { + "line": 79, + "column": 36 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2404, + "end": 2407, + "loc": { + "start": { + "line": 79, + "column": 37 + }, + "end": { + "line": 79, + "column": 40 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2408, + "end": 2422, + "loc": { + "start": { + "line": 79, + "column": 41 + }, + "end": { + "line": 79, + "column": 55 + } + }, + "object": { + "type": "ThisExpression", + "start": 2408, + "end": 2412, + "loc": { + "start": { + "line": 79, + "column": 41 + }, + "end": { + "line": 79, + "column": 45 + } + } + }, + "property": { + "type": "Identifier", + "start": 2413, + "end": 2422, + "loc": { + "start": { + "line": 79, + "column": 46 + }, + "end": { + "line": 79, + "column": 55 + } + }, + "name": "expection" + }, + "computed": false + } + ] + } + }, + { + "type": "ReturnStatement", + "start": 2438, + "end": 2450, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 24 + } + }, + "argument": { + "type": "Literal", + "start": 2445, + "end": 2449, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 23 + } + }, + "value": null, + "rawValue": null, + "raw": "null" + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 2461, + "end": 2503, + "loc": { + "start": { + "line": 82, + "column": 10 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 2467, + "end": 2468, + "loc": { + "start": { + "line": 82, + "column": 16 + }, + "end": { + "line": 82, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 2470, + "end": 2503, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 84, + "column": 9 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 2484, + "end": 2493, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 21 + } + }, + "argument": { + "type": "Identifier", + "start": 2491, + "end": 2492, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 20 + } + }, + "name": "e" + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + }, + "leadingComments": [ + { + "type": "Block", + "value": "*\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n ", + "start": 2087, + "end": 2196, + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 74, + "column": 7 + } + }, + "range": [ + 2087, + 2196 + ] + } + ] + } + ] + }, + "leadingComments": [], + "trailingComments": [] + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/StreamHelper.js.json b/docs/ast/source/StreamHelper.js.json new file mode 100644 index 0000000..e7f9a51 --- /dev/null +++ b/docs/ast/source/StreamHelper.js.json @@ -0,0 +1,8549 @@ +{ + "type": "Program", + "start": 0, + "end": 2113, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 72, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": "isFunction" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 23, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "value": "lodash.isfunction", + "rawValue": "lodash.isfunction", + "raw": "\"lodash.isfunction\"" + } + }, + { + "type": "ImportDeclaration", + "start": 44, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "local": { + "type": "Identifier", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "name": "assert" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 63, + "end": 71, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "value": "assert", + "rawValue": "assert", + "raw": "\"assert\"" + } + }, + { + "type": "ImportDeclaration", + "start": 73, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 80, + "end": 92, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 80, + "end": 92, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "name": "AssertStream" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 98, + "end": 114, + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "value": "./AssertStream", + "rawValue": "./AssertStream", + "raw": "\"./AssertStream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 116, + "end": 157, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 123, + "end": 131, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 123, + "end": 131, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "name": "defaults" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 137, + "end": 156, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 40 + } + }, + "value": "set-default-value", + "rawValue": "set-default-value", + "raw": "\"set-default-value\"" + }, + "trailingComments": [ + { + "type": "Block", + "value": "*\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n ", + "start": 159, + "end": 501, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 16, + "column": 3 + } + }, + "range": [ + 159, + 501 + ] + } + ] + }, + { + "type": "Identifier", + "start": 502, + "end": 2082, + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 508, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "init": { + "type": "FunctionExpression", + "start": 523, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "ObjectPattern", + "start": 532, + "end": 545, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 43 + } + }, + "properties": [ + { + "type": "Property", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 547, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 781, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 780, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 553, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 553, + "end": 562, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 563, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 582, + "end": 591, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 42 + } + }, + "value": "exactly", + "rawValue": "exactly", + "raw": "\"exactly\"" + }, + { + "type": "FunctionExpression", + "start": 593, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 44 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 602, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 53 + }, + "end": { + "line": 18, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 612, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 63 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 622, + "end": 681, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 67 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 622, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 622, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 622, + "end": 626, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 644, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 644, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 644, + "end": 662, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 644, + "end": 652, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 38 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "Identifier", + "start": 653, + "end": 661, + "loc": { + "start": { + "line": 19, + "column": 39 + }, + "end": { + "line": 19, + "column": 47 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 663, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 49 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 666, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "object": { + "type": "ThisExpression", + "start": 666, + "end": 670, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 56 + } + } + }, + "property": { + "type": "Identifier", + "start": 671, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 57 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 690, + "end": 717, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 690, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 690, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 690, + "end": 694, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 695, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 712, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 725, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 736, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 746, + "end": 773, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 746, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 746, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 746, + "end": 750, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 751, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 768, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 787, + "end": 961, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 787, + "end": 960, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 787, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 787, + "end": 796, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 797, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 816, + "end": 825, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "value": "produce", + "rawValue": "produce", + "raw": "\"produce\"" + }, + { + "type": "FunctionExpression", + "start": 827, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 44 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 836, + "end": 844, + "loc": { + "start": { + "line": 25, + "column": 53 + }, + "end": { + "line": 25, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 846, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 63 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 856, + "end": 881, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 856, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 856, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 856, + "end": 860, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 861, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 872, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 890, + "end": 909, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 27 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 890, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 890, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 890, + "end": 894, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 895, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 906, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "elements": [] + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 917, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 928, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 938, + "end": 953, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 23 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 938, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 938, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 938, + "end": 942, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 950, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 20 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "elements": [] + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 967, + "end": 1060, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 967, + "end": 1059, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 967, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "object": { + "type": "Identifier", + "start": 967, + "end": 976, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 977, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 14 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "name": "addProperty" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 989, + "end": 1001, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 38 + } + }, + "value": "eventually", + "rawValue": "eventually", + "raw": "\"eventually\"" + }, + { + "type": "FunctionExpression", + "start": 1003, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 40 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1014, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 51 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1024, + "end": 1052, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 36 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1024, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1024, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "object": { + "type": "ThisExpression", + "start": 1024, + "end": 1028, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 1047, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 31 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1066, + "end": 1158, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1066, + "end": 1157, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1066, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1066, + "end": 1075, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1076, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1086, + "end": 1094, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 32 + } + }, + "value": "filter", + "rawValue": "filter", + "raw": "\"filter\"" + }, + { + "type": "FunctionExpression", + "start": 1096, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 34 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1105, + "end": 1111, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 49 + } + }, + "name": "filter" + } + ], + "body": { + "type": "BlockStatement", + "start": 1113, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 51 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1123, + "end": 1150, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1123, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1123, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 1123, + "end": 1127, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1128, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 13 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1143, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "name": "filter" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1164, + "end": 1654, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1164, + "end": 1653, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1164, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1164, + "end": 1173, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1174, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1184, + "end": 1192, + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "value": "notify", + "rawValue": "notify", + "raw": "\"notify\"" + }, + { + "type": "FunctionExpression", + "start": 1194, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 34 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1203, + "end": 1207, + "loc": { + "start": { + "line": 40, + "column": 43 + }, + "end": { + "line": 40, + "column": 47 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1209, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 49 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1219, + "end": 1447, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 46, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1225, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1225, + "end": 1229, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 18 + } + }, + "name": "sink" + }, + "init": { + "type": "NewExpression", + "start": 1232, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 1236, + "end": 1248, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 37 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1249, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "ThisExpression", + "start": 1249, + "end": 1253, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 42 + } + } + }, + "property": { + "type": "Identifier", + "start": 1254, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "expected" + }, + "computed": false + }, + { + "type": "ObjectExpression", + "start": 1264, + "end": 1445, + "loc": { + "start": { + "line": 41, + "column": 53 + }, + "end": { + "line": 46, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1278, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1278, + "end": 1284, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "MemberExpression", + "start": 1290, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "object": { + "type": "ThisExpression", + "start": 1290, + "end": 1294, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1321, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1321, + "end": 1327, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "MemberExpression", + "start": 1333, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1333, + "end": 1337, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1338, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 29 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "name": "tapper" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1358, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1358, + "end": 1368, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "MemberExpression", + "start": 1370, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "object": { + "type": "ThisExpression", + "start": 1370, + "end": 1374, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1375, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1404, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1404, + "end": 1410, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 18 + } + }, + "name": "strict" + }, + "value": { + "type": "MemberExpression", + "start": 1416, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "object": { + "type": "ThisExpression", + "start": 1416, + "end": 1420, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1421, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1457, + "end": 1566, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 31 + } + }, + "expression": { + "type": "CallExpression", + "start": 1457, + "end": 1565, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1550, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1534, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1520, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1477, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 28 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 1457, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1457, + "end": 1461, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1462, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1467, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "name": "pipe" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1472, + "end": 1476, + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 27 + } + }, + "name": "sink" + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1518, + "end": 1520, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "name": "on", + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1521, + "end": 1527, + "loc": { + "start": { + "line": 49, + "column": 16 + }, + "end": { + "line": 49, + "column": 22 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1529, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 28 + } + }, + "name": "done" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 50, + "column": 13 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 50, + "column": 16 + }, + "end": { + "line": 50, + "column": 23 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "Identifier", + "start": 1560, + "end": 1564, + "loc": { + "start": { + "line": 50, + "column": 25 + }, + "end": { + "line": 50, + "column": 29 + } + }, + "name": "done" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1576, + "end": 1623, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 1576, + "end": 1622, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1576, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "object": { + "type": "MemberExpression", + "start": 1576, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1576, + "end": 1580, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1581, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 13 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1586, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 18 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "name": "forEach" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1594, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1594, + "end": 1597, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 29 + } + }, + "name": "arg" + } + ], + "body": { + "type": "CallExpression", + "start": 1601, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1601, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1601, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "object": { + "type": "ThisExpression", + "start": 1601, + "end": 1605, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 37 + } + } + }, + "property": { + "type": "Identifier", + "start": 1606, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 38 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1611, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 43 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1617, + "end": 1620, + "loc": { + "start": { + "line": 52, + "column": 49 + }, + "end": { + "line": 52, + "column": 52 + } + }, + "name": "arg" + } + ] + } + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1660, + "end": 1743, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1660, + "end": 1742, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1660, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1660, + "end": 1669, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "name": "Assertion", + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1680, + "end": 1685, + "loc": { + "start": { + "line": 55, + "column": 24 + }, + "end": { + "line": 55, + "column": 29 + } + }, + "value": "tap", + "rawValue": "tap", + "raw": "\"tap\"" + }, + { + "type": "FunctionExpression", + "start": 1687, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 31 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1696, + "end": 1702, + "loc": { + "start": { + "line": 55, + "column": 40 + }, + "end": { + "line": 55, + "column": 46 + } + }, + "name": "tapper" + } + ], + "body": { + "type": "BlockStatement", + "start": 1704, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 48 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1714, + "end": 1735, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1714, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1714, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1714, + "end": 1718, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1719, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1728, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "name": "tapper" + } + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1749, + "end": 2079, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1749, + "end": 2078, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1749, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1749, + "end": 1758, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1759, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1769, + "end": 1773, + "loc": { + "start": { + "line": 59, + "column": 24 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "value": "on", + "rawValue": "on", + "raw": "\"on\"" + }, + { + "type": "FunctionExpression", + "start": 1775, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 30 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 1784, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 39 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "argument": { + "type": "Identifier", + "start": 1787, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 42 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 1793, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 48 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1803, + "end": 1831, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 60, + "column": 36 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1809, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "id": { + "type": "ObjectPattern", + "start": 1809, + "end": 1818, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 23 + } + }, + "properties": [ + { + "type": "Property", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + } + } + ] + }, + "init": { + "type": "MemberExpression", + "start": 1821, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1821, + "end": 1825, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "property": { + "type": "Identifier", + "start": 1826, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 31 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "name": "_obj" + }, + "computed": false + } + } + ], + "kind": "const", + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1864, + "end": 2044, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "expression": { + "type": "CallExpression", + "start": 1864, + "end": 2043, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1864, + "end": 1870, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 62, + "column": 14 + } + }, + "name": "assert", + "leadingComments": null + }, + "arguments": [ + { + "type": "LogicalExpression", + "start": 1884, + "end": 1988, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 65, + "column": 9 + } + }, + "left": { + "type": "LogicalExpression", + "start": 1885, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1885, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "left": { + "type": "MemberExpression", + "start": 1885, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1885, + "end": 1889, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1890, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 18 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": ">", + "right": { + "type": "Literal", + "start": 1899, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 27 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "start": 1904, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1904, + "end": 1914, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 42 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1915, + "end": 1920, + "loc": { + "start": { + "line": 63, + "column": 43 + }, + "end": { + "line": 63, + "column": 48 + } + }, + "name": "write" + } + ] + }, + "parenthesizedExpression": true + }, + "operator": "||", + "right": { + "type": "LogicalExpression", + "start": 1939, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1939, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "left": { + "type": "MemberExpression", + "start": 1939, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1939, + "end": 1943, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1944, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1955, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 29 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "UnaryExpression", + "start": 1960, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1961, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 1961, + "end": 1971, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 45 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1972, + "end": 1977, + "loc": { + "start": { + "line": 64, + "column": 46 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "name": "write" + } + ] + } + }, + "parenthesizedExpression": true + } + }, + { + "type": "Literal", + "start": 1990, + "end": 2042, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 63 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2054, + "end": 2071, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2054, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2054, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 2054, + "end": 2058, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 13 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 2066, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "name": "args" + } + } + } + ] + } + } + ] + } + } + ] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 2084, + "end": 2112, + "loc": { + "start": { + "line": 71, + "column": 0 + }, + "end": { + "line": 71, + "column": 28 + } + }, + "declaration": { + "type": "Identifier", + "start": 2099, + "end": 2111, + "loc": { + "start": { + "line": 71, + "column": 15 + }, + "end": { + "line": 71, + "column": 27 + } + }, + "name": "StreamHelper" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 2084, + "end": 2112, + "loc": { + "start": { + "line": 71, + "column": 0 + }, + "end": { + "line": 71, + "column": 28 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 502, + "end": 2082, + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 508, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "init": { + "type": "FunctionExpression", + "start": 523, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 520, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "name": "StreamHelper", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "ObjectPattern", + "start": 532, + "end": 545, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 43 + } + }, + "properties": [ + { + "type": "Property", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 534, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 32 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "Assertion" + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 547, + "end": 2081, + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 553, + "end": 781, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 553, + "end": 780, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 23, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 553, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 553, + "end": 562, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 563, + "end": 581, + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 582, + "end": 591, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 42 + } + }, + "value": "exactly", + "rawValue": "exactly", + "raw": "\"exactly\"" + }, + { + "type": "FunctionExpression", + "start": 593, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 44 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 602, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 53 + }, + "end": { + "line": 18, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 612, + "end": 723, + "loc": { + "start": { + "line": 18, + "column": 63 + }, + "end": { + "line": 21, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 622, + "end": 681, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 67 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 622, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 622, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 622, + "end": 626, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 627, + "end": 635, + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "CallExpression", + "start": 644, + "end": 680, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 644, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "object": { + "type": "CallExpression", + "start": 644, + "end": 662, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 644, + "end": 652, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 38 + } + }, + "name": "defaults" + }, + "arguments": [ + { + "type": "Identifier", + "start": 653, + "end": 661, + "loc": { + "start": { + "line": 19, + "column": 39 + }, + "end": { + "line": 19, + "column": 47 + } + }, + "name": "expected" + } + ] + }, + "property": { + "type": "Identifier", + "start": 663, + "end": 665, + "loc": { + "start": { + "line": 19, + "column": 49 + }, + "end": { + "line": 19, + "column": 51 + } + }, + "name": "to" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 666, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "object": { + "type": "ThisExpression", + "start": 666, + "end": 670, + "loc": { + "start": { + "line": 19, + "column": 52 + }, + "end": { + "line": 19, + "column": 56 + } + } + }, + "property": { + "type": "Identifier", + "start": 671, + "end": 679, + "loc": { + "start": { + "line": 19, + "column": 57 + }, + "end": { + "line": 19, + "column": 65 + } + }, + "name": "expected" + }, + "computed": false + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 690, + "end": 717, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 690, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 690, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 690, + "end": 694, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 695, + "end": 709, + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 712, + "end": 716, + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 725, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 736, + "end": 779, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 23, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 746, + "end": 773, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 746, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 746, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "object": { + "type": "ThisExpression", + "start": 746, + "end": 750, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 751, + "end": 765, + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 27 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 768, + "end": 772, + "loc": { + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 22, + "column": 34 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 787, + "end": 961, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 787, + "end": 960, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 787, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 787, + "end": 796, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 797, + "end": 815, + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 32 + } + }, + "name": "addChainableMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 816, + "end": 825, + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "value": "produce", + "rawValue": "produce", + "raw": "\"produce\"" + }, + { + "type": "FunctionExpression", + "start": 827, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 44 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 836, + "end": 844, + "loc": { + "start": { + "line": 25, + "column": 53 + }, + "end": { + "line": 25, + "column": 61 + } + }, + "name": "expected" + } + ], + "body": { + "type": "BlockStatement", + "start": 846, + "end": 915, + "loc": { + "start": { + "line": 25, + "column": 63 + }, + "end": { + "line": 28, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 856, + "end": 881, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 856, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 856, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 856, + "end": 860, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 861, + "end": 869, + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "expected" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 872, + "end": 880, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 32 + } + }, + "name": "expected" + } + } + }, + { + "type": "ExpressionStatement", + "start": 890, + "end": 909, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 27 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 890, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 890, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 890, + "end": 894, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 895, + "end": 899, + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 906, + "end": 908, + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + }, + "elements": [] + } + } + } + ] + } + }, + { + "type": "FunctionExpression", + "start": 917, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 928, + "end": 959, + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 30, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 938, + "end": 953, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 23 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 938, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 938, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 938, + "end": 942, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 947, + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "ArrayExpression", + "start": 950, + "end": 952, + "loc": { + "start": { + "line": 29, + "column": 20 + }, + "end": { + "line": 29, + "column": 22 + } + }, + "elements": [] + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 967, + "end": 1060, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 967, + "end": 1059, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 34, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 967, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "object": { + "type": "Identifier", + "start": 967, + "end": 976, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 977, + "end": 988, + "loc": { + "start": { + "line": 32, + "column": 14 + }, + "end": { + "line": 32, + "column": 25 + } + }, + "name": "addProperty" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 989, + "end": 1001, + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 38 + } + }, + "value": "eventually", + "rawValue": "eventually", + "raw": "\"eventually\"" + }, + { + "type": "FunctionExpression", + "start": 1003, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 40 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1014, + "end": 1058, + "loc": { + "start": { + "line": 32, + "column": 51 + }, + "end": { + "line": 34, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1024, + "end": 1052, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 36 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1024, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1024, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "object": { + "type": "ThisExpression", + "start": 1024, + "end": 1028, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1044, + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 28 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "right": { + "type": "Literal", + "start": 1047, + "end": 1051, + "loc": { + "start": { + "line": 33, + "column": 31 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1066, + "end": 1158, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1066, + "end": 1157, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1066, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1066, + "end": 1075, + "loc": { + "start": { + "line": 36, + "column": 4 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1076, + "end": 1085, + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1086, + "end": 1094, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 32 + } + }, + "value": "filter", + "rawValue": "filter", + "raw": "\"filter\"" + }, + { + "type": "FunctionExpression", + "start": 1096, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 34 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1105, + "end": 1111, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 49 + } + }, + "name": "filter" + } + ], + "body": { + "type": "BlockStatement", + "start": 1113, + "end": 1156, + "loc": { + "start": { + "line": 36, + "column": 51 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1123, + "end": 1150, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1123, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1123, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 1123, + "end": 1127, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1128, + "end": 1140, + "loc": { + "start": { + "line": 37, + "column": 13 + }, + "end": { + "line": 37, + "column": 25 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1143, + "end": 1149, + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 37, + "column": 34 + } + }, + "name": "filter" + } + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1164, + "end": 1654, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1164, + "end": 1653, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 53, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1164, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1164, + "end": 1173, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1174, + "end": 1183, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1184, + "end": 1192, + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "value": "notify", + "rawValue": "notify", + "raw": "\"notify\"" + }, + { + "type": "FunctionExpression", + "start": 1194, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 34 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1203, + "end": 1207, + "loc": { + "start": { + "line": 40, + "column": 43 + }, + "end": { + "line": 40, + "column": 47 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1209, + "end": 1652, + "loc": { + "start": { + "line": 40, + "column": 49 + }, + "end": { + "line": 53, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1219, + "end": 1447, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 46, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1225, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1225, + "end": 1229, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 18 + } + }, + "name": "sink" + }, + "init": { + "type": "NewExpression", + "start": 1232, + "end": 1446, + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 46, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 1236, + "end": 1248, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 37 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1249, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "ThisExpression", + "start": 1249, + "end": 1253, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 42 + } + } + }, + "property": { + "type": "Identifier", + "start": 1254, + "end": 1262, + "loc": { + "start": { + "line": 41, + "column": 43 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "expected" + }, + "computed": false + }, + { + "type": "ObjectExpression", + "start": 1264, + "end": 1445, + "loc": { + "start": { + "line": 41, + "column": 53 + }, + "end": { + "line": 46, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1278, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1278, + "end": 1284, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "MemberExpression", + "start": 1290, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "object": { + "type": "ThisExpression", + "start": 1290, + "end": 1294, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1307, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 41 + } + }, + "name": "filterMethod" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1321, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1321, + "end": 1327, + "loc": { + "start": { + "line": 43, + "column": 12 + }, + "end": { + "line": 43, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "MemberExpression", + "start": 1333, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1333, + "end": 1337, + "loc": { + "start": { + "line": 43, + "column": 24 + }, + "end": { + "line": 43, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1338, + "end": 1344, + "loc": { + "start": { + "line": 43, + "column": 29 + }, + "end": { + "line": 43, + "column": 35 + } + }, + "name": "tapper" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1358, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1358, + "end": 1368, + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "MemberExpression", + "start": 1370, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "object": { + "type": "ThisExpression", + "start": 1370, + "end": 1374, + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1375, + "end": 1390, + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 44 + } + }, + "name": "checkAllResults" + }, + "computed": false + }, + "kind": "init" + }, + { + "type": "Property", + "start": 1404, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1404, + "end": 1410, + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 18 + } + }, + "name": "strict" + }, + "value": { + "type": "MemberExpression", + "start": 1416, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "object": { + "type": "ThisExpression", + "start": 1416, + "end": 1420, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "property": { + "type": "Identifier", + "start": 1421, + "end": 1435, + "loc": { + "start": { + "line": 45, + "column": 29 + }, + "end": { + "line": 45, + "column": 43 + } + }, + "name": "strictEquality" + }, + "computed": false + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1457, + "end": 1566, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 31 + } + }, + "expression": { + "type": "CallExpression", + "start": 1457, + "end": 1565, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 30 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1550, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1534, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1520, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1457, + "end": 1477, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 28 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1457, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 1457, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1457, + "end": 1461, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1462, + "end": 1466, + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1467, + "end": 1471, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 22 + } + }, + "name": "pipe" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1472, + "end": 1476, + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 27 + } + }, + "name": "sink" + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1518, + "end": 1520, + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 15 + } + }, + "name": "on", + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1482, + "end": 1504, + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 55 + } + }, + "range": [ + 1482, + 1504 + ] + } + ] + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1521, + "end": 1527, + "loc": { + "start": { + "line": 49, + "column": 16 + }, + "end": { + "line": 49, + "column": 22 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1529, + "end": 1533, + "loc": { + "start": { + "line": 49, + "column": 24 + }, + "end": { + "line": 49, + "column": 28 + } + }, + "name": "done" + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 50, + "column": 13 + }, + "end": { + "line": 50, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 50, + "column": 16 + }, + "end": { + "line": 50, + "column": 23 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "Identifier", + "start": 1560, + "end": 1564, + "loc": { + "start": { + "line": 50, + "column": 25 + }, + "end": { + "line": 50, + "column": 29 + } + }, + "name": "done" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1576, + "end": 1623, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 1576, + "end": 1622, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1576, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "object": { + "type": "MemberExpression", + "start": 1576, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1576, + "end": 1580, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 52, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1581, + "end": 1585, + "loc": { + "start": { + "line": 52, + "column": 13 + }, + "end": { + "line": 52, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1586, + "end": 1593, + "loc": { + "start": { + "line": 52, + "column": 18 + }, + "end": { + "line": 52, + "column": 25 + } + }, + "name": "forEach" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1594, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1594, + "end": 1597, + "loc": { + "start": { + "line": 52, + "column": 26 + }, + "end": { + "line": 52, + "column": 29 + } + }, + "name": "arg" + } + ], + "body": { + "type": "CallExpression", + "start": 1601, + "end": 1621, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1601, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1601, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "object": { + "type": "ThisExpression", + "start": 1601, + "end": 1605, + "loc": { + "start": { + "line": 52, + "column": 33 + }, + "end": { + "line": 52, + "column": 37 + } + } + }, + "property": { + "type": "Identifier", + "start": 1606, + "end": 1610, + "loc": { + "start": { + "line": 52, + "column": 38 + }, + "end": { + "line": 52, + "column": 42 + } + }, + "name": "_obj" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1611, + "end": 1616, + "loc": { + "start": { + "line": 52, + "column": 43 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1617, + "end": 1620, + "loc": { + "start": { + "line": 52, + "column": 49 + }, + "end": { + "line": 52, + "column": 52 + } + }, + "name": "arg" + } + ] + } + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1660, + "end": 1743, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1660, + "end": 1742, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 57, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1660, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1660, + "end": 1669, + "loc": { + "start": { + "line": 55, + "column": 4 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "name": "Assertion", + "leadingComments": null + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1679, + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1680, + "end": 1685, + "loc": { + "start": { + "line": 55, + "column": 24 + }, + "end": { + "line": 55, + "column": 29 + } + }, + "value": "tap", + "rawValue": "tap", + "raw": "\"tap\"" + }, + { + "type": "FunctionExpression", + "start": 1687, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 31 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1696, + "end": 1702, + "loc": { + "start": { + "line": 55, + "column": 40 + }, + "end": { + "line": 55, + "column": 46 + } + }, + "name": "tapper" + } + ], + "body": { + "type": "BlockStatement", + "start": 1704, + "end": 1741, + "loc": { + "start": { + "line": 55, + "column": 48 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1714, + "end": 1735, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 1714, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1714, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "object": { + "type": "ThisExpression", + "start": 1714, + "end": 1718, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1719, + "end": 1725, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 19 + } + }, + "name": "tapper" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 1728, + "end": 1734, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + } + }, + "name": "tapper" + } + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1624, + "end": 1646, + "loc": { + "start": { + "line": 52, + "column": 56 + }, + "end": { + "line": 52, + "column": 78 + } + }, + "range": [ + 1624, + 1646 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1749, + "end": 2079, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1749, + "end": 2078, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1749, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 1749, + "end": 1758, + "loc": { + "start": { + "line": 59, + "column": 4 + }, + "end": { + "line": 59, + "column": 13 + } + }, + "name": "Assertion" + }, + "property": { + "type": "Identifier", + "start": 1759, + "end": 1768, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 23 + } + }, + "name": "addMethod" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1769, + "end": 1773, + "loc": { + "start": { + "line": 59, + "column": 24 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "value": "on", + "rawValue": "on", + "raw": "\"on\"" + }, + { + "type": "FunctionExpression", + "start": 1775, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 30 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 1784, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 39 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "argument": { + "type": "Identifier", + "start": 1787, + "end": 1791, + "loc": { + "start": { + "line": 59, + "column": 42 + }, + "end": { + "line": 59, + "column": 46 + } + }, + "name": "args" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 1793, + "end": 2077, + "loc": { + "start": { + "line": 59, + "column": 48 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1803, + "end": 1831, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 60, + "column": 36 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1809, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "id": { + "type": "ObjectPattern", + "start": 1809, + "end": 1818, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 23 + } + }, + "properties": [ + { + "type": "Property", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + }, + "kind": "init", + "value": { + "type": "Identifier", + "start": 1811, + "end": 1816, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 21 + } + }, + "name": "write" + } + } + ] + }, + "init": { + "type": "MemberExpression", + "start": 1821, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "object": { + "type": "ThisExpression", + "start": 1821, + "end": 1825, + "loc": { + "start": { + "line": 60, + "column": 26 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "property": { + "type": "Identifier", + "start": 1826, + "end": 1830, + "loc": { + "start": { + "line": 60, + "column": 31 + }, + "end": { + "line": 60, + "column": 35 + } + }, + "name": "_obj" + }, + "computed": false + } + } + ], + "kind": "const", + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1864, + "end": 2044, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 65 + } + }, + "expression": { + "type": "CallExpression", + "start": 1864, + "end": 2043, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 65, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1864, + "end": 1870, + "loc": { + "start": { + "line": 62, + "column": 8 + }, + "end": { + "line": 62, + "column": 14 + } + }, + "name": "assert", + "leadingComments": null + }, + "arguments": [ + { + "type": "LogicalExpression", + "start": 1884, + "end": 1988, + "loc": { + "start": { + "line": 63, + "column": 12 + }, + "end": { + "line": 65, + "column": 9 + } + }, + "left": { + "type": "LogicalExpression", + "start": 1885, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1885, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "left": { + "type": "MemberExpression", + "start": 1885, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1885, + "end": 1889, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1890, + "end": 1896, + "loc": { + "start": { + "line": 63, + "column": 18 + }, + "end": { + "line": 63, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": ">", + "right": { + "type": "Literal", + "start": 1899, + "end": 1900, + "loc": { + "start": { + "line": 63, + "column": 27 + }, + "end": { + "line": 63, + "column": 28 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "start": 1904, + "end": 1921, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1904, + "end": 1914, + "loc": { + "start": { + "line": 63, + "column": 32 + }, + "end": { + "line": 63, + "column": 42 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1915, + "end": 1920, + "loc": { + "start": { + "line": 63, + "column": 43 + }, + "end": { + "line": 63, + "column": 48 + } + }, + "name": "write" + } + ] + }, + "parenthesizedExpression": true + }, + "operator": "||", + "right": { + "type": "LogicalExpression", + "start": 1939, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "left": { + "type": "BinaryExpression", + "start": 1939, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "left": { + "type": "MemberExpression", + "start": 1939, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 1939, + "end": 1943, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "args" + }, + "property": { + "type": "Identifier", + "start": 1944, + "end": 1950, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 24 + } + }, + "name": "length" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1955, + "end": 1956, + "loc": { + "start": { + "line": 64, + "column": 29 + }, + "end": { + "line": 64, + "column": 30 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + }, + "operator": "&&", + "right": { + "type": "UnaryExpression", + "start": 1960, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "CallExpression", + "start": 1961, + "end": 1978, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 1961, + "end": 1971, + "loc": { + "start": { + "line": 64, + "column": 35 + }, + "end": { + "line": 64, + "column": 45 + } + }, + "name": "isFunction" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1972, + "end": 1977, + "loc": { + "start": { + "line": 64, + "column": 46 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "name": "write" + } + ] + } + }, + "parenthesizedExpression": true + } + }, + { + "type": "Literal", + "start": 1990, + "end": 2042, + "loc": { + "start": { + "line": 65, + "column": 11 + }, + "end": { + "line": 65, + "column": 63 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1832, + "end": 1854, + "loc": { + "start": { + "line": 60, + "column": 37 + }, + "end": { + "line": 60, + "column": 59 + } + }, + "range": [ + 1832, + 1854 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2054, + "end": 2071, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2054, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2054, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 2054, + "end": 2058, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 67, + "column": 13 + }, + "end": { + "line": 67, + "column": 17 + } + }, + "name": "args" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 2066, + "end": 2070, + "loc": { + "start": { + "line": 67, + "column": 20 + }, + "end": { + "line": 67, + "column": 24 + } + }, + "name": "args" + } + } + } + ] + } + } + ] + } + } + ] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "Block", + "value": "*\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n ", + "start": 159, + "end": 501, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 16, + "column": 3 + } + }, + "range": [ + 159, + 501 + ] + } + ], + "trailingComments": [] + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/__tests__/AssertStreamTest.js.json b/docs/ast/source/__tests__/AssertStreamTest.js.json new file mode 100644 index 0000000..cf35fbc --- /dev/null +++ b/docs/ast/source/__tests__/AssertStreamTest.js.json @@ -0,0 +1,10938 @@ +{ + "type": "Program", + "start": 0, + "end": 4025, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 115, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "AssertStream" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "value": "../AssertStream", + "rawValue": "../AssertStream", + "raw": "\"../AssertStream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 44, + "end": 70, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 51, + "end": 56, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 51, + "end": 56, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "name": "sinon" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 62, + "end": 69, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "value": "sinon", + "rawValue": "sinon", + "raw": "\"sinon\"" + } + }, + { + "type": "ImportDeclaration", + "start": 71, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 80, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 94, + "end": 100, + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExpressionStatement", + "start": 103, + "end": 4024, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 114, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 103, + "end": 4023, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 114, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 103, + "end": 111, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 112, + "end": 130, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "value": "AssertStreamTest", + "rawValue": "AssertStreamTest", + "raw": "\"AssertStreamTest\"" + }, + { + "type": "FunctionExpression", + "start": 132, + "end": 4022, + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 114, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 143, + "end": 4022, + "loc": { + "start": { + "line": 5, + "column": 40 + }, + "end": { + "line": 114, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 149, + "end": 1277, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 37, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 149, + "end": 1276, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 37, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 149, + "end": 151, + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 152, + "end": 245, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 100 + } + }, + "value": "writes to an assert stream with a value expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a value expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a value expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 247, + "end": 1275, + "loc": { + "start": { + "line": 6, + "column": 102 + }, + "end": { + "line": 37, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 256, + "end": 260, + "loc": { + "start": { + "line": 6, + "column": 111 + }, + "end": { + "line": 6, + "column": 115 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 262, + "end": 1275, + "loc": { + "start": { + "line": 6, + "column": 117 + }, + "end": { + "line": 37, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 272, + "end": 299, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 278, + "end": 298, + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 278, + "end": 284, + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 287, + "end": 298, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 287, + "end": 296, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 287, + "end": 292, + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 293, + "end": 296, + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 308, + "end": 335, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 314, + "end": 334, + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 314, + "end": 319, + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "CallExpression", + "start": 323, + "end": 334, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 323, + "end": 332, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 323, + "end": 328, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 329, + "end": 332, + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 344, + "end": 488, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 14, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 350, + "end": 487, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 14, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 350, + "end": 356, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 359, + "end": 487, + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 14, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 363, + "end": 375, + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 376, + "end": 412, + "loc": { + "start": { + "line": 9, + "column": 40 + }, + "end": { + "line": 11, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 390, + "end": 402, + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 390, + "end": 394, + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 396, + "end": 402, + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + }, + { + "type": "ObjectExpression", + "start": 414, + "end": 486, + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 14, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 428, + "end": 446, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 30 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 428, + "end": 434, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 440, + "end": 446, + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 30 + } + }, + "name": "tapSpy" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 460, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 460, + "end": 470, + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 472, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 498, + "end": 523, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 498, + "end": 522, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 498, + "end": 507, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 498, + "end": 504, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 505, + "end": 507, + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 508, + "end": 514, + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 516, + "end": 521, + "loc": { + "start": { + "line": 16, + "column": 26 + }, + "end": { + "line": 16, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 533, + "end": 553, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 533, + "end": 552, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 533, + "end": 545, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 533, + "end": 539, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 540, + "end": 545, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 546, + "end": 551, + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 562, + "end": 579, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 562, + "end": 578, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 562, + "end": 574, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 562, + "end": 568, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 569, + "end": 574, + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 575, + "end": 577, + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 23 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 588, + "end": 639, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 22, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 588, + "end": 638, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 22, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 588, + "end": 600, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 588, + "end": 594, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 595, + "end": 600, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 601, + "end": 637, + "loc": { + "start": { + "line": 20, + "column": 21 + }, + "end": { + "line": 22, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 615, + "end": 627, + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 615, + "end": 619, + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 621, + "end": 627, + "loc": { + "start": { + "line": 21, + "column": 18 + }, + "end": { + "line": 21, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 649, + "end": 1269, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 36, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 649, + "end": 1268, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 36, + "column": 14 + } + }, + "callee": { + "type": "Identifier", + "start": 649, + "end": 659, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "FunctionExpression", + "start": 660, + "end": 1263, + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 36, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 671, + "end": 1263, + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 36, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 685, + "end": 721, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "expression": { + "type": "CallExpression", + "start": 685, + "end": 720, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 47 + } + }, + "callee": { + "type": "MemberExpression", + "start": 685, + "end": 717, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 685, + "end": 711, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "object": { + "type": "CallExpression", + "start": 685, + "end": 708, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 685, + "end": 691, + "loc": { + "start": { + "line": 25, + "column": 12 + }, + "end": { + "line": 25, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 692, + "end": 707, + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 692, + "end": 697, + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 24 + } + }, + "name": "onEnd" + }, + "property": { + "type": "Identifier", + "start": 698, + "end": 707, + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 34 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 709, + "end": 711, + "loc": { + "start": { + "line": 25, + "column": 36 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 712, + "end": 717, + "loc": { + "start": { + "line": 25, + "column": 39 + }, + "end": { + "line": 25, + "column": 44 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 718, + "end": 719, + "loc": { + "start": { + "line": 25, + "column": 45 + }, + "end": { + "line": 25, + "column": 46 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 734, + "end": 788, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 66 + } + }, + "expression": { + "type": "CallExpression", + "start": 734, + "end": 787, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 734, + "end": 780, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 734, + "end": 774, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 734, + "end": 771, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 734, + "end": 740, + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 741, + "end": 770, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 741, + "end": 768, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 741, + "end": 762, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 741, + "end": 757, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 741, + "end": 747, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 748, + "end": 757, + "loc": { + "start": { + "line": 26, + "column": 26 + }, + "end": { + "line": 26, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 758, + "end": 762, + "loc": { + "start": { + "line": 26, + "column": 36 + }, + "end": { + "line": 26, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 763, + "end": 768, + "loc": { + "start": { + "line": 26, + "column": 41 + }, + "end": { + "line": 26, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 772, + "end": 774, + "loc": { + "start": { + "line": 26, + "column": 50 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 775, + "end": 780, + "loc": { + "start": { + "line": 26, + "column": 53 + }, + "end": { + "line": 26, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 781, + "end": 786, + "loc": { + "start": { + "line": 26, + "column": 59 + }, + "end": { + "line": 26, + "column": 64 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 801, + "end": 851, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 801, + "end": 850, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 801, + "end": 847, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 801, + "end": 841, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 801, + "end": 838, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 801, + "end": 807, + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 27, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 808, + "end": 837, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 808, + "end": 835, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 808, + "end": 829, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 808, + "end": 824, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 808, + "end": 814, + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 815, + "end": 824, + "loc": { + "start": { + "line": 27, + "column": 26 + }, + "end": { + "line": 27, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 825, + "end": 829, + "loc": { + "start": { + "line": 27, + "column": 36 + }, + "end": { + "line": 27, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 830, + "end": 835, + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 839, + "end": 841, + "loc": { + "start": { + "line": 27, + "column": 50 + }, + "end": { + "line": 27, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 842, + "end": 847, + "loc": { + "start": { + "line": 27, + "column": 53 + }, + "end": { + "line": 27, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 848, + "end": 849, + "loc": { + "start": { + "line": 27, + "column": 59 + }, + "end": { + "line": 27, + "column": 60 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 864, + "end": 914, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 864, + "end": 913, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 864, + "end": 909, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 57 + } + }, + "object": { + "type": "MemberExpression", + "start": 864, + "end": 905, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 53 + } + }, + "object": { + "type": "CallExpression", + "start": 864, + "end": 902, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 50 + } + }, + "callee": { + "type": "Identifier", + "start": 864, + "end": 870, + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 871, + "end": 901, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 871, + "end": 899, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 871, + "end": 893, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 41 + } + }, + "object": { + "type": "MemberExpression", + "start": 871, + "end": 888, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 871, + "end": 877, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 878, + "end": 888, + "loc": { + "start": { + "line": 28, + "column": 26 + }, + "end": { + "line": 28, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 889, + "end": 893, + "loc": { + "start": { + "line": 28, + "column": 37 + }, + "end": { + "line": 28, + "column": 41 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 894, + "end": 899, + "loc": { + "start": { + "line": 28, + "column": 42 + }, + "end": { + "line": 28, + "column": 47 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 903, + "end": 905, + "loc": { + "start": { + "line": 28, + "column": 51 + }, + "end": { + "line": 28, + "column": 53 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 906, + "end": 909, + "loc": { + "start": { + "line": 28, + "column": 54 + }, + "end": { + "line": 28, + "column": 57 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 910, + "end": 912, + "loc": { + "start": { + "line": 28, + "column": 58 + }, + "end": { + "line": 28, + "column": 60 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 927, + "end": 978, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 63 + } + }, + "expression": { + "type": "CallExpression", + "start": 927, + "end": 977, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 927, + "end": 974, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 59 + } + }, + "object": { + "type": "MemberExpression", + "start": 927, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 53 + } + }, + "object": { + "type": "CallExpression", + "start": 927, + "end": 965, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 50 + } + }, + "callee": { + "type": "Identifier", + "start": 927, + "end": 933, + "loc": { + "start": { + "line": 29, + "column": 12 + }, + "end": { + "line": 29, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 934, + "end": 964, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 934, + "end": 962, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 934, + "end": 956, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 41 + } + }, + "object": { + "type": "MemberExpression", + "start": 934, + "end": 951, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 934, + "end": 940, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 941, + "end": 951, + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 952, + "end": 956, + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 957, + "end": 962, + "loc": { + "start": { + "line": 29, + "column": 42 + }, + "end": { + "line": 29, + "column": 47 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 966, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 53 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 969, + "end": 974, + "loc": { + "start": { + "line": 29, + "column": 54 + }, + "end": { + "line": 29, + "column": 59 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 975, + "end": 976, + "loc": { + "start": { + "line": 29, + "column": 60 + }, + "end": { + "line": 29, + "column": 61 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 991, + "end": 1082, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 32, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 991, + "end": 1081, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 32, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 991, + "end": 1035, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 991, + "end": 1031, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 991, + "end": 1028, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 991, + "end": 997, + "loc": { + "start": { + "line": 30, + "column": 12 + }, + "end": { + "line": 30, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 998, + "end": 1027, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 998, + "end": 1025, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 998, + "end": 1019, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 998, + "end": 1014, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 998, + "end": 1004, + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 1005, + "end": 1014, + "loc": { + "start": { + "line": 30, + "column": 26 + }, + "end": { + "line": 30, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1015, + "end": 1019, + "loc": { + "start": { + "line": 30, + "column": 36 + }, + "end": { + "line": 30, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1020, + "end": 1025, + "loc": { + "start": { + "line": 30, + "column": 41 + }, + "end": { + "line": 30, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1029, + "end": 1031, + "loc": { + "start": { + "line": 30, + "column": 50 + }, + "end": { + "line": 30, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1032, + "end": 1035, + "loc": { + "start": { + "line": 30, + "column": 53 + }, + "end": { + "line": 30, + "column": 56 + } + }, + "name": "eql" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1036, + "end": 1080, + "loc": { + "start": { + "line": 30, + "column": 57 + }, + "end": { + "line": 32, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 1054, + "end": 1066, + "loc": { + "start": { + "line": 31, + "column": 16 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1054, + "end": 1058, + "loc": { + "start": { + "line": 31, + "column": 16 + }, + "end": { + "line": 31, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1060, + "end": 1066, + "loc": { + "start": { + "line": 31, + "column": 22 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1095, + "end": 1145, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 1095, + "end": 1144, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1095, + "end": 1141, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 1095, + "end": 1135, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 1095, + "end": 1132, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 1095, + "end": 1101, + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1102, + "end": 1131, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1102, + "end": 1129, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1102, + "end": 1123, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 1102, + "end": 1118, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 1102, + "end": 1108, + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 1109, + "end": 1118, + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1119, + "end": 1123, + "loc": { + "start": { + "line": 33, + "column": 36 + }, + "end": { + "line": 33, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1124, + "end": 1129, + "loc": { + "start": { + "line": 33, + "column": 41 + }, + "end": { + "line": 33, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1133, + "end": 1135, + "loc": { + "start": { + "line": 33, + "column": 50 + }, + "end": { + "line": 33, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1136, + "end": 1141, + "loc": { + "start": { + "line": 33, + "column": 53 + }, + "end": { + "line": 33, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1142, + "end": 1143, + "loc": { + "start": { + "line": 33, + "column": 59 + }, + "end": { + "line": 33, + "column": 60 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1158, + "end": 1210, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 1158, + "end": 1209, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1158, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 1158, + "end": 1196, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 1158, + "end": 1193, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1158, + "end": 1164, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1165, + "end": 1192, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1165, + "end": 1186, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 1165, + "end": 1171, + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1172, + "end": 1186, + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1187, + "end": 1192, + "loc": { + "start": { + "line": 34, + "column": 41 + }, + "end": { + "line": 34, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1194, + "end": 1196, + "loc": { + "start": { + "line": 34, + "column": 48 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1197, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 51 + }, + "end": { + "line": 34, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1203, + "end": 1208, + "loc": { + "start": { + "line": 34, + "column": 57 + }, + "end": { + "line": 34, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1211, + "end": 1233, + "loc": { + "start": { + "line": 34, + "column": 65 + }, + "end": { + "line": 34, + "column": 87 + } + }, + "range": [ + 1211, + 1233 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1246, + "end": 1253, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 1246, + "end": 1252, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 1246, + "end": 1250, + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1211, + "end": 1233, + "loc": { + "start": { + "line": 34, + "column": 65 + }, + "end": { + "line": 34, + "column": 87 + } + }, + "range": [ + 1211, + 1233 + ] + } + ] + } + ] + } + }, + { + "type": "Literal", + "start": 1265, + "end": 1267, + "loc": { + "start": { + "line": 36, + "column": 11 + }, + "end": { + "line": 36, + "column": 13 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1283, + "end": 1878, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 56, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1283, + "end": 1877, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 56, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1283, + "end": 1285, + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1286, + "end": 1382, + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 103 + } + }, + "value": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a function expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 1384, + "end": 1876, + "loc": { + "start": { + "line": 39, + "column": 105 + }, + "end": { + "line": 56, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1393, + "end": 1397, + "loc": { + "start": { + "line": 39, + "column": 114 + }, + "end": { + "line": 39, + "column": 118 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1399, + "end": 1876, + "loc": { + "start": { + "line": 39, + "column": 120 + }, + "end": { + "line": 56, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1409, + "end": 1436, + "loc": { + "start": { + "line": 40, + "column": 8 + }, + "end": { + "line": 40, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1415, + "end": 1435, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 1415, + "end": 1420, + "loc": { + "start": { + "line": 40, + "column": 14 + }, + "end": { + "line": 40, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "CallExpression", + "start": 1424, + "end": 1435, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1424, + "end": 1433, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 1424, + "end": 1429, + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 1430, + "end": 1433, + "loc": { + "start": { + "line": 40, + "column": 29 + }, + "end": { + "line": 40, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 1445, + "end": 1513, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 76 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1451, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 75 + } + }, + "id": { + "type": "Identifier", + "start": 1451, + "end": 1457, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 1460, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 23 + }, + "end": { + "line": 41, + "column": 75 + } + }, + "callee": { + "type": "Identifier", + "start": 1464, + "end": 1476, + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 41, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 1477, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 40 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1477, + "end": 1478, + "loc": { + "start": { + "line": 41, + "column": 40 + }, + "end": { + "line": 41, + "column": 41 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 1482, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "test": { + "type": "BinaryExpression", + "start": 1482, + "end": 1499, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 62 + } + }, + "left": { + "type": "MemberExpression", + "start": 1482, + "end": 1488, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "object": { + "type": "Identifier", + "start": 1482, + "end": 1483, + "loc": { + "start": { + "line": 41, + "column": 45 + }, + "end": { + "line": 41, + "column": 46 + } + }, + "name": "x" + }, + "property": { + "type": "Identifier", + "start": 1484, + "end": 1488, + "loc": { + "start": { + "line": 41, + "column": 47 + }, + "end": { + "line": 41, + "column": 51 + } + }, + "name": "test" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 1493, + "end": 1499, + "loc": { + "start": { + "line": 41, + "column": 56 + }, + "end": { + "line": 41, + "column": 62 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + }, + "consequent": { + "type": "Literal", + "start": 1502, + "end": 1503, + "loc": { + "start": { + "line": 41, + "column": 65 + }, + "end": { + "line": 41, + "column": 66 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "Literal", + "start": 1506, + "end": 1507, + "loc": { + "start": { + "line": 41, + "column": 69 + }, + "end": { + "line": 41, + "column": 70 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + } + }, + { + "type": "ObjectExpression", + "start": 1509, + "end": 1511, + "loc": { + "start": { + "line": 41, + "column": 72 + }, + "end": { + "line": 41, + "column": 74 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1523, + "end": 1548, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 1523, + "end": 1547, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1523, + "end": 1532, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 1523, + "end": 1529, + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1530, + "end": 1532, + "loc": { + "start": { + "line": 43, + "column": 15 + }, + "end": { + "line": 43, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1533, + "end": 1539, + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 1541, + "end": 1546, + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 43, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1558, + "end": 1578, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 1558, + "end": 1577, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1558, + "end": 1570, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1558, + "end": 1564, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1565, + "end": 1570, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1571, + "end": 1576, + "loc": { + "start": { + "line": 45, + "column": 21 + }, + "end": { + "line": 45, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1587, + "end": 1604, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 1587, + "end": 1603, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1587, + "end": 1599, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1587, + "end": 1593, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1594, + "end": 1599, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1600, + "end": 1602, + "loc": { + "start": { + "line": 46, + "column": 21 + }, + "end": { + "line": 46, + "column": 23 + } + }, + "properties": [] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1613, + "end": 1664, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 49, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 1613, + "end": 1663, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 49, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1613, + "end": 1625, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 1613, + "end": 1619, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1620, + "end": 1625, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1626, + "end": 1662, + "loc": { + "start": { + "line": 47, + "column": 21 + }, + "end": { + "line": 49, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1640, + "end": 1652, + "loc": { + "start": { + "line": 48, + "column": 12 + }, + "end": { + "line": 48, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1640, + "end": 1644, + "loc": { + "start": { + "line": 48, + "column": 12 + }, + "end": { + "line": 48, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1646, + "end": 1652, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 24 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1674, + "end": 1870, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 55, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 1674, + "end": 1869, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 55, + "column": 14 + } + }, + "callee": { + "type": "Identifier", + "start": 1674, + "end": 1684, + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "FunctionExpression", + "start": 1685, + "end": 1864, + "loc": { + "start": { + "line": 51, + "column": 19 + }, + "end": { + "line": 55, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1696, + "end": 1864, + "loc": { + "start": { + "line": 51, + "column": 30 + }, + "end": { + "line": 55, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1710, + "end": 1746, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 48 + } + }, + "expression": { + "type": "CallExpression", + "start": 1710, + "end": 1745, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 47 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1710, + "end": 1742, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "object": { + "type": "MemberExpression", + "start": 1710, + "end": 1736, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 38 + } + }, + "object": { + "type": "CallExpression", + "start": 1710, + "end": 1733, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 1710, + "end": 1716, + "loc": { + "start": { + "line": 52, + "column": 12 + }, + "end": { + "line": 52, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1717, + "end": 1732, + "loc": { + "start": { + "line": 52, + "column": 19 + }, + "end": { + "line": 52, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 1717, + "end": 1722, + "loc": { + "start": { + "line": 52, + "column": 19 + }, + "end": { + "line": 52, + "column": 24 + } + }, + "name": "onEnd" + }, + "property": { + "type": "Identifier", + "start": 1723, + "end": 1732, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 34 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1734, + "end": 1736, + "loc": { + "start": { + "line": 52, + "column": 36 + }, + "end": { + "line": 52, + "column": 38 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1737, + "end": 1742, + "loc": { + "start": { + "line": 52, + "column": 39 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1743, + "end": 1744, + "loc": { + "start": { + "line": 52, + "column": 45 + }, + "end": { + "line": 52, + "column": 46 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1759, + "end": 1811, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 1759, + "end": 1810, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1759, + "end": 1803, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 1759, + "end": 1797, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 1759, + "end": 1794, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1759, + "end": 1765, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 1766, + "end": 1793, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 1766, + "end": 1787, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 1766, + "end": 1772, + "loc": { + "start": { + "line": 53, + "column": 19 + }, + "end": { + "line": 53, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 1773, + "end": 1787, + "loc": { + "start": { + "line": 53, + "column": 26 + }, + "end": { + "line": 53, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1788, + "end": 1793, + "loc": { + "start": { + "line": 53, + "column": 41 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 1795, + "end": 1797, + "loc": { + "start": { + "line": 53, + "column": 48 + }, + "end": { + "line": 53, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1798, + "end": 1803, + "loc": { + "start": { + "line": 53, + "column": 51 + }, + "end": { + "line": 53, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1804, + "end": 1809, + "loc": { + "start": { + "line": 53, + "column": 57 + }, + "end": { + "line": 53, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1812, + "end": 1834, + "loc": { + "start": { + "line": 53, + "column": 65 + }, + "end": { + "line": 53, + "column": 87 + } + }, + "range": [ + 1812, + 1834 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1847, + "end": 1854, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 1847, + "end": 1853, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 1847, + "end": 1851, + "loc": { + "start": { + "line": 54, + "column": 12 + }, + "end": { + "line": 54, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1812, + "end": 1834, + "loc": { + "start": { + "line": 53, + "column": 65 + }, + "end": { + "line": 53, + "column": 87 + } + }, + "range": [ + 1812, + 1834 + ] + } + ] + } + ] + } + }, + { + "type": "Literal", + "start": 1866, + "end": 1868, + "loc": { + "start": { + "line": 55, + "column": 11 + }, + "end": { + "line": 55, + "column": 13 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1884, + "end": 2573, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 73, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1884, + "end": 2572, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 73, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1884, + "end": 1886, + "loc": { + "start": { + "line": 58, + "column": 4 + }, + "end": { + "line": 58, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1887, + "end": 1983, + "loc": { + "start": { + "line": 58, + "column": 7 + }, + "end": { + "line": 58, + "column": 103 + } + }, + "value": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "rawValue": "writes to an assert stream with a function expectation, until it ends with the expected value.", + "raw": "\"writes to an assert stream with a function expectation, until it ends with the expected value.\"" + }, + { + "type": "FunctionExpression", + "start": 1985, + "end": 2571, + "loc": { + "start": { + "line": 58, + "column": 105 + }, + "end": { + "line": 73, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1994, + "end": 1998, + "loc": { + "start": { + "line": 58, + "column": 114 + }, + "end": { + "line": 58, + "column": 118 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2000, + "end": 2571, + "loc": { + "start": { + "line": 58, + "column": 120 + }, + "end": { + "line": 73, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2010, + "end": 2037, + "loc": { + "start": { + "line": 59, + "column": 8 + }, + "end": { + "line": 59, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2016, + "end": 2036, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 2016, + "end": 2022, + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 2025, + "end": 2036, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2025, + "end": 2034, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2025, + "end": 2030, + "loc": { + "start": { + "line": 59, + "column": 23 + }, + "end": { + "line": 59, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 2031, + "end": 2034, + "loc": { + "start": { + "line": 59, + "column": 29 + }, + "end": { + "line": 59, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2046, + "end": 2151, + "loc": { + "start": { + "line": 60, + "column": 8 + }, + "end": { + "line": 62, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2052, + "end": 2150, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 62, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2052, + "end": 2058, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2061, + "end": 2150, + "loc": { + "start": { + "line": 60, + "column": 23 + }, + "end": { + "line": 62, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 2065, + "end": 2077, + "loc": { + "start": { + "line": 60, + "column": 27 + }, + "end": { + "line": 60, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2078, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2078, + "end": 2079, + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 41 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2083, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2083, + "end": 2100, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 62 + } + }, + "left": { + "type": "MemberExpression", + "start": 2083, + "end": 2089, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 51 + } + }, + "object": { + "type": "Identifier", + "start": 2083, + "end": 2084, + "loc": { + "start": { + "line": 60, + "column": 45 + }, + "end": { + "line": 60, + "column": 46 + } + }, + "name": "x" + }, + "property": { + "type": "Identifier", + "start": 2085, + "end": 2089, + "loc": { + "start": { + "line": 60, + "column": 47 + }, + "end": { + "line": 60, + "column": 51 + } + }, + "name": "test" + }, + "computed": false + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 2094, + "end": 2100, + "loc": { + "start": { + "line": 60, + "column": 56 + }, + "end": { + "line": 60, + "column": 62 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + }, + "consequent": { + "type": "Literal", + "start": 2103, + "end": 2104, + "loc": { + "start": { + "line": 60, + "column": 65 + }, + "end": { + "line": 60, + "column": 66 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 2107, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 69 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2108, + "end": 2109, + "loc": { + "start": { + "line": 60, + "column": 70 + }, + "end": { + "line": 60, + "column": 71 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + }, + { + "type": "ObjectExpression", + "start": 2111, + "end": 2149, + "loc": { + "start": { + "line": 60, + "column": 73 + }, + "end": { + "line": 62, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2125, + "end": 2139, + "loc": { + "start": { + "line": 61, + "column": 12 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2125, + "end": 2131, + "loc": { + "start": { + "line": 61, + "column": 12 + }, + "end": { + "line": 61, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 2133, + "end": 2139, + "loc": { + "start": { + "line": 61, + "column": 20 + }, + "end": { + "line": 61, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2161, + "end": 2535, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 70, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 2161, + "end": 2534, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 70, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2161, + "end": 2170, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 2161, + "end": 2167, + "loc": { + "start": { + "line": 64, + "column": 8 + }, + "end": { + "line": 64, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2168, + "end": 2170, + "loc": { + "start": { + "line": 64, + "column": 15 + }, + "end": { + "line": 64, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2171, + "end": 2178, + "loc": { + "start": { + "line": 64, + "column": 18 + }, + "end": { + "line": 64, + "column": 25 + } + }, + "value": "error", + "rawValue": "error", + "raw": "\"error\"" + }, + { + "type": "ArrowFunctionExpression", + "start": 2180, + "end": 2533, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 70, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2180, + "end": 2181, + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 28 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 2185, + "end": 2533, + "loc": { + "start": { + "line": 64, + "column": 32 + }, + "end": { + "line": 70, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2199, + "end": 2284, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 97 + } + }, + "expression": { + "type": "CallExpression", + "start": 2199, + "end": 2283, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 96 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2199, + "end": 2225, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "object": { + "type": "MemberExpression", + "start": 2199, + "end": 2219, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "object": { + "type": "CallExpression", + "start": 2199, + "end": 2216, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "callee": { + "type": "Identifier", + "start": 2199, + "end": 2205, + "loc": { + "start": { + "line": 65, + "column": 12 + }, + "end": { + "line": 65, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2206, + "end": 2215, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 28 + } + }, + "object": { + "type": "Identifier", + "start": 2206, + "end": 2207, + "loc": { + "start": { + "line": 65, + "column": 19 + }, + "end": { + "line": 65, + "column": 20 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 2208, + "end": 2215, + "loc": { + "start": { + "line": 65, + "column": 21 + }, + "end": { + "line": 65, + "column": 28 + } + }, + "name": "message" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2217, + "end": 2219, + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 32 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2220, + "end": 2225, + "loc": { + "start": { + "line": 65, + "column": 33 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2226, + "end": 2282, + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 95 + } + }, + "value": "the messages [\"bla\"] do not match your expectations.", + "rawValue": "the messages [\"bla\"] do not match your expectations.", + "raw": "\"the messages [\\\"bla\\\"] do not match your expectations.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2297, + "end": 2351, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 66 + } + }, + "expression": { + "type": "CallExpression", + "start": 2297, + "end": 2350, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2297, + "end": 2343, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 2297, + "end": 2337, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 2297, + "end": 2334, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 2297, + "end": 2303, + "loc": { + "start": { + "line": 66, + "column": 12 + }, + "end": { + "line": 66, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2304, + "end": 2333, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2304, + "end": 2331, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2304, + "end": 2325, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2304, + "end": 2320, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2304, + "end": 2310, + "loc": { + "start": { + "line": 66, + "column": 19 + }, + "end": { + "line": 66, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2311, + "end": 2320, + "loc": { + "start": { + "line": 66, + "column": 26 + }, + "end": { + "line": 66, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2321, + "end": 2325, + "loc": { + "start": { + "line": 66, + "column": 36 + }, + "end": { + "line": 66, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2326, + "end": 2331, + "loc": { + "start": { + "line": 66, + "column": 41 + }, + "end": { + "line": 66, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2335, + "end": 2337, + "loc": { + "start": { + "line": 66, + "column": 50 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2338, + "end": 2343, + "loc": { + "start": { + "line": 66, + "column": 53 + }, + "end": { + "line": 66, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2344, + "end": 2349, + "loc": { + "start": { + "line": 66, + "column": 59 + }, + "end": { + "line": 66, + "column": 64 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2364, + "end": 2415, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 63 + } + }, + "expression": { + "type": "CallExpression", + "start": 2364, + "end": 2414, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2364, + "end": 2410, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 2364, + "end": 2404, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "object": { + "type": "CallExpression", + "start": 2364, + "end": 2401, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 2364, + "end": 2370, + "loc": { + "start": { + "line": 67, + "column": 12 + }, + "end": { + "line": 67, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2371, + "end": 2400, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2371, + "end": 2398, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2371, + "end": 2392, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 40 + } + }, + "object": { + "type": "MemberExpression", + "start": 2371, + "end": 2387, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2371, + "end": 2377, + "loc": { + "start": { + "line": 67, + "column": 19 + }, + "end": { + "line": 67, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2378, + "end": 2387, + "loc": { + "start": { + "line": 67, + "column": 26 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2388, + "end": 2392, + "loc": { + "start": { + "line": 67, + "column": 36 + }, + "end": { + "line": 67, + "column": 40 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2393, + "end": 2398, + "loc": { + "start": { + "line": 67, + "column": 41 + }, + "end": { + "line": 67, + "column": 46 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2402, + "end": 2404, + "loc": { + "start": { + "line": 67, + "column": 50 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2405, + "end": 2410, + "loc": { + "start": { + "line": 67, + "column": 53 + }, + "end": { + "line": 67, + "column": 58 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 2411, + "end": 2413, + "loc": { + "start": { + "line": 67, + "column": 59 + }, + "end": { + "line": 67, + "column": 61 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2412, + "end": 2413, + "loc": { + "start": { + "line": 67, + "column": 60 + }, + "end": { + "line": 67, + "column": 61 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2428, + "end": 2480, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 2428, + "end": 2479, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2428, + "end": 2472, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 2428, + "end": 2466, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 2428, + "end": 2463, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 2428, + "end": 2434, + "loc": { + "start": { + "line": 68, + "column": 12 + }, + "end": { + "line": 68, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2435, + "end": 2462, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2435, + "end": 2456, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 2435, + "end": 2441, + "loc": { + "start": { + "line": 68, + "column": 19 + }, + "end": { + "line": 68, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2442, + "end": 2456, + "loc": { + "start": { + "line": 68, + "column": 26 + }, + "end": { + "line": 68, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2457, + "end": 2462, + "loc": { + "start": { + "line": 68, + "column": 41 + }, + "end": { + "line": 68, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2464, + "end": 2466, + "loc": { + "start": { + "line": 68, + "column": 48 + }, + "end": { + "line": 68, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2467, + "end": 2472, + "loc": { + "start": { + "line": 68, + "column": 51 + }, + "end": { + "line": 68, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2473, + "end": 2478, + "loc": { + "start": { + "line": 68, + "column": 57 + }, + "end": { + "line": 68, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2481, + "end": 2503, + "loc": { + "start": { + "line": 68, + "column": 65 + }, + "end": { + "line": 68, + "column": 87 + } + }, + "range": [ + 2481, + 2503 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 2516, + "end": 2523, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 2516, + "end": 2522, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 2516, + "end": 2520, + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2481, + "end": 2503, + "loc": { + "start": { + "line": 68, + "column": 65 + }, + "end": { + "line": 68, + "column": 87 + } + }, + "range": [ + 2481, + 2503 + ] + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2545, + "end": 2565, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 2545, + "end": 2564, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 27 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2545, + "end": 2557, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 2545, + "end": 2551, + "loc": { + "start": { + "line": 72, + "column": 8 + }, + "end": { + "line": 72, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2552, + "end": 2557, + "loc": { + "start": { + "line": 72, + "column": 15 + }, + "end": { + "line": 72, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2558, + "end": 2563, + "loc": { + "start": { + "line": 72, + "column": 21 + }, + "end": { + "line": 72, + "column": 26 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2579, + "end": 3280, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 92, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2579, + "end": 3279, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 92, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2579, + "end": 2581, + "loc": { + "start": { + "line": 75, + "column": 4 + }, + "end": { + "line": 75, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2582, + "end": 2642, + "loc": { + "start": { + "line": 75, + "column": 7 + }, + "end": { + "line": 75, + "column": 67 + } + }, + "value": "writes to an assert stream, that expects multiple messages", + "rawValue": "writes to an assert stream, that expects multiple messages", + "raw": "\"writes to an assert stream, that expects multiple messages\"" + }, + { + "type": "FunctionExpression", + "start": 2644, + "end": 3278, + "loc": { + "start": { + "line": 75, + "column": 69 + }, + "end": { + "line": 92, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2653, + "end": 2657, + "loc": { + "start": { + "line": 75, + "column": 78 + }, + "end": { + "line": 75, + "column": 82 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2659, + "end": 3278, + "loc": { + "start": { + "line": 75, + "column": 84 + }, + "end": { + "line": 92, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2669, + "end": 2696, + "loc": { + "start": { + "line": 76, + "column": 8 + }, + "end": { + "line": 76, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2675, + "end": 2695, + "loc": { + "start": { + "line": 76, + "column": 14 + }, + "end": { + "line": 76, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 2675, + "end": 2681, + "loc": { + "start": { + "line": 76, + "column": 14 + }, + "end": { + "line": 76, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 2684, + "end": 2695, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2684, + "end": 2693, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2684, + "end": 2689, + "loc": { + "start": { + "line": 76, + "column": 23 + }, + "end": { + "line": 76, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 2690, + "end": 2693, + "loc": { + "start": { + "line": 76, + "column": 29 + }, + "end": { + "line": 76, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2705, + "end": 2806, + "loc": { + "start": { + "line": 77, + "column": 8 + }, + "end": { + "line": 79, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2711, + "end": 2805, + "loc": { + "start": { + "line": 77, + "column": 14 + }, + "end": { + "line": 79, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2711, + "end": 2717, + "loc": { + "start": { + "line": 77, + "column": 14 + }, + "end": { + "line": 77, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2720, + "end": 2805, + "loc": { + "start": { + "line": 77, + "column": 23 + }, + "end": { + "line": 79, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 2724, + "end": 2736, + "loc": { + "start": { + "line": 77, + "column": 27 + }, + "end": { + "line": 77, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2737, + "end": 2764, + "loc": { + "start": { + "line": 77, + "column": 40 + }, + "end": { + "line": 77, + "column": 67 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2738, + "end": 2745, + "loc": { + "start": { + "line": 77, + "column": 41 + }, + "end": { + "line": 77, + "column": 48 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 2747, + "end": 2754, + "loc": { + "start": { + "line": 77, + "column": 50 + }, + "end": { + "line": 77, + "column": 57 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 2756, + "end": 2763, + "loc": { + "start": { + "line": 77, + "column": 59 + }, + "end": { + "line": 77, + "column": 66 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 2766, + "end": 2804, + "loc": { + "start": { + "line": 77, + "column": 69 + }, + "end": { + "line": 79, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2780, + "end": 2794, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 78, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2780, + "end": 2786, + "loc": { + "start": { + "line": 78, + "column": 12 + }, + "end": { + "line": 78, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 2788, + "end": 2794, + "loc": { + "start": { + "line": 78, + "column": 20 + }, + "end": { + "line": 78, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2815, + "end": 3144, + "loc": { + "start": { + "line": 80, + "column": 8 + }, + "end": { + "line": 86, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2821, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 14 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 2821, + "end": 2826, + "loc": { + "start": { + "line": 80, + "column": 14 + }, + "end": { + "line": 80, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "FunctionExpression", + "start": 2829, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2840, + "end": 3143, + "loc": { + "start": { + "line": 80, + "column": 33 + }, + "end": { + "line": 86, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2854, + "end": 2902, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 2854, + "end": 2901, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2854, + "end": 2860, + "loc": { + "start": { + "line": 81, + "column": 12 + }, + "end": { + "line": 81, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2861, + "end": 2900, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2861, + "end": 2888, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2861, + "end": 2877, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2861, + "end": 2867, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2868, + "end": 2877, + "loc": { + "start": { + "line": 81, + "column": 26 + }, + "end": { + "line": 81, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2878, + "end": 2888, + "loc": { + "start": { + "line": 81, + "column": 36 + }, + "end": { + "line": 81, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2889, + "end": 2896, + "loc": { + "start": { + "line": 81, + "column": 47 + }, + "end": { + "line": 81, + "column": 54 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 2898, + "end": 2899, + "loc": { + "start": { + "line": 81, + "column": 56 + }, + "end": { + "line": 81, + "column": 57 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2915, + "end": 2964, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 61 + } + }, + "expression": { + "type": "CallExpression", + "start": 2915, + "end": 2963, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 2915, + "end": 2921, + "loc": { + "start": { + "line": 82, + "column": 12 + }, + "end": { + "line": 82, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2922, + "end": 2962, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 59 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2922, + "end": 2950, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 2922, + "end": 2939, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 2922, + "end": 2928, + "loc": { + "start": { + "line": 82, + "column": 19 + }, + "end": { + "line": 82, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2929, + "end": 2939, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2940, + "end": 2950, + "loc": { + "start": { + "line": 82, + "column": 37 + }, + "end": { + "line": 82, + "column": 47 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2951, + "end": 2958, + "loc": { + "start": { + "line": 82, + "column": 48 + }, + "end": { + "line": 82, + "column": 55 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 2960, + "end": 2961, + "loc": { + "start": { + "line": 82, + "column": 57 + }, + "end": { + "line": 82, + "column": 58 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2977, + "end": 3025, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 2977, + "end": 3024, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2977, + "end": 2983, + "loc": { + "start": { + "line": 83, + "column": 12 + }, + "end": { + "line": 83, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2984, + "end": 3023, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2984, + "end": 3011, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 2984, + "end": 3000, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 2984, + "end": 2990, + "loc": { + "start": { + "line": 83, + "column": 19 + }, + "end": { + "line": 83, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 2991, + "end": 3000, + "loc": { + "start": { + "line": 83, + "column": 26 + }, + "end": { + "line": 83, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3001, + "end": 3011, + "loc": { + "start": { + "line": 83, + "column": 36 + }, + "end": { + "line": 83, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3012, + "end": 3019, + "loc": { + "start": { + "line": 83, + "column": 47 + }, + "end": { + "line": 83, + "column": 54 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + }, + { + "type": "Literal", + "start": 3021, + "end": 3022, + "loc": { + "start": { + "line": 83, + "column": 56 + }, + "end": { + "line": 83, + "column": 57 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3038, + "end": 3090, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 3038, + "end": 3089, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3038, + "end": 3082, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 3038, + "end": 3076, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 3038, + "end": 3073, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 3038, + "end": 3044, + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3045, + "end": 3072, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3045, + "end": 3066, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 3045, + "end": 3051, + "loc": { + "start": { + "line": 84, + "column": 19 + }, + "end": { + "line": 84, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3052, + "end": 3066, + "loc": { + "start": { + "line": 84, + "column": 26 + }, + "end": { + "line": 84, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3067, + "end": 3072, + "loc": { + "start": { + "line": 84, + "column": 41 + }, + "end": { + "line": 84, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3074, + "end": 3076, + "loc": { + "start": { + "line": 84, + "column": 48 + }, + "end": { + "line": 84, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3077, + "end": 3082, + "loc": { + "start": { + "line": 84, + "column": 51 + }, + "end": { + "line": 84, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3083, + "end": 3088, + "loc": { + "start": { + "line": 84, + "column": 57 + }, + "end": { + "line": 84, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3091, + "end": 3113, + "loc": { + "start": { + "line": 84, + "column": 65 + }, + "end": { + "line": 84, + "column": 87 + } + }, + "range": [ + 3091, + 3113 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 3126, + "end": 3133, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 3126, + "end": 3132, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 3126, + "end": 3130, + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3091, + "end": 3113, + "loc": { + "start": { + "line": 84, + "column": 65 + }, + "end": { + "line": 84, + "column": 87 + } + }, + "range": [ + 3091, + 3113 + ] + } + ] + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3154, + "end": 3179, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 3154, + "end": 3178, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3154, + "end": 3163, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 3154, + "end": 3160, + "loc": { + "start": { + "line": 88, + "column": 8 + }, + "end": { + "line": 88, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3161, + "end": 3163, + "loc": { + "start": { + "line": 88, + "column": 15 + }, + "end": { + "line": 88, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3164, + "end": 3170, + "loc": { + "start": { + "line": 88, + "column": 18 + }, + "end": { + "line": 88, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 3172, + "end": 3177, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3188, + "end": 3210, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3188, + "end": 3209, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3188, + "end": 3200, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3188, + "end": 3194, + "loc": { + "start": { + "line": 89, + "column": 8 + }, + "end": { + "line": 89, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3195, + "end": 3200, + "loc": { + "start": { + "line": 89, + "column": 15 + }, + "end": { + "line": 89, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3201, + "end": 3208, + "loc": { + "start": { + "line": 89, + "column": 21 + }, + "end": { + "line": 89, + "column": 28 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3219, + "end": 3241, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3219, + "end": 3240, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3219, + "end": 3231, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3219, + "end": 3225, + "loc": { + "start": { + "line": 90, + "column": 8 + }, + "end": { + "line": 90, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3226, + "end": 3231, + "loc": { + "start": { + "line": 90, + "column": 15 + }, + "end": { + "line": 90, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3232, + "end": 3239, + "loc": { + "start": { + "line": 90, + "column": 21 + }, + "end": { + "line": 90, + "column": 28 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3250, + "end": 3272, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3250, + "end": 3271, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3250, + "end": 3262, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3250, + "end": 3256, + "loc": { + "start": { + "line": 91, + "column": 8 + }, + "end": { + "line": 91, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3257, + "end": 3262, + "loc": { + "start": { + "line": 91, + "column": 15 + }, + "end": { + "line": 91, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3263, + "end": 3270, + "loc": { + "start": { + "line": 91, + "column": 21 + }, + "end": { + "line": 91, + "column": 28 + } + }, + "value": "test3", + "rawValue": "test3", + "raw": "\"test3\"" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3286, + "end": 4020, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 113, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3286, + "end": 4019, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 113, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3286, + "end": 3288, + "loc": { + "start": { + "line": 94, + "column": 4 + }, + "end": { + "line": 94, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3289, + "end": 3342, + "loc": { + "start": { + "line": 94, + "column": 7 + }, + "end": { + "line": 94, + "column": 60 + } + }, + "value": "writes to an assert stream, filtering some messages", + "rawValue": "writes to an assert stream, filtering some messages", + "raw": "\"writes to an assert stream, filtering some messages\"" + }, + { + "type": "FunctionExpression", + "start": 3344, + "end": 4018, + "loc": { + "start": { + "line": 94, + "column": 62 + }, + "end": { + "line": 113, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3353, + "end": 3357, + "loc": { + "start": { + "line": 94, + "column": 71 + }, + "end": { + "line": 94, + "column": 75 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3359, + "end": 4018, + "loc": { + "start": { + "line": 94, + "column": 77 + }, + "end": { + "line": 113, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 3369, + "end": 3396, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3375, + "end": 3395, + "loc": { + "start": { + "line": 95, + "column": 14 + }, + "end": { + "line": 95, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 3375, + "end": 3381, + "loc": { + "start": { + "line": 95, + "column": 14 + }, + "end": { + "line": 95, + "column": 20 + } + }, + "name": "tapSpy" + }, + "init": { + "type": "CallExpression", + "start": 3384, + "end": 3395, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3384, + "end": 3393, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 3384, + "end": 3389, + "loc": { + "start": { + "line": 95, + "column": 23 + }, + "end": { + "line": 95, + "column": 28 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 3390, + "end": 3393, + "loc": { + "start": { + "line": 95, + "column": 29 + }, + "end": { + "line": 95, + "column": 32 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 3405, + "end": 3545, + "loc": { + "start": { + "line": 96, + "column": 8 + }, + "end": { + "line": 99, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3411, + "end": 3544, + "loc": { + "start": { + "line": 96, + "column": 14 + }, + "end": { + "line": 99, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 3411, + "end": 3417, + "loc": { + "start": { + "line": 96, + "column": 14 + }, + "end": { + "line": 96, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 3420, + "end": 3544, + "loc": { + "start": { + "line": 96, + "column": 23 + }, + "end": { + "line": 99, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 3424, + "end": 3436, + "loc": { + "start": { + "line": 96, + "column": 27 + }, + "end": { + "line": 96, + "column": 39 + } + }, + "name": "AssertStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3437, + "end": 3455, + "loc": { + "start": { + "line": 96, + "column": 40 + }, + "end": { + "line": 96, + "column": 58 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3438, + "end": 3445, + "loc": { + "start": { + "line": 96, + "column": 41 + }, + "end": { + "line": 96, + "column": 48 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 3447, + "end": 3454, + "loc": { + "start": { + "line": 96, + "column": 50 + }, + "end": { + "line": 96, + "column": 57 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 3457, + "end": 3543, + "loc": { + "start": { + "line": 96, + "column": 60 + }, + "end": { + "line": 99, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 3471, + "end": 3485, + "loc": { + "start": { + "line": 97, + "column": 12 + }, + "end": { + "line": 97, + "column": 26 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 3471, + "end": 3477, + "loc": { + "start": { + "line": 97, + "column": 12 + }, + "end": { + "line": 97, + "column": 18 + } + }, + "name": "tapper" + }, + "value": { + "type": "Identifier", + "start": 3479, + "end": 3485, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 97, + "column": 26 + } + }, + "name": "tapSpy" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 3499, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 12 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 3499, + "end": 3505, + "loc": { + "start": { + "line": 98, + "column": 12 + }, + "end": { + "line": 98, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 3507, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3507, + "end": 3512, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 3516, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 29 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 3516, + "end": 3521, + "loc": { + "start": { + "line": 98, + "column": 29 + }, + "end": { + "line": 98, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 3526, + "end": 3533, + "loc": { + "start": { + "line": 98, + "column": 39 + }, + "end": { + "line": 98, + "column": 46 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 3555, + "end": 3884, + "loc": { + "start": { + "line": 101, + "column": 8 + }, + "end": { + "line": 107, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3561, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 14 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 3561, + "end": 3566, + "loc": { + "start": { + "line": 101, + "column": 14 + }, + "end": { + "line": 101, + "column": 19 + } + }, + "name": "onEnd" + }, + "init": { + "type": "FunctionExpression", + "start": 3569, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 22 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 3580, + "end": 3883, + "loc": { + "start": { + "line": 101, + "column": 33 + }, + "end": { + "line": 107, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3594, + "end": 3642, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 3594, + "end": 3641, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 3594, + "end": 3600, + "loc": { + "start": { + "line": 102, + "column": 12 + }, + "end": { + "line": 102, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3601, + "end": 3640, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3601, + "end": 3628, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3601, + "end": 3617, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 3601, + "end": 3607, + "loc": { + "start": { + "line": 102, + "column": 19 + }, + "end": { + "line": 102, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3608, + "end": 3617, + "loc": { + "start": { + "line": 102, + "column": 26 + }, + "end": { + "line": 102, + "column": 35 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3618, + "end": 3628, + "loc": { + "start": { + "line": 102, + "column": 36 + }, + "end": { + "line": 102, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3629, + "end": 3636, + "loc": { + "start": { + "line": 102, + "column": 47 + }, + "end": { + "line": 102, + "column": 54 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + }, + { + "type": "Literal", + "start": 3638, + "end": 3639, + "loc": { + "start": { + "line": 102, + "column": 56 + }, + "end": { + "line": 102, + "column": 57 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3655, + "end": 3704, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 61 + } + }, + "expression": { + "type": "CallExpression", + "start": 3655, + "end": 3703, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 3655, + "end": 3661, + "loc": { + "start": { + "line": 103, + "column": 12 + }, + "end": { + "line": 103, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3662, + "end": 3702, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 59 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3662, + "end": 3690, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 3662, + "end": 3679, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 3662, + "end": 3668, + "loc": { + "start": { + "line": 103, + "column": 19 + }, + "end": { + "line": 103, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3669, + "end": 3679, + "loc": { + "start": { + "line": 103, + "column": 26 + }, + "end": { + "line": 103, + "column": 36 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3680, + "end": 3690, + "loc": { + "start": { + "line": 103, + "column": 37 + }, + "end": { + "line": 103, + "column": 47 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3691, + "end": 3698, + "loc": { + "start": { + "line": 103, + "column": 48 + }, + "end": { + "line": 103, + "column": 55 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + }, + { + "type": "Literal", + "start": 3700, + "end": 3701, + "loc": { + "start": { + "line": 103, + "column": 57 + }, + "end": { + "line": 103, + "column": 58 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3717, + "end": 3765, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 60 + } + }, + "expression": { + "type": "CallExpression", + "start": 3717, + "end": 3764, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 3717, + "end": 3723, + "loc": { + "start": { + "line": 104, + "column": 12 + }, + "end": { + "line": 104, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 3724, + "end": 3763, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3724, + "end": 3751, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3724, + "end": 3740, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 3724, + "end": 3730, + "loc": { + "start": { + "line": 104, + "column": 19 + }, + "end": { + "line": 104, + "column": 25 + } + }, + "name": "tapSpy" + }, + "property": { + "type": "Identifier", + "start": 3731, + "end": 3740, + "loc": { + "start": { + "line": 104, + "column": 26 + }, + "end": { + "line": 104, + "column": 35 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3741, + "end": 3751, + "loc": { + "start": { + "line": 104, + "column": 36 + }, + "end": { + "line": 104, + "column": 46 + } + }, + "name": "calledWith" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3752, + "end": 3759, + "loc": { + "start": { + "line": 104, + "column": 47 + }, + "end": { + "line": 104, + "column": 54 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + { + "type": "Literal", + "start": 3761, + "end": 3762, + "loc": { + "start": { + "line": 104, + "column": 56 + }, + "end": { + "line": 104, + "column": 57 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3778, + "end": 3830, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 3778, + "end": 3829, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3778, + "end": 3822, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 56 + } + }, + "object": { + "type": "MemberExpression", + "start": 3778, + "end": 3816, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 50 + } + }, + "object": { + "type": "CallExpression", + "start": 3778, + "end": 3813, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 3778, + "end": 3784, + "loc": { + "start": { + "line": 105, + "column": 12 + }, + "end": { + "line": 105, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3785, + "end": 3812, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 3785, + "end": 3806, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 3785, + "end": 3791, + "loc": { + "start": { + "line": 105, + "column": 19 + }, + "end": { + "line": 105, + "column": 25 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3792, + "end": 3806, + "loc": { + "start": { + "line": 105, + "column": 26 + }, + "end": { + "line": 105, + "column": 40 + } + }, + "name": "_writableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3807, + "end": 3812, + "loc": { + "start": { + "line": 105, + "column": 41 + }, + "end": { + "line": 105, + "column": 46 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3814, + "end": 3816, + "loc": { + "start": { + "line": 105, + "column": 48 + }, + "end": { + "line": 105, + "column": 50 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3817, + "end": 3822, + "loc": { + "start": { + "line": 105, + "column": 51 + }, + "end": { + "line": 105, + "column": 56 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3823, + "end": 3828, + "loc": { + "start": { + "line": 105, + "column": 57 + }, + "end": { + "line": 105, + "column": 62 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3831, + "end": 3853, + "loc": { + "start": { + "line": 105, + "column": 65 + }, + "end": { + "line": 105, + "column": 87 + } + }, + "range": [ + 3831, + 3853 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 3866, + "end": 3873, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 3866, + "end": 3872, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 3866, + "end": 3870, + "loc": { + "start": { + "line": 106, + "column": 12 + }, + "end": { + "line": 106, + "column": 16 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3831, + "end": 3853, + "loc": { + "start": { + "line": 105, + "column": 65 + }, + "end": { + "line": 105, + "column": 87 + } + }, + "range": [ + 3831, + 3853 + ] + } + ] + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3894, + "end": 3919, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 33 + } + }, + "expression": { + "type": "CallExpression", + "start": 3894, + "end": 3918, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 32 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3894, + "end": 3903, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 3894, + "end": 3900, + "loc": { + "start": { + "line": 109, + "column": 8 + }, + "end": { + "line": 109, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3901, + "end": 3903, + "loc": { + "start": { + "line": 109, + "column": 15 + }, + "end": { + "line": 109, + "column": 17 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3904, + "end": 3910, + "loc": { + "start": { + "line": 109, + "column": 18 + }, + "end": { + "line": 109, + "column": 24 + } + }, + "value": "done", + "rawValue": "done", + "raw": "\"done\"" + }, + { + "type": "Identifier", + "start": 3912, + "end": 3917, + "loc": { + "start": { + "line": 109, + "column": 26 + }, + "end": { + "line": 109, + "column": 31 + } + }, + "name": "onEnd" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3928, + "end": 3950, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3928, + "end": 3949, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3928, + "end": 3940, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3928, + "end": 3934, + "loc": { + "start": { + "line": 110, + "column": 8 + }, + "end": { + "line": 110, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3935, + "end": 3940, + "loc": { + "start": { + "line": 110, + "column": 15 + }, + "end": { + "line": 110, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3941, + "end": 3948, + "loc": { + "start": { + "line": 110, + "column": 21 + }, + "end": { + "line": 110, + "column": 28 + } + }, + "value": "test4", + "rawValue": "test4", + "raw": "\"test4\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3959, + "end": 3981, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3959, + "end": 3980, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3959, + "end": 3971, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3959, + "end": 3965, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3966, + "end": 3971, + "loc": { + "start": { + "line": 111, + "column": 15 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3972, + "end": 3979, + "loc": { + "start": { + "line": 111, + "column": 21 + }, + "end": { + "line": 111, + "column": 28 + } + }, + "value": "test1", + "rawValue": "test1", + "raw": "\"test1\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3990, + "end": 4012, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 30 + } + }, + "expression": { + "type": "CallExpression", + "start": 3990, + "end": 4011, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 29 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3990, + "end": 4002, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 3990, + "end": 3996, + "loc": { + "start": { + "line": 112, + "column": 8 + }, + "end": { + "line": 112, + "column": 14 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3997, + "end": 4002, + "loc": { + "start": { + "line": 112, + "column": 15 + }, + "end": { + "line": 112, + "column": 20 + } + }, + "name": "write" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4003, + "end": 4010, + "loc": { + "start": { + "line": 112, + "column": 21 + }, + "end": { + "line": 112, + "column": 28 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/__tests__/ExpectStreamTest.js.json b/docs/ast/source/__tests__/ExpectStreamTest.js.json new file mode 100644 index 0000000..b6c021d --- /dev/null +++ b/docs/ast/source/__tests__/ExpectStreamTest.js.json @@ -0,0 +1,18568 @@ +{ + "type": "Program", + "start": 0, + "end": 8142, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 250, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "name": "isArray" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 20, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "value": "lodash.isarray", + "rawValue": "lodash.isarray", + "raw": "\"lodash.isarray\"" + } + }, + { + "type": "ImportDeclaration", + "start": 38, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 61, + "end": 71, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + }, + "value": "../index", + "rawValue": "../index", + "raw": "\"../index\"" + } + }, + { + "type": "ImportDeclaration", + "start": 73, + "end": 118, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 45 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "imported": { + "type": "Identifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "Readable" + }, + "local": { + "type": "Identifier", + "start": 82, + "end": 90, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "name": "Readable" + } + }, + { + "type": "ImportSpecifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "imported": { + "type": "Identifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "name": "Transform" + }, + "local": { + "type": "Identifier", + "start": 92, + "end": 101, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "name": "Transform" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 109, + "end": 117, + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 44 + } + }, + "value": "stream", + "rawValue": "stream", + "raw": "\"stream\"" + } + }, + { + "type": "ImportDeclaration", + "start": 119, + "end": 147, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 28 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 126, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "local": { + "type": "Identifier", + "start": 126, + "end": 132, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "name": "assert" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 138, + "end": 146, + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + }, + "value": "assert", + "rawValue": "assert", + "raw": "\"assert\"" + } + }, + { + "type": "ImportDeclaration", + "start": 148, + "end": 174, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 26 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 155, + "end": 160, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "local": { + "type": "Identifier", + "start": 155, + "end": 160, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "name": "sinon" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 166, + "end": 173, + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + }, + "value": "sinon", + "rawValue": "sinon", + "raw": "\"sinon\"" + } + }, + { + "type": "ClassDeclaration", + "start": 176, + "end": 478, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 182, + "end": 192, + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 16 + } + }, + "name": "ReadStream" + }, + "superClass": { + "type": "Identifier", + "start": 201, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 33 + } + }, + "name": "Readable" + }, + "body": { + "type": "ClassBody", + "start": 210, + "end": 478, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 216, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 216, + "end": 227, + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 227, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "AssignmentPattern", + "start": 228, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 33 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 228, + "end": 236, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 24 + } + }, + "name": "messages" + }, + "right": { + "type": "Literal", + "start": 239, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 33 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 247, + "end": 326, + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 12, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 257, + "end": 285, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 36 + } + }, + "expression": { + "type": "CallExpression", + "start": 257, + "end": 284, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 35 + } + }, + "callee": { + "type": "Super", + "start": 257, + "end": 262, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 263, + "end": 283, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 34 + } + }, + "properties": [ + { + "type": "Property", + "start": 265, + "end": 281, + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 32 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 265, + "end": 275, + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 26 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 277, + "end": 281, + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 32 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 295, + "end": 320, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 295, + "end": 319, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 295, + "end": 308, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 21 + } + }, + "object": { + "type": "ThisExpression", + "start": 295, + "end": 299, + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 300, + "end": 308, + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 21 + } + }, + "name": "messages" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 311, + "end": 319, + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 32 + } + }, + "name": "messages" + } + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 332, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 332, + "end": 337, + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + }, + "name": "_read" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 337, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 340, + "end": 476, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 20, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 350, + "end": 470, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 19, + "column": 10 + } + }, + "expression": { + "type": "CallExpression", + "start": 350, + "end": 469, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + }, + "callee": { + "type": "MemberExpression", + "start": 350, + "end": 359, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 350, + "end": 354, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 355, + "end": 359, + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "ConditionalExpression", + "start": 373, + "end": 459, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "test": { + "type": "CallExpression", + "start": 373, + "end": 395, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 34 + } + }, + "callee": { + "type": "Identifier", + "start": 373, + "end": 380, + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 19 + } + }, + "name": "isArray" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 381, + "end": 394, + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "object": { + "type": "ThisExpression", + "start": 381, + "end": 385, + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "property": { + "type": "Identifier", + "start": 386, + "end": 394, + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 33 + } + }, + "name": "messages" + }, + "computed": false + } + ] + }, + "consequent": { + "type": "CallExpression", + "start": 410, + "end": 431, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 33 + } + }, + "callee": { + "type": "MemberExpression", + "start": 410, + "end": 429, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 410, + "end": 423, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 410, + "end": 414, + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 415, + "end": 423, + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 25 + } + }, + "name": "messages" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 424, + "end": 429, + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 31 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + }, + "alternate": { + "type": "MemberExpression", + "start": 446, + "end": 459, + "loc": { + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "object": { + "type": "ThisExpression", + "start": 446, + "end": 450, + "loc": { + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "property": { + "type": "Identifier", + "start": 451, + "end": 459, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 25 + } + }, + "name": "messages" + }, + "computed": false + } + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 480, + "end": 616, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 486, + "end": 501, + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 21 + } + }, + "name": "TransformStream" + }, + "superClass": { + "type": "Identifier", + "start": 510, + "end": 519, + "loc": { + "start": { + "line": 23, + "column": 30 + }, + "end": { + "line": 23, + "column": 39 + } + }, + "name": "Transform" + }, + "body": { + "type": "ClassBody", + "start": 520, + "end": 616, + "loc": { + "start": { + "line": 23, + "column": 40 + }, + "end": { + "line": 28, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 526, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 526, + "end": 536, + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "name": "_transform" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 536, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 537, + "end": 542, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 20 + } + }, + "name": "chunk" + }, + { + "type": "Identifier", + "start": 544, + "end": 547, + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 25 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 549, + "end": 551, + "loc": { + "start": { + "line": 24, + "column": 27 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 553, + "end": 614, + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 563, + "end": 580, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 563, + "end": 579, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 563, + "end": 572, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 563, + "end": 567, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 568, + "end": 572, + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 573, + "end": 578, + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 23 + } + }, + "name": "chunk" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 589, + "end": 608, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 589, + "end": 607, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 589, + "end": 599, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "Identifier", + "start": 600, + "end": 602, + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 21 + } + }, + "name": "cb" + }, + { + "type": "Literal", + "start": 604, + "end": 606, + "loc": { + "start": { + "line": 26, + "column": 23 + }, + "end": { + "line": 26, + "column": 25 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 619, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 45, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 625, + "end": 641, + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "ReadObjectStream" + }, + "superClass": { + "type": "Identifier", + "start": 650, + "end": 658, + "loc": { + "start": { + "line": 31, + "column": 31 + }, + "end": { + "line": 31, + "column": 39 + } + }, + "name": "Readable" + }, + "body": { + "type": "ClassBody", + "start": 659, + "end": 857, + "loc": { + "start": { + "line": 31, + "column": 40 + }, + "end": { + "line": 45, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 665, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 665, + "end": 676, + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 676, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 679, + "end": 743, + "loc": { + "start": { + "line": 32, + "column": 18 + }, + "end": { + "line": 36, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 689, + "end": 737, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 35, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 689, + "end": 736, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 35, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 689, + "end": 694, + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 695, + "end": 735, + "loc": { + "start": { + "line": 33, + "column": 14 + }, + "end": { + "line": 35, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 709, + "end": 725, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 709, + "end": 719, + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 721, + "end": 725, + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 749, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 749, + "end": 754, + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 9 + } + }, + "name": "_read" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 754, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 757, + "end": 855, + "loc": { + "start": { + "line": 38, + "column": 12 + }, + "end": { + "line": 44, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 767, + "end": 849, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 43, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 767, + "end": 848, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 767, + "end": 776, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 767, + "end": 771, + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 772, + "end": 776, + "loc": { + "start": { + "line": 39, + "column": 13 + }, + "end": { + "line": 39, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 777, + "end": 847, + "loc": { + "start": { + "line": 39, + "column": 18 + }, + "end": { + "line": 43, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 791, + "end": 837, + "loc": { + "start": { + "line": 40, + "column": 12 + }, + "end": { + "line": 42, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 791, + "end": 795, + "loc": { + "start": { + "line": 40, + "column": 12 + }, + "end": { + "line": 40, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 797, + "end": 837, + "loc": { + "start": { + "line": 40, + "column": 18 + }, + "end": { + "line": 42, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 815, + "end": 823, + "loc": { + "start": { + "line": 41, + "column": 16 + }, + "end": { + "line": 41, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 815, + "end": 819, + "loc": { + "start": { + "line": 41, + "column": 16 + }, + "end": { + "line": 41, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 821, + "end": 823, + "loc": { + "start": { + "line": 41, + "column": 22 + }, + "end": { + "line": 41, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ClassDeclaration", + "start": 859, + "end": 1078, + "loc": { + "start": { + "line": 47, + "column": 0 + }, + "end": { + "line": 58, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 865, + "end": 883, + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 24 + } + }, + "name": "TransformObjStream" + }, + "superClass": { + "type": "Identifier", + "start": 892, + "end": 901, + "loc": { + "start": { + "line": 47, + "column": 33 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "name": "Transform" + }, + "body": { + "type": "ClassBody", + "start": 902, + "end": 1078, + "loc": { + "start": { + "line": 47, + "column": 43 + }, + "end": { + "line": 58, + "column": 1 + } + }, + "body": [ + { + "type": "MethodDefinition", + "start": 908, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 908, + "end": 919, + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 48, + "column": 15 + } + }, + "name": "constructor" + }, + "static": false, + "kind": "constructor", + "value": { + "type": "FunctionExpression", + "start": 919, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 922, + "end": 986, + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 52, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 932, + "end": 980, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 51, + "column": 11 + } + }, + "expression": { + "type": "CallExpression", + "start": 932, + "end": 979, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 51, + "column": 10 + } + }, + "callee": { + "type": "Super", + "start": 932, + "end": 937, + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 13 + } + } + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 938, + "end": 978, + "loc": { + "start": { + "line": 49, + "column": 14 + }, + "end": { + "line": 51, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 952, + "end": 968, + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 952, + "end": 962, + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 22 + } + }, + "name": "objectMode" + }, + "value": { + "type": "Literal", + "start": 964, + "end": 968, + "loc": { + "start": { + "line": 50, + "column": 24 + }, + "end": { + "line": 50, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ] + } + } + }, + { + "type": "MethodDefinition", + "start": 992, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "computed": false, + "key": { + "type": "Identifier", + "start": 992, + "end": 1002, + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 54, + "column": 14 + } + }, + "name": "_transform" + }, + "static": false, + "kind": "method", + "value": { + "type": "FunctionExpression", + "start": 1002, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 14 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1003, + "end": 1006, + "loc": { + "start": { + "line": 54, + "column": 15 + }, + "end": { + "line": 54, + "column": 18 + } + }, + "name": "obj" + }, + { + "type": "Identifier", + "start": 1008, + "end": 1011, + "loc": { + "start": { + "line": 54, + "column": 20 + }, + "end": { + "line": 54, + "column": 23 + } + }, + "name": "enc" + }, + { + "type": "Identifier", + "start": 1013, + "end": 1015, + "loc": { + "start": { + "line": 54, + "column": 25 + }, + "end": { + "line": 54, + "column": 27 + } + }, + "name": "cb" + } + ], + "body": { + "type": "BlockStatement", + "start": 1017, + "end": 1076, + "loc": { + "start": { + "line": 54, + "column": 29 + }, + "end": { + "line": 57, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1027, + "end": 1042, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 1027, + "end": 1041, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1027, + "end": 1036, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 17 + } + }, + "object": { + "type": "ThisExpression", + "start": 1027, + "end": 1031, + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "property": { + "type": "Identifier", + "start": 1032, + "end": 1036, + "loc": { + "start": { + "line": 55, + "column": 13 + }, + "end": { + "line": 55, + "column": 17 + } + }, + "name": "push" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1037, + "end": 1040, + "loc": { + "start": { + "line": 55, + "column": 18 + }, + "end": { + "line": 55, + "column": 21 + } + }, + "name": "obj" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1051, + "end": 1070, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 1051, + "end": 1069, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 1051, + "end": 1061, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "Identifier", + "start": 1062, + "end": 1064, + "loc": { + "start": { + "line": 56, + "column": 19 + }, + "end": { + "line": 56, + "column": 21 + } + }, + "name": "cb" + }, + { + "type": "Literal", + "start": 1066, + "end": 1068, + "loc": { + "start": { + "line": 56, + "column": 23 + }, + "end": { + "line": 56, + "column": 25 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1081, + "end": 8141, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 249, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 1081, + "end": 8140, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 249, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 1081, + "end": 1089, + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 61, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 1090, + "end": 1108, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 27 + } + }, + "value": "ExpectStreamTest", + "rawValue": "ExpectStreamTest", + "raw": "\"ExpectStreamTest\"" + }, + { + "type": "FunctionExpression", + "start": 1110, + "end": 8139, + "loc": { + "start": { + "line": 61, + "column": 29 + }, + "end": { + "line": 249, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1121, + "end": 8139, + "loc": { + "start": { + "line": 61, + "column": 40 + }, + "end": { + "line": 249, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1150, + "end": 1383, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 66, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1150, + "end": 1382, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 66, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1150, + "end": 1152, + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 62, + "column": 6 + } + }, + "name": "it", + "leadingComments": null + }, + "arguments": [ + { + "type": "Literal", + "start": 1153, + "end": 1217, + "loc": { + "start": { + "line": 62, + "column": 7 + }, + "end": { + "line": 62, + "column": 71 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly", + "rawValue": "uses the produce assertion with a readstream, matching exactly", + "raw": "\"uses the produce assertion with a readstream, matching exactly\"" + }, + { + "type": "FunctionExpression", + "start": 1219, + "end": 1381, + "loc": { + "start": { + "line": 62, + "column": 73 + }, + "end": { + "line": 66, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1228, + "end": 1232, + "loc": { + "start": { + "line": 62, + "column": 82 + }, + "end": { + "line": 62, + "column": 86 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1234, + "end": 1381, + "loc": { + "start": { + "line": 62, + "column": 88 + }, + "end": { + "line": 66, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1244, + "end": 1375, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1244, + "end": 1374, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1244, + "end": 1368, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 65, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1244, + "end": 1348, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1244, + "end": 1319, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1244, + "end": 1311, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 64, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1244, + "end": 1295, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 1244, + "end": 1250, + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1251, + "end": 1294, + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 58 + } + }, + "callee": { + "type": "Identifier", + "start": 1255, + "end": 1265, + "loc": { + "start": { + "line": 63, + "column": 19 + }, + "end": { + "line": 63, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1266, + "end": 1293, + "loc": { + "start": { + "line": 63, + "column": 30 + }, + "end": { + "line": 63, + "column": 57 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1267, + "end": 1274, + "loc": { + "start": { + "line": 63, + "column": 31 + }, + "end": { + "line": 63, + "column": 38 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 1276, + "end": 1283, + "loc": { + "start": { + "line": 63, + "column": 40 + }, + "end": { + "line": 63, + "column": 47 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 1285, + "end": 1292, + "loc": { + "start": { + "line": 63, + "column": 49 + }, + "end": { + "line": 63, + "column": 56 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1309, + "end": 1311, + "loc": { + "start": { + "line": 64, + "column": 13 + }, + "end": { + "line": 64, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1312, + "end": 1319, + "loc": { + "start": { + "line": 64, + "column": 16 + }, + "end": { + "line": 64, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1320, + "end": 1347, + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1321, + "end": 1328, + "loc": { + "start": { + "line": 64, + "column": 25 + }, + "end": { + "line": 64, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 1330, + "end": 1337, + "loc": { + "start": { + "line": 64, + "column": 34 + }, + "end": { + "line": 64, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 1339, + "end": 1346, + "loc": { + "start": { + "line": 64, + "column": 43 + }, + "end": { + "line": 64, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1362, + "end": 1368, + "loc": { + "start": { + "line": 65, + "column": 13 + }, + "end": { + "line": 65, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1369, + "end": 1373, + "loc": { + "start": { + "line": 65, + "column": 20 + }, + "end": { + "line": 65, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 1123, + "end": 1145, + "loc": { + "start": { + "line": 61, + "column": 42 + }, + "end": { + "line": 61, + "column": 64 + } + }, + "range": [ + 1123, + 1145 + ] + } + ] + }, + { + "type": "ExpressionStatement", + "start": 1389, + "end": 1619, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 72, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1389, + "end": 1618, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 72, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1389, + "end": 1391, + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1392, + "end": 1467, + "loc": { + "start": { + "line": 68, + "column": 7 + }, + "end": { + "line": 68, + "column": 82 + } + }, + "value": "uses the produce assertion with a readstream, matching on strict equality", + "rawValue": "uses the produce assertion with a readstream, matching on strict equality", + "raw": "\"uses the produce assertion with a readstream, matching on strict equality\"" + }, + { + "type": "FunctionExpression", + "start": 1469, + "end": 1617, + "loc": { + "start": { + "line": 68, + "column": 84 + }, + "end": { + "line": 72, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1478, + "end": 1482, + "loc": { + "start": { + "line": 68, + "column": 93 + }, + "end": { + "line": 68, + "column": 97 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1484, + "end": 1617, + "loc": { + "start": { + "line": 68, + "column": 99 + }, + "end": { + "line": 72, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1494, + "end": 1611, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1494, + "end": 1610, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1494, + "end": 1604, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 71, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1494, + "end": 1584, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1494, + "end": 1566, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 1494, + "end": 1558, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1494, + "end": 1550, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 70, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1494, + "end": 1534, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 69, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 1494, + "end": 1500, + "loc": { + "start": { + "line": 69, + "column": 8 + }, + "end": { + "line": 69, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1501, + "end": 1533, + "loc": { + "start": { + "line": 69, + "column": 15 + }, + "end": { + "line": 69, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1505, + "end": 1515, + "loc": { + "start": { + "line": 69, + "column": 19 + }, + "end": { + "line": 69, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1516, + "end": 1532, + "loc": { + "start": { + "line": 69, + "column": 30 + }, + "end": { + "line": 69, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 1518, + "end": 1530, + "loc": { + "start": { + "line": 69, + "column": 32 + }, + "end": { + "line": 69, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1518, + "end": 1522, + "loc": { + "start": { + "line": 69, + "column": 32 + }, + "end": { + "line": 69, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1524, + "end": 1530, + "loc": { + "start": { + "line": 69, + "column": 38 + }, + "end": { + "line": 69, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1548, + "end": 1550, + "loc": { + "start": { + "line": 70, + "column": 13 + }, + "end": { + "line": 70, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1551, + "end": 1558, + "loc": { + "start": { + "line": 70, + "column": 16 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "name": "exactly" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1559, + "end": 1566, + "loc": { + "start": { + "line": 70, + "column": 24 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1567, + "end": 1583, + "loc": { + "start": { + "line": 70, + "column": 32 + }, + "end": { + "line": 70, + "column": 48 + } + }, + "properties": [ + { + "type": "Property", + "start": 1569, + "end": 1581, + "loc": { + "start": { + "line": 70, + "column": 34 + }, + "end": { + "line": 70, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1569, + "end": 1573, + "loc": { + "start": { + "line": 70, + "column": 34 + }, + "end": { + "line": 70, + "column": 38 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1575, + "end": 1581, + "loc": { + "start": { + "line": 70, + "column": 40 + }, + "end": { + "line": 70, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1598, + "end": 1604, + "loc": { + "start": { + "line": 71, + "column": 13 + }, + "end": { + "line": 71, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1605, + "end": 1609, + "loc": { + "start": { + "line": 71, + "column": 20 + }, + "end": { + "line": 71, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1625, + "end": 1863, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 78, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1625, + "end": 1862, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 78, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1625, + "end": 1627, + "loc": { + "start": { + "line": 74, + "column": 4 + }, + "end": { + "line": 74, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1628, + "end": 1711, + "loc": { + "start": { + "line": 74, + "column": 7 + }, + "end": { + "line": 74, + "column": 90 + } + }, + "value": "uses the produce assertion with a readstream, matching on strict equality - part2", + "rawValue": "uses the produce assertion with a readstream, matching on strict equality - part2", + "raw": "\"uses the produce assertion with a readstream, matching on strict equality - part2\"" + }, + { + "type": "FunctionExpression", + "start": 1713, + "end": 1861, + "loc": { + "start": { + "line": 74, + "column": 92 + }, + "end": { + "line": 78, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1722, + "end": 1726, + "loc": { + "start": { + "line": 74, + "column": 101 + }, + "end": { + "line": 74, + "column": 105 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1728, + "end": 1861, + "loc": { + "start": { + "line": 74, + "column": 107 + }, + "end": { + "line": 78, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1738, + "end": 1855, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1738, + "end": 1854, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1738, + "end": 1848, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 77, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1738, + "end": 1828, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 49 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1738, + "end": 1810, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 31 + } + }, + "object": { + "type": "MemberExpression", + "start": 1738, + "end": 1802, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1738, + "end": 1794, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 76, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1738, + "end": 1778, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 75, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 1738, + "end": 1744, + "loc": { + "start": { + "line": 75, + "column": 8 + }, + "end": { + "line": 75, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1745, + "end": 1777, + "loc": { + "start": { + "line": 75, + "column": 15 + }, + "end": { + "line": 75, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 1749, + "end": 1759, + "loc": { + "start": { + "line": 75, + "column": 19 + }, + "end": { + "line": 75, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1760, + "end": 1776, + "loc": { + "start": { + "line": 75, + "column": 30 + }, + "end": { + "line": 75, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 1762, + "end": 1774, + "loc": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1762, + "end": 1766, + "loc": { + "start": { + "line": 75, + "column": 32 + }, + "end": { + "line": 75, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1768, + "end": 1774, + "loc": { + "start": { + "line": 75, + "column": 38 + }, + "end": { + "line": 75, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1792, + "end": 1794, + "loc": { + "start": { + "line": 76, + "column": 13 + }, + "end": { + "line": 76, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1795, + "end": 1802, + "loc": { + "start": { + "line": 76, + "column": 16 + }, + "end": { + "line": 76, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1803, + "end": 1810, + "loc": { + "start": { + "line": 76, + "column": 24 + }, + "end": { + "line": 76, + "column": 31 + } + }, + "name": "exactly" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1811, + "end": 1827, + "loc": { + "start": { + "line": 76, + "column": 32 + }, + "end": { + "line": 76, + "column": 48 + } + }, + "properties": [ + { + "type": "Property", + "start": 1813, + "end": 1825, + "loc": { + "start": { + "line": 76, + "column": 34 + }, + "end": { + "line": 76, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1813, + "end": 1817, + "loc": { + "start": { + "line": 76, + "column": 34 + }, + "end": { + "line": 76, + "column": 38 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 1819, + "end": 1825, + "loc": { + "start": { + "line": 76, + "column": 40 + }, + "end": { + "line": 76, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1842, + "end": 1848, + "loc": { + "start": { + "line": 77, + "column": 13 + }, + "end": { + "line": 77, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 1849, + "end": 1853, + "loc": { + "start": { + "line": 77, + "column": 20 + }, + "end": { + "line": 77, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1869, + "end": 2109, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 84, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1869, + "end": 2108, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 84, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1869, + "end": 1871, + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 80, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1872, + "end": 1948, + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 83 + } + }, + "value": "uses the produce assertion with a readstream, containing at least key test", + "rawValue": "uses the produce assertion with a readstream, containing at least key test", + "raw": "\"uses the produce assertion with a readstream, containing at least key test\"" + }, + { + "type": "FunctionExpression", + "start": 1950, + "end": 2107, + "loc": { + "start": { + "line": 80, + "column": 85 + }, + "end": { + "line": 84, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1959, + "end": 1963, + "loc": { + "start": { + "line": 80, + "column": 94 + }, + "end": { + "line": 80, + "column": 98 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 1965, + "end": 2107, + "loc": { + "start": { + "line": 80, + "column": 100 + }, + "end": { + "line": 84, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 1975, + "end": 2101, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 1975, + "end": 2100, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1975, + "end": 2094, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 83, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 1975, + "end": 2074, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 41 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1975, + "end": 2056, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 1975, + "end": 2048, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 82, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 1975, + "end": 2032, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 65 + } + }, + "callee": { + "type": "Identifier", + "start": 1975, + "end": 1981, + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 1982, + "end": 2031, + "loc": { + "start": { + "line": 81, + "column": 15 + }, + "end": { + "line": 81, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 1986, + "end": 1996, + "loc": { + "start": { + "line": 81, + "column": 19 + }, + "end": { + "line": 81, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 1997, + "end": 2030, + "loc": { + "start": { + "line": 81, + "column": 30 + }, + "end": { + "line": 81, + "column": 63 + } + }, + "properties": [ + { + "type": "Property", + "start": 1999, + "end": 2011, + "loc": { + "start": { + "line": 81, + "column": 32 + }, + "end": { + "line": 81, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1999, + "end": 2003, + "loc": { + "start": { + "line": 81, + "column": 32 + }, + "end": { + "line": 81, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2005, + "end": 2011, + "loc": { + "start": { + "line": 81, + "column": 38 + }, + "end": { + "line": 81, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 2013, + "end": 2028, + "loc": { + "start": { + "line": 81, + "column": 46 + }, + "end": { + "line": 81, + "column": 61 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2013, + "end": 2020, + "loc": { + "start": { + "line": 81, + "column": 46 + }, + "end": { + "line": 81, + "column": 53 + } + }, + "name": "another" + }, + "value": { + "type": "Literal", + "start": 2022, + "end": 2028, + "loc": { + "start": { + "line": 81, + "column": 55 + }, + "end": { + "line": 81, + "column": 61 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2046, + "end": 2048, + "loc": { + "start": { + "line": 82, + "column": 13 + }, + "end": { + "line": 82, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2049, + "end": 2056, + "loc": { + "start": { + "line": 82, + "column": 16 + }, + "end": { + "line": 82, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2057, + "end": 2073, + "loc": { + "start": { + "line": 82, + "column": 24 + }, + "end": { + "line": 82, + "column": 40 + } + }, + "properties": [ + { + "type": "Property", + "start": 2059, + "end": 2071, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 38 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2059, + "end": 2063, + "loc": { + "start": { + "line": 82, + "column": 26 + }, + "end": { + "line": 82, + "column": 30 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2065, + "end": 2071, + "loc": { + "start": { + "line": 82, + "column": 32 + }, + "end": { + "line": 82, + "column": 38 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2088, + "end": 2094, + "loc": { + "start": { + "line": 83, + "column": 13 + }, + "end": { + "line": 83, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 2095, + "end": 2099, + "loc": { + "start": { + "line": 83, + "column": 20 + }, + "end": { + "line": 83, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2115, + "end": 2410, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 90, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2115, + "end": 2409, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 90, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2115, + "end": 2117, + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 86, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2118, + "end": 2194, + "loc": { + "start": { + "line": 86, + "column": 7 + }, + "end": { + "line": 86, + "column": 83 + } + }, + "value": "uses the produce assertion with a readstream, containing at least key test", + "rawValue": "uses the produce assertion with a readstream, containing at least key test", + "raw": "\"uses the produce assertion with a readstream, containing at least key test\"" + }, + { + "type": "FunctionExpression", + "start": 2196, + "end": 2408, + "loc": { + "start": { + "line": 86, + "column": 85 + }, + "end": { + "line": 90, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2205, + "end": 2209, + "loc": { + "start": { + "line": 86, + "column": 94 + }, + "end": { + "line": 86, + "column": 98 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2211, + "end": 2408, + "loc": { + "start": { + "line": 86, + "column": 100 + }, + "end": { + "line": 90, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2221, + "end": 2402, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 81 + } + }, + "expression": { + "type": "CallExpression", + "start": 2221, + "end": 2401, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 80 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2221, + "end": 2340, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 89, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 2221, + "end": 2320, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 58 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2221, + "end": 2285, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 2221, + "end": 2277, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 88, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 2221, + "end": 2261, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 87, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 2221, + "end": 2227, + "loc": { + "start": { + "line": 87, + "column": 8 + }, + "end": { + "line": 87, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2228, + "end": 2260, + "loc": { + "start": { + "line": 87, + "column": 15 + }, + "end": { + "line": 87, + "column": 47 + } + }, + "callee": { + "type": "Identifier", + "start": 2232, + "end": 2242, + "loc": { + "start": { + "line": 87, + "column": 19 + }, + "end": { + "line": 87, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2243, + "end": 2259, + "loc": { + "start": { + "line": 87, + "column": 30 + }, + "end": { + "line": 87, + "column": 46 + } + }, + "properties": [ + { + "type": "Property", + "start": 2245, + "end": 2257, + "loc": { + "start": { + "line": 87, + "column": 32 + }, + "end": { + "line": 87, + "column": 44 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2245, + "end": 2249, + "loc": { + "start": { + "line": 87, + "column": 32 + }, + "end": { + "line": 87, + "column": 36 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2251, + "end": 2257, + "loc": { + "start": { + "line": 87, + "column": 38 + }, + "end": { + "line": 87, + "column": 44 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2275, + "end": 2277, + "loc": { + "start": { + "line": 88, + "column": 13 + }, + "end": { + "line": 88, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2278, + "end": 2285, + "loc": { + "start": { + "line": 88, + "column": 16 + }, + "end": { + "line": 88, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 2286, + "end": 2319, + "loc": { + "start": { + "line": 88, + "column": 24 + }, + "end": { + "line": 88, + "column": 57 + } + }, + "properties": [ + { + "type": "Property", + "start": 2288, + "end": 2300, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 38 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2288, + "end": 2292, + "loc": { + "start": { + "line": 88, + "column": 26 + }, + "end": { + "line": 88, + "column": 30 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 2294, + "end": 2300, + "loc": { + "start": { + "line": 88, + "column": 32 + }, + "end": { + "line": 88, + "column": 38 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + "kind": "init" + }, + { + "type": "Property", + "start": 2302, + "end": 2317, + "loc": { + "start": { + "line": 88, + "column": 40 + }, + "end": { + "line": 88, + "column": 55 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2302, + "end": 2309, + "loc": { + "start": { + "line": 88, + "column": 40 + }, + "end": { + "line": 88, + "column": 47 + } + }, + "name": "another" + }, + "value": { + "type": "Literal", + "start": 2311, + "end": 2317, + "loc": { + "start": { + "line": 88, + "column": 49 + }, + "end": { + "line": 88, + "column": 55 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2334, + "end": 2340, + "loc": { + "start": { + "line": 89, + "column": 13 + }, + "end": { + "line": 89, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2341, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 20 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2341, + "end": 2342, + "loc": { + "start": { + "line": 89, + "column": 20 + }, + "end": { + "line": 89, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2346, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 25 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "test": { + "type": "Identifier", + "start": 2346, + "end": 2347, + "loc": { + "start": { + "line": 89, + "column": 25 + }, + "end": { + "line": 89, + "column": 26 + } + }, + "name": "e" + }, + "consequent": { + "type": "CallExpression", + "start": 2350, + "end": 2356, + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 2350, + "end": 2354, + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 33 + } + }, + "name": "done" + }, + "arguments": [] + }, + "alternate": { + "type": "CallExpression", + "start": 2359, + "end": 2400, + "loc": { + "start": { + "line": 89, + "column": 38 + }, + "end": { + "line": 89, + "column": 79 + } + }, + "callee": { + "type": "Identifier", + "start": 2359, + "end": 2363, + "loc": { + "start": { + "line": 89, + "column": 38 + }, + "end": { + "line": 89, + "column": 42 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2364, + "end": 2399, + "loc": { + "start": { + "line": 89, + "column": 43 + }, + "end": { + "line": 89, + "column": 78 + } + }, + "callee": { + "type": "Identifier", + "start": 2368, + "end": 2373, + "loc": { + "start": { + "line": 89, + "column": 47 + }, + "end": { + "line": 89, + "column": 52 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 2374, + "end": 2398, + "loc": { + "start": { + "line": 89, + "column": 53 + }, + "end": { + "line": 89, + "column": 77 + } + }, + "value": "Shouldn't end up here.", + "rawValue": "Shouldn't end up here.", + "raw": "\"Shouldn't end up here.\"" + } + ] + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2416, + "end": 3008, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 108, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2416, + "end": 3007, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 108, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2416, + "end": 2418, + "loc": { + "start": { + "line": 92, + "column": 4 + }, + "end": { + "line": 92, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2419, + "end": 2493, + "loc": { + "start": { + "line": 92, + "column": 7 + }, + "end": { + "line": 92, + "column": 81 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly and fails", + "rawValue": "uses the produce assertion with a readstream, matching exactly and fails", + "raw": "\"uses the produce assertion with a readstream, matching exactly and fails\"" + }, + { + "type": "FunctionExpression", + "start": 2495, + "end": 3006, + "loc": { + "start": { + "line": 92, + "column": 83 + }, + "end": { + "line": 108, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2504, + "end": 2508, + "loc": { + "start": { + "line": 92, + "column": 92 + }, + "end": { + "line": 92, + "column": 96 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 2510, + "end": 3006, + "loc": { + "start": { + "line": 92, + "column": 98 + }, + "end": { + "line": 108, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2520, + "end": 2578, + "loc": { + "start": { + "line": 93, + "column": 8 + }, + "end": { + "line": 93, + "column": 66 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2526, + "end": 2577, + "loc": { + "start": { + "line": 93, + "column": 14 + }, + "end": { + "line": 93, + "column": 65 + } + }, + "id": { + "type": "Identifier", + "start": 2526, + "end": 2532, + "loc": { + "start": { + "line": 93, + "column": 14 + }, + "end": { + "line": 93, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 2535, + "end": 2577, + "loc": { + "start": { + "line": 93, + "column": 23 + }, + "end": { + "line": 93, + "column": 65 + } + }, + "callee": { + "type": "Identifier", + "start": 2539, + "end": 2549, + "loc": { + "start": { + "line": 93, + "column": 27 + }, + "end": { + "line": 93, + "column": 37 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2550, + "end": 2576, + "loc": { + "start": { + "line": 93, + "column": 38 + }, + "end": { + "line": 93, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2551, + "end": 2558, + "loc": { + "start": { + "line": 93, + "column": 39 + }, + "end": { + "line": 93, + "column": 46 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 2560, + "end": 2566, + "loc": { + "start": { + "line": 93, + "column": 48 + }, + "end": { + "line": 93, + "column": 54 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 2568, + "end": 2575, + "loc": { + "start": { + "line": 93, + "column": 56 + }, + "end": { + "line": 93, + "column": 63 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2588, + "end": 3000, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 107, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 2588, + "end": 2999, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 107, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2588, + "end": 2675, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 97, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 2588, + "end": 2655, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2588, + "end": 2626, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 2588, + "end": 2618, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 96, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 2588, + "end": 2602, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 22 + } + }, + "callee": { + "type": "Identifier", + "start": 2588, + "end": 2594, + "loc": { + "start": { + "line": 95, + "column": 8 + }, + "end": { + "line": 95, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2595, + "end": 2601, + "loc": { + "start": { + "line": 95, + "column": 15 + }, + "end": { + "line": 95, + "column": 21 + } + }, + "name": "stream" + } + ] + }, + "property": { + "type": "Identifier", + "start": 2616, + "end": 2618, + "loc": { + "start": { + "line": 96, + "column": 13 + }, + "end": { + "line": 96, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2619, + "end": 2626, + "loc": { + "start": { + "line": 96, + "column": 16 + }, + "end": { + "line": 96, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 2627, + "end": 2654, + "loc": { + "start": { + "line": 96, + "column": 24 + }, + "end": { + "line": 96, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 2628, + "end": 2635, + "loc": { + "start": { + "line": 96, + "column": 25 + }, + "end": { + "line": 96, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 2637, + "end": 2644, + "loc": { + "start": { + "line": 96, + "column": 34 + }, + "end": { + "line": 96, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 2646, + "end": 2653, + "loc": { + "start": { + "line": 96, + "column": 43 + }, + "end": { + "line": 96, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2669, + "end": 2675, + "loc": { + "start": { + "line": 97, + "column": 13 + }, + "end": { + "line": 97, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2676, + "end": 2998, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 107, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2676, + "end": 2677, + "loc": { + "start": { + "line": 97, + "column": 20 + }, + "end": { + "line": 97, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 2681, + "end": 2998, + "loc": { + "start": { + "line": 97, + "column": 25 + }, + "end": { + "line": 107, + "column": 13 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 2699, + "end": 2744, + "loc": { + "start": { + "line": 98, + "column": 16 + }, + "end": { + "line": 98, + "column": 61 + } + }, + "test": { + "type": "UnaryExpression", + "start": 2702, + "end": 2704, + "loc": { + "start": { + "line": 98, + "column": 19 + }, + "end": { + "line": 98, + "column": 21 + } + }, + "operator": "!", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2703, + "end": 2704, + "loc": { + "start": { + "line": 98, + "column": 20 + }, + "end": { + "line": 98, + "column": 21 + } + }, + "name": "e" + } + }, + "consequent": { + "type": "ReturnStatement", + "start": 2706, + "end": 2744, + "loc": { + "start": { + "line": 98, + "column": 23 + }, + "end": { + "line": 98, + "column": 61 + } + }, + "argument": { + "type": "CallExpression", + "start": 2713, + "end": 2743, + "loc": { + "start": { + "line": 98, + "column": 30 + }, + "end": { + "line": 98, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 2713, + "end": 2717, + "loc": { + "start": { + "line": 98, + "column": 30 + }, + "end": { + "line": 98, + "column": 34 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 2718, + "end": 2742, + "loc": { + "start": { + "line": 98, + "column": 35 + }, + "end": { + "line": 98, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 2722, + "end": 2727, + "loc": { + "start": { + "line": 98, + "column": 39 + }, + "end": { + "line": 98, + "column": 44 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 2728, + "end": 2741, + "loc": { + "start": { + "line": 98, + "column": 45 + }, + "end": { + "line": 98, + "column": 58 + } + }, + "value": "Should fail", + "rawValue": "Should fail", + "raw": "\"Should fail\"" + } + ] + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 2762, + "end": 2984, + "loc": { + "start": { + "line": 100, + "column": 16 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 2766, + "end": 2917, + "loc": { + "start": { + "line": 100, + "column": 20 + }, + "end": { + "line": 104, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 2788, + "end": 2840, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 2788, + "end": 2839, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2788, + "end": 2832, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 2788, + "end": 2826, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 2788, + "end": 2823, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 2788, + "end": 2794, + "loc": { + "start": { + "line": 101, + "column": 20 + }, + "end": { + "line": 101, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 2795, + "end": 2822, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 2795, + "end": 2816, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 48 + } + }, + "object": { + "type": "Identifier", + "start": 2795, + "end": 2801, + "loc": { + "start": { + "line": 101, + "column": 27 + }, + "end": { + "line": 101, + "column": 33 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 2802, + "end": 2816, + "loc": { + "start": { + "line": 101, + "column": 34 + }, + "end": { + "line": 101, + "column": 48 + } + }, + "name": "_readableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2817, + "end": 2822, + "loc": { + "start": { + "line": 101, + "column": 49 + }, + "end": { + "line": 101, + "column": 54 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 2824, + "end": 2826, + "loc": { + "start": { + "line": 101, + "column": 56 + }, + "end": { + "line": 101, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2827, + "end": 2832, + "loc": { + "start": { + "line": 101, + "column": 59 + }, + "end": { + "line": 101, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2833, + "end": 2838, + "loc": { + "start": { + "line": 101, + "column": 65 + }, + "end": { + "line": 101, + "column": 70 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2841, + "end": 2863, + "loc": { + "start": { + "line": 101, + "column": 73 + }, + "end": { + "line": 101, + "column": 95 + } + }, + "range": [ + 2841, + 2863 + ] + } + ] + }, + { + "type": "ReturnStatement", + "start": 2885, + "end": 2899, + "loc": { + "start": { + "line": 103, + "column": 20 + }, + "end": { + "line": 103, + "column": 34 + } + }, + "argument": { + "type": "CallExpression", + "start": 2892, + "end": 2898, + "loc": { + "start": { + "line": 103, + "column": 27 + }, + "end": { + "line": 103, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 2892, + "end": 2896, + "loc": { + "start": { + "line": 103, + "column": 27 + }, + "end": { + "line": 103, + "column": 31 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 2841, + "end": 2863, + "loc": { + "start": { + "line": 101, + "column": 73 + }, + "end": { + "line": 101, + "column": 95 + } + }, + "range": [ + 2841, + 2863 + ] + } + ] + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 2918, + "end": 2984, + "loc": { + "start": { + "line": 104, + "column": 18 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 2924, + "end": 2926, + "loc": { + "start": { + "line": 104, + "column": 24 + }, + "end": { + "line": 104, + "column": 26 + } + }, + "name": "e2" + }, + "body": { + "type": "BlockStatement", + "start": 2928, + "end": 2984, + "loc": { + "start": { + "line": 104, + "column": 28 + }, + "end": { + "line": 106, + "column": 17 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 2950, + "end": 2966, + "loc": { + "start": { + "line": 105, + "column": 20 + }, + "end": { + "line": 105, + "column": 36 + } + }, + "argument": { + "type": "CallExpression", + "start": 2957, + "end": 2965, + "loc": { + "start": { + "line": 105, + "column": 27 + }, + "end": { + "line": 105, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 2957, + "end": 2961, + "loc": { + "start": { + "line": 105, + "column": 27 + }, + "end": { + "line": 105, + "column": 31 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2962, + "end": 2964, + "loc": { + "start": { + "line": 105, + "column": 32 + }, + "end": { + "line": 105, + "column": 34 + } + }, + "name": "e2" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3014, + "end": 3596, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 126, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3014, + "end": 3595, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 126, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3014, + "end": 3016, + "loc": { + "start": { + "line": 110, + "column": 4 + }, + "end": { + "line": 110, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3017, + "end": 3085, + "loc": { + "start": { + "line": 110, + "column": 7 + }, + "end": { + "line": 110, + "column": 75 + } + }, + "value": "uses the produce assertion with a readstream, matching not exactly", + "rawValue": "uses the produce assertion with a readstream, matching not exactly", + "raw": "\"uses the produce assertion with a readstream, matching not exactly\"" + }, + { + "type": "FunctionExpression", + "start": 3087, + "end": 3594, + "loc": { + "start": { + "line": 110, + "column": 77 + }, + "end": { + "line": 126, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3096, + "end": 3100, + "loc": { + "start": { + "line": 110, + "column": 86 + }, + "end": { + "line": 110, + "column": 90 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3102, + "end": 3594, + "loc": { + "start": { + "line": 110, + "column": 92 + }, + "end": { + "line": 126, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 3112, + "end": 3179, + "loc": { + "start": { + "line": 111, + "column": 8 + }, + "end": { + "line": 111, + "column": 75 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 3118, + "end": 3178, + "loc": { + "start": { + "line": 111, + "column": 14 + }, + "end": { + "line": 111, + "column": 74 + } + }, + "id": { + "type": "Identifier", + "start": 3118, + "end": 3124, + "loc": { + "start": { + "line": 111, + "column": 14 + }, + "end": { + "line": 111, + "column": 20 + } + }, + "name": "stream" + }, + "init": { + "type": "NewExpression", + "start": 3127, + "end": 3178, + "loc": { + "start": { + "line": 111, + "column": 23 + }, + "end": { + "line": 111, + "column": 74 + } + }, + "callee": { + "type": "Identifier", + "start": 3131, + "end": 3141, + "loc": { + "start": { + "line": 111, + "column": 27 + }, + "end": { + "line": 111, + "column": 37 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3142, + "end": 3177, + "loc": { + "start": { + "line": 111, + "column": 38 + }, + "end": { + "line": 111, + "column": 73 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3143, + "end": 3150, + "loc": { + "start": { + "line": 111, + "column": 39 + }, + "end": { + "line": 111, + "column": 46 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3152, + "end": 3158, + "loc": { + "start": { + "line": 111, + "column": 48 + }, + "end": { + "line": 111, + "column": 54 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 3160, + "end": 3167, + "loc": { + "start": { + "line": 111, + "column": 56 + }, + "end": { + "line": 111, + "column": 63 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3169, + "end": 3176, + "loc": { + "start": { + "line": 111, + "column": 65 + }, + "end": { + "line": 111, + "column": 72 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 3189, + "end": 3588, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 125, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 3189, + "end": 3587, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 125, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3189, + "end": 3287, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 115, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3189, + "end": 3267, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3189, + "end": 3238, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 3189, + "end": 3230, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 3189, + "end": 3219, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 114, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 3189, + "end": 3203, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 113, + "column": 22 + } + }, + "callee": { + "type": "Identifier", + "start": 3189, + "end": 3195, + "loc": { + "start": { + "line": 113, + "column": 8 + }, + "end": { + "line": 113, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3196, + "end": 3202, + "loc": { + "start": { + "line": 113, + "column": 15 + }, + "end": { + "line": 113, + "column": 21 + } + }, + "name": "stream" + } + ] + }, + "property": { + "type": "Identifier", + "start": 3217, + "end": 3219, + "loc": { + "start": { + "line": 114, + "column": 13 + }, + "end": { + "line": 114, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3220, + "end": 3230, + "loc": { + "start": { + "line": 114, + "column": 16 + }, + "end": { + "line": 114, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3231, + "end": 3238, + "loc": { + "start": { + "line": 114, + "column": 27 + }, + "end": { + "line": 114, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3239, + "end": 3266, + "loc": { + "start": { + "line": 114, + "column": 35 + }, + "end": { + "line": 114, + "column": 62 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3240, + "end": 3247, + "loc": { + "start": { + "line": 114, + "column": 36 + }, + "end": { + "line": 114, + "column": 43 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3249, + "end": 3256, + "loc": { + "start": { + "line": 114, + "column": 45 + }, + "end": { + "line": 114, + "column": 52 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3258, + "end": 3265, + "loc": { + "start": { + "line": 114, + "column": 54 + }, + "end": { + "line": 114, + "column": 61 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3281, + "end": 3287, + "loc": { + "start": { + "line": 115, + "column": 13 + }, + "end": { + "line": 115, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 3288, + "end": 3586, + "loc": { + "start": { + "line": 115, + "column": 20 + }, + "end": { + "line": 125, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3288, + "end": 3289, + "loc": { + "start": { + "line": 115, + "column": 20 + }, + "end": { + "line": 115, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "BlockStatement", + "start": 3293, + "end": 3586, + "loc": { + "start": { + "line": 115, + "column": 25 + }, + "end": { + "line": 125, + "column": 13 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 3311, + "end": 3332, + "loc": { + "start": { + "line": 116, + "column": 16 + }, + "end": { + "line": 116, + "column": 37 + } + }, + "test": { + "type": "Identifier", + "start": 3314, + "end": 3315, + "loc": { + "start": { + "line": 116, + "column": 19 + }, + "end": { + "line": 116, + "column": 20 + } + }, + "name": "e" + }, + "consequent": { + "type": "ReturnStatement", + "start": 3317, + "end": 3332, + "loc": { + "start": { + "line": 116, + "column": 22 + }, + "end": { + "line": 116, + "column": 37 + } + }, + "argument": { + "type": "CallExpression", + "start": 3324, + "end": 3331, + "loc": { + "start": { + "line": 116, + "column": 29 + }, + "end": { + "line": 116, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 3324, + "end": 3328, + "loc": { + "start": { + "line": 116, + "column": 29 + }, + "end": { + "line": 116, + "column": 33 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3329, + "end": 3330, + "loc": { + "start": { + "line": 116, + "column": 34 + }, + "end": { + "line": 116, + "column": 35 + } + }, + "name": "e" + } + ] + } + }, + "alternate": null + }, + { + "type": "TryStatement", + "start": 3350, + "end": 3572, + "loc": { + "start": { + "line": 118, + "column": 16 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 3354, + "end": 3505, + "loc": { + "start": { + "line": 118, + "column": 20 + }, + "end": { + "line": 122, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3376, + "end": 3428, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 3376, + "end": 3427, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3376, + "end": 3420, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 3376, + "end": 3414, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 3376, + "end": 3411, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 3376, + "end": 3382, + "loc": { + "start": { + "line": 119, + "column": 20 + }, + "end": { + "line": 119, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 3383, + "end": 3410, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 3383, + "end": 3404, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 48 + } + }, + "object": { + "type": "Identifier", + "start": 3383, + "end": 3389, + "loc": { + "start": { + "line": 119, + "column": 27 + }, + "end": { + "line": 119, + "column": 33 + } + }, + "name": "stream" + }, + "property": { + "type": "Identifier", + "start": 3390, + "end": 3404, + "loc": { + "start": { + "line": 119, + "column": 34 + }, + "end": { + "line": 119, + "column": 48 + } + }, + "name": "_readableState" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3405, + "end": 3410, + "loc": { + "start": { + "line": 119, + "column": 49 + }, + "end": { + "line": 119, + "column": 54 + } + }, + "name": "ended" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 3412, + "end": 3414, + "loc": { + "start": { + "line": 119, + "column": 56 + }, + "end": { + "line": 119, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3415, + "end": 3420, + "loc": { + "start": { + "line": 119, + "column": 59 + }, + "end": { + "line": 119, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 3421, + "end": 3426, + "loc": { + "start": { + "line": 119, + "column": 65 + }, + "end": { + "line": 119, + "column": 70 + } + }, + "value": false, + "rawValue": false, + "raw": "false" + } + ] + }, + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3429, + "end": 3451, + "loc": { + "start": { + "line": 119, + "column": 73 + }, + "end": { + "line": 119, + "column": 95 + } + }, + "range": [ + 3429, + 3451 + ] + } + ] + }, + { + "type": "ReturnStatement", + "start": 3473, + "end": 3487, + "loc": { + "start": { + "line": 121, + "column": 20 + }, + "end": { + "line": 121, + "column": 34 + } + }, + "argument": { + "type": "CallExpression", + "start": 3480, + "end": 3486, + "loc": { + "start": { + "line": 121, + "column": 27 + }, + "end": { + "line": 121, + "column": 33 + } + }, + "callee": { + "type": "Identifier", + "start": 3480, + "end": 3484, + "loc": { + "start": { + "line": 121, + "column": 27 + }, + "end": { + "line": 121, + "column": 31 + } + }, + "name": "done", + "leadingComments": null + }, + "arguments": [], + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line", + "start": 3429, + "end": 3451, + "loc": { + "start": { + "line": 119, + "column": 73 + }, + "end": { + "line": 119, + "column": 95 + } + }, + "range": [ + 3429, + 3451 + ] + } + ] + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 3506, + "end": 3572, + "loc": { + "start": { + "line": 122, + "column": 18 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 3512, + "end": 3514, + "loc": { + "start": { + "line": 122, + "column": 24 + }, + "end": { + "line": 122, + "column": 26 + } + }, + "name": "e2" + }, + "body": { + "type": "BlockStatement", + "start": 3516, + "end": 3572, + "loc": { + "start": { + "line": 122, + "column": 28 + }, + "end": { + "line": 124, + "column": 17 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 3538, + "end": 3554, + "loc": { + "start": { + "line": 123, + "column": 20 + }, + "end": { + "line": 123, + "column": 36 + } + }, + "argument": { + "type": "CallExpression", + "start": 3545, + "end": 3553, + "loc": { + "start": { + "line": 123, + "column": 27 + }, + "end": { + "line": 123, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 3545, + "end": 3549, + "loc": { + "start": { + "line": 123, + "column": 27 + }, + "end": { + "line": 123, + "column": 31 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 3550, + "end": 3552, + "loc": { + "start": { + "line": 123, + "column": 32 + }, + "end": { + "line": 123, + "column": 34 + } + }, + "name": "e2" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3602, + "end": 3919, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 133, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3602, + "end": 3918, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 133, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3602, + "end": 3604, + "loc": { + "start": { + "line": 128, + "column": 4 + }, + "end": { + "line": 128, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3605, + "end": 3698, + "loc": { + "start": { + "line": 128, + "column": 7 + }, + "end": { + "line": 128, + "column": 100 + } + }, + "value": "uses the produce assertion with a readstream, matching exactly, but filtering some messages", + "rawValue": "uses the produce assertion with a readstream, matching exactly, but filtering some messages", + "raw": "\"uses the produce assertion with a readstream, matching exactly, but filtering some messages\"" + }, + { + "type": "FunctionExpression", + "start": 3700, + "end": 3917, + "loc": { + "start": { + "line": 128, + "column": 102 + }, + "end": { + "line": 133, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3709, + "end": 3713, + "loc": { + "start": { + "line": 128, + "column": 111 + }, + "end": { + "line": 128, + "column": 115 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 3715, + "end": 3917, + "loc": { + "start": { + "line": 128, + "column": 117 + }, + "end": { + "line": 133, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 3725, + "end": 3911, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 26 + } + }, + "expression": { + "type": "CallExpression", + "start": 3725, + "end": 3910, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 25 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3904, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 132, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3884, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3855, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 3725, + "end": 3847, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 131, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3831, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 130, + "column": 46 + } + }, + "callee": { + "type": "MemberExpression", + "start": 3725, + "end": 3804, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 130, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 3725, + "end": 3784, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 129, + "column": 67 + } + }, + "callee": { + "type": "Identifier", + "start": 3725, + "end": 3731, + "loc": { + "start": { + "line": 129, + "column": 8 + }, + "end": { + "line": 129, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 3732, + "end": 3783, + "loc": { + "start": { + "line": 129, + "column": 15 + }, + "end": { + "line": 129, + "column": 66 + } + }, + "callee": { + "type": "Identifier", + "start": 3736, + "end": 3746, + "loc": { + "start": { + "line": 129, + "column": 19 + }, + "end": { + "line": 129, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3747, + "end": 3782, + "loc": { + "start": { + "line": 129, + "column": 30 + }, + "end": { + "line": 129, + "column": 65 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3748, + "end": 3755, + "loc": { + "start": { + "line": 129, + "column": 31 + }, + "end": { + "line": 129, + "column": 38 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3757, + "end": 3763, + "loc": { + "start": { + "line": 129, + "column": 40 + }, + "end": { + "line": 129, + "column": 46 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 3765, + "end": 3772, + "loc": { + "start": { + "line": 129, + "column": 48 + }, + "end": { + "line": 129, + "column": 55 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3774, + "end": 3781, + "loc": { + "start": { + "line": 129, + "column": 57 + }, + "end": { + "line": 129, + "column": 64 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3798, + "end": 3804, + "loc": { + "start": { + "line": 130, + "column": 13 + }, + "end": { + "line": 130, + "column": 19 + } + }, + "name": "filter" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 3805, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 20 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 3805, + "end": 3810, + "loc": { + "start": { + "line": 130, + "column": 20 + }, + "end": { + "line": 130, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 3814, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 29 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "left": { + "type": "Identifier", + "start": 3814, + "end": 3819, + "loc": { + "start": { + "line": 130, + "column": 29 + }, + "end": { + "line": 130, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 3824, + "end": 3830, + "loc": { + "start": { + "line": 130, + "column": 39 + }, + "end": { + "line": 130, + "column": 45 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + } + } + ] + }, + "property": { + "type": "Identifier", + "start": 3845, + "end": 3847, + "loc": { + "start": { + "line": 131, + "column": 13 + }, + "end": { + "line": 131, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 3848, + "end": 3855, + "loc": { + "start": { + "line": 131, + "column": 16 + }, + "end": { + "line": 131, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 3856, + "end": 3883, + "loc": { + "start": { + "line": 131, + "column": 24 + }, + "end": { + "line": 131, + "column": 51 + } + }, + "elements": [ + { + "type": "Literal", + "start": 3857, + "end": 3864, + "loc": { + "start": { + "line": 131, + "column": 25 + }, + "end": { + "line": 131, + "column": 32 + } + }, + "value": "lala1", + "rawValue": "lala1", + "raw": "\"lala1\"" + }, + { + "type": "Literal", + "start": 3866, + "end": 3873, + "loc": { + "start": { + "line": 131, + "column": 34 + }, + "end": { + "line": 131, + "column": 41 + } + }, + "value": "lala2", + "rawValue": "lala2", + "raw": "\"lala2\"" + }, + { + "type": "Literal", + "start": 3875, + "end": 3882, + "loc": { + "start": { + "line": 131, + "column": 43 + }, + "end": { + "line": 131, + "column": 50 + } + }, + "value": "lala3", + "rawValue": "lala3", + "raw": "\"lala3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 3898, + "end": 3904, + "loc": { + "start": { + "line": 132, + "column": 13 + }, + "end": { + "line": 132, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 3905, + "end": 3909, + "loc": { + "start": { + "line": 132, + "column": 20 + }, + "end": { + "line": 132, + "column": 24 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 3925, + "end": 4108, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 137, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 3925, + "end": 4107, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 137, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 3925, + "end": 3927, + "loc": { + "start": { + "line": 135, + "column": 4 + }, + "end": { + "line": 135, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 3928, + "end": 4005, + "loc": { + "start": { + "line": 135, + "column": 7 + }, + "end": { + "line": 135, + "column": 84 + } + }, + "value": "uses the eventually produce assertion with a readstream, producing buffers.", + "rawValue": "uses the eventually produce assertion with a readstream, producing buffers.", + "raw": "\"uses the eventually produce assertion with a readstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4007, + "end": 4106, + "loc": { + "start": { + "line": 135, + "column": 86 + }, + "end": { + "line": 137, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4016, + "end": 4020, + "loc": { + "start": { + "line": 135, + "column": 95 + }, + "end": { + "line": 135, + "column": 99 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4022, + "end": 4106, + "loc": { + "start": { + "line": 135, + "column": 101 + }, + "end": { + "line": 137, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4032, + "end": 4100, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 76 + } + }, + "expression": { + "type": "CallExpression", + "start": 4032, + "end": 4099, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 75 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4032, + "end": 4093, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 4032, + "end": 4086, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4032, + "end": 4078, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4032, + "end": 4070, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4032, + "end": 4059, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4032, + "end": 4056, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4032, + "end": 4038, + "loc": { + "start": { + "line": 136, + "column": 8 + }, + "end": { + "line": 136, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4039, + "end": 4055, + "loc": { + "start": { + "line": 136, + "column": 15 + }, + "end": { + "line": 136, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4043, + "end": 4053, + "loc": { + "start": { + "line": 136, + "column": 19 + }, + "end": { + "line": 136, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4057, + "end": 4059, + "loc": { + "start": { + "line": 136, + "column": 33 + }, + "end": { + "line": 136, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4060, + "end": 4070, + "loc": { + "start": { + "line": 136, + "column": 36 + }, + "end": { + "line": 136, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4071, + "end": 4078, + "loc": { + "start": { + "line": 136, + "column": 47 + }, + "end": { + "line": 136, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4079, + "end": 4085, + "loc": { + "start": { + "line": 136, + "column": 55 + }, + "end": { + "line": 136, + "column": 61 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 4087, + "end": 4093, + "loc": { + "start": { + "line": 136, + "column": 63 + }, + "end": { + "line": 136, + "column": 69 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 4094, + "end": 4098, + "loc": { + "start": { + "line": 136, + "column": 70 + }, + "end": { + "line": 136, + "column": 74 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4114, + "end": 4356, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 145, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4114, + "end": 4355, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 145, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4114, + "end": 4116, + "loc": { + "start": { + "line": 139, + "column": 4 + }, + "end": { + "line": 139, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4117, + "end": 4183, + "loc": { + "start": { + "line": 139, + "column": 7 + }, + "end": { + "line": 139, + "column": 73 + } + }, + "value": "uses the produce assertion with a readstream, producing objects.", + "rawValue": "uses the produce assertion with a readstream, producing objects.", + "raw": "\"uses the produce assertion with a readstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 4185, + "end": 4354, + "loc": { + "start": { + "line": 139, + "column": 75 + }, + "end": { + "line": 145, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4194, + "end": 4198, + "loc": { + "start": { + "line": 139, + "column": 84 + }, + "end": { + "line": 139, + "column": 88 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4200, + "end": 4354, + "loc": { + "start": { + "line": 139, + "column": 90 + }, + "end": { + "line": 145, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4210, + "end": 4348, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 24 + } + }, + "expression": { + "type": "CallExpression", + "start": 4210, + "end": 4347, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 23 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4210, + "end": 4341, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 4210, + "end": 4334, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 144, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4210, + "end": 4262, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 60 + } + }, + "object": { + "type": "MemberExpression", + "start": 4210, + "end": 4254, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 4210, + "end": 4243, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 4210, + "end": 4240, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 4210, + "end": 4216, + "loc": { + "start": { + "line": 140, + "column": 8 + }, + "end": { + "line": 140, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4217, + "end": 4239, + "loc": { + "start": { + "line": 140, + "column": 15 + }, + "end": { + "line": 140, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 4221, + "end": 4237, + "loc": { + "start": { + "line": 140, + "column": 19 + }, + "end": { + "line": 140, + "column": 35 + } + }, + "name": "ReadObjectStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4241, + "end": 4243, + "loc": { + "start": { + "line": 140, + "column": 39 + }, + "end": { + "line": 140, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4244, + "end": 4254, + "loc": { + "start": { + "line": 140, + "column": 42 + }, + "end": { + "line": 140, + "column": 52 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4255, + "end": 4262, + "loc": { + "start": { + "line": 140, + "column": 53 + }, + "end": { + "line": 140, + "column": 60 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 4263, + "end": 4333, + "loc": { + "start": { + "line": 140, + "column": 61 + }, + "end": { + "line": 144, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 4277, + "end": 4323, + "loc": { + "start": { + "line": 141, + "column": 12 + }, + "end": { + "line": 143, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4277, + "end": 4281, + "loc": { + "start": { + "line": 141, + "column": 12 + }, + "end": { + "line": 141, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 4283, + "end": 4323, + "loc": { + "start": { + "line": 141, + "column": 18 + }, + "end": { + "line": 143, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 4301, + "end": 4309, + "loc": { + "start": { + "line": 142, + "column": 16 + }, + "end": { + "line": 142, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4301, + "end": 4305, + "loc": { + "start": { + "line": 142, + "column": 16 + }, + "end": { + "line": 142, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 4307, + "end": 4309, + "loc": { + "start": { + "line": 142, + "column": 22 + }, + "end": { + "line": 142, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4335, + "end": 4341, + "loc": { + "start": { + "line": 144, + "column": 11 + }, + "end": { + "line": 144, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 4342, + "end": 4346, + "loc": { + "start": { + "line": 144, + "column": 18 + }, + "end": { + "line": 144, + "column": 22 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4362, + "end": 4605, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 150, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4362, + "end": 4604, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 150, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4362, + "end": 4364, + "loc": { + "start": { + "line": 147, + "column": 4 + }, + "end": { + "line": 147, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4365, + "end": 4426, + "loc": { + "start": { + "line": 147, + "column": 7 + }, + "end": { + "line": 147, + "column": 68 + } + }, + "value": "fails the produce assertion on the readstream with buffers.", + "rawValue": "fails the produce assertion on the readstream with buffers.", + "raw": "\"fails the produce assertion on the readstream with buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4428, + "end": 4603, + "loc": { + "start": { + "line": 147, + "column": 70 + }, + "end": { + "line": 150, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4437, + "end": 4441, + "loc": { + "start": { + "line": 147, + "column": 79 + }, + "end": { + "line": 147, + "column": 83 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4443, + "end": 4603, + "loc": { + "start": { + "line": 147, + "column": 85 + }, + "end": { + "line": 150, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4453, + "end": 4559, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 114 + } + }, + "expression": { + "type": "CallExpression", + "start": 4453, + "end": 4558, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 113 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4453, + "end": 4514, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 4453, + "end": 4507, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 62 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4453, + "end": 4499, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4453, + "end": 4491, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4453, + "end": 4480, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4453, + "end": 4477, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4453, + "end": 4459, + "loc": { + "start": { + "line": 148, + "column": 8 + }, + "end": { + "line": 148, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4460, + "end": 4476, + "loc": { + "start": { + "line": 148, + "column": 15 + }, + "end": { + "line": 148, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4464, + "end": 4474, + "loc": { + "start": { + "line": 148, + "column": 19 + }, + "end": { + "line": 148, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4478, + "end": 4480, + "loc": { + "start": { + "line": 148, + "column": 33 + }, + "end": { + "line": 148, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4481, + "end": 4491, + "loc": { + "start": { + "line": 148, + "column": 36 + }, + "end": { + "line": 148, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4492, + "end": 4499, + "loc": { + "start": { + "line": 148, + "column": 47 + }, + "end": { + "line": 148, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 4500, + "end": 4506, + "loc": { + "start": { + "line": 148, + "column": 55 + }, + "end": { + "line": 148, + "column": 61 + } + }, + "value": "lulu", + "rawValue": "lulu", + "raw": "\"lulu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 4508, + "end": 4514, + "loc": { + "start": { + "line": 148, + "column": 63 + }, + "end": { + "line": 148, + "column": 69 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4515, + "end": 4557, + "loc": { + "start": { + "line": 148, + "column": 70 + }, + "end": { + "line": 148, + "column": 112 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4521, + "end": 4557, + "loc": { + "start": { + "line": 148, + "column": 76 + }, + "end": { + "line": 148, + "column": 112 + } + }, + "callee": { + "type": "Identifier", + "start": 4521, + "end": 4525, + "loc": { + "start": { + "line": 148, + "column": 76 + }, + "end": { + "line": 148, + "column": 80 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4526, + "end": 4556, + "loc": { + "start": { + "line": 148, + "column": 81 + }, + "end": { + "line": 148, + "column": 111 + } + }, + "callee": { + "type": "Identifier", + "start": 4530, + "end": 4535, + "loc": { + "start": { + "line": 148, + "column": 85 + }, + "end": { + "line": 148, + "column": 90 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 4536, + "end": 4555, + "loc": { + "start": { + "line": 148, + "column": 91 + }, + "end": { + "line": 148, + "column": 110 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4568, + "end": 4597, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 4568, + "end": 4596, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 4568, + "end": 4578, + "loc": { + "start": { + "line": 149, + "column": 8 + }, + "end": { + "line": 149, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4579, + "end": 4591, + "loc": { + "start": { + "line": 149, + "column": 19 + }, + "end": { + "line": 149, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4585, + "end": 4591, + "loc": { + "start": { + "line": 149, + "column": 25 + }, + "end": { + "line": 149, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4585, + "end": 4589, + "loc": { + "start": { + "line": 149, + "column": 25 + }, + "end": { + "line": 149, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 4593, + "end": 4595, + "loc": { + "start": { + "line": 149, + "column": 33 + }, + "end": { + "line": 149, + "column": 35 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4611, + "end": 4886, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 158, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4611, + "end": 4885, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 158, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4611, + "end": 4613, + "loc": { + "start": { + "line": 152, + "column": 4 + }, + "end": { + "line": 152, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4614, + "end": 4675, + "loc": { + "start": { + "line": 152, + "column": 7 + }, + "end": { + "line": 152, + "column": 68 + } + }, + "value": "fails the produce assertion on the readstream with objects.", + "rawValue": "fails the produce assertion on the readstream with objects.", + "raw": "\"fails the produce assertion on the readstream with objects.\"" + }, + { + "type": "FunctionExpression", + "start": 4677, + "end": 4884, + "loc": { + "start": { + "line": 152, + "column": 70 + }, + "end": { + "line": 158, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4686, + "end": 4690, + "loc": { + "start": { + "line": 152, + "column": 79 + }, + "end": { + "line": 152, + "column": 83 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4692, + "end": 4884, + "loc": { + "start": { + "line": 152, + "column": 85 + }, + "end": { + "line": 158, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4702, + "end": 4839, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 62 + } + }, + "expression": { + "type": "CallExpression", + "start": 4702, + "end": 4838, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 61 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4702, + "end": 4794, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 4702, + "end": 4787, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 155, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4702, + "end": 4748, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 4702, + "end": 4740, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 4702, + "end": 4729, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 35 + } + }, + "object": { + "type": "CallExpression", + "start": 4702, + "end": 4726, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 4702, + "end": 4708, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4709, + "end": 4725, + "loc": { + "start": { + "line": 153, + "column": 15 + }, + "end": { + "line": 153, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4713, + "end": 4723, + "loc": { + "start": { + "line": 153, + "column": 19 + }, + "end": { + "line": 153, + "column": 29 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4727, + "end": 4729, + "loc": { + "start": { + "line": 153, + "column": 33 + }, + "end": { + "line": 153, + "column": 35 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4730, + "end": 4740, + "loc": { + "start": { + "line": 153, + "column": 36 + }, + "end": { + "line": 153, + "column": 46 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 4741, + "end": 4748, + "loc": { + "start": { + "line": 153, + "column": 47 + }, + "end": { + "line": 153, + "column": 54 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 4749, + "end": 4786, + "loc": { + "start": { + "line": 153, + "column": 55 + }, + "end": { + "line": 155, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 4763, + "end": 4776, + "loc": { + "start": { + "line": 154, + "column": 12 + }, + "end": { + "line": 154, + "column": 25 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 4763, + "end": 4767, + "loc": { + "start": { + "line": 154, + "column": 12 + }, + "end": { + "line": 154, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 4769, + "end": 4776, + "loc": { + "start": { + "line": 154, + "column": 18 + }, + "end": { + "line": 154, + "column": 25 + } + }, + "value": "test2", + "rawValue": "test2", + "raw": "\"test2\"" + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 4788, + "end": 4794, + "loc": { + "start": { + "line": 155, + "column": 11 + }, + "end": { + "line": 155, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4795, + "end": 4837, + "loc": { + "start": { + "line": 155, + "column": 18 + }, + "end": { + "line": 155, + "column": 60 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4801, + "end": 4837, + "loc": { + "start": { + "line": 155, + "column": 24 + }, + "end": { + "line": 155, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 4801, + "end": 4805, + "loc": { + "start": { + "line": 155, + "column": 24 + }, + "end": { + "line": 155, + "column": 28 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 4806, + "end": 4836, + "loc": { + "start": { + "line": 155, + "column": 29 + }, + "end": { + "line": 155, + "column": 59 + } + }, + "callee": { + "type": "Identifier", + "start": 4810, + "end": 4815, + "loc": { + "start": { + "line": 155, + "column": 33 + }, + "end": { + "line": 155, + "column": 38 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 4816, + "end": 4835, + "loc": { + "start": { + "line": 155, + "column": 39 + }, + "end": { + "line": 155, + "column": 58 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4849, + "end": 4878, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 4849, + "end": 4877, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 4849, + "end": 4859, + "loc": { + "start": { + "line": 157, + "column": 8 + }, + "end": { + "line": 157, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 4860, + "end": 4872, + "loc": { + "start": { + "line": 157, + "column": 19 + }, + "end": { + "line": 157, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 4866, + "end": 4872, + "loc": { + "start": { + "line": 157, + "column": 25 + }, + "end": { + "line": 157, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 4866, + "end": 4870, + "loc": { + "start": { + "line": 157, + "column": 25 + }, + "end": { + "line": 157, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 4874, + "end": 4876, + "loc": { + "start": { + "line": 157, + "column": 33 + }, + "end": { + "line": 157, + "column": 35 + } + }, + "value": 20, + "rawValue": 20, + "raw": "20" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 4892, + "end": 5101, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 162, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 4892, + "end": 5100, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 162, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 4892, + "end": 4894, + "loc": { + "start": { + "line": 160, + "column": 4 + }, + "end": { + "line": 160, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 4895, + "end": 4966, + "loc": { + "start": { + "line": 160, + "column": 7 + }, + "end": { + "line": 160, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing buffers.", + "rawValue": "uses the produce assertion with a transformstream, producing buffers.", + "raw": "\"uses the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 4968, + "end": 5099, + "loc": { + "start": { + "line": 160, + "column": 80 + }, + "end": { + "line": 162, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 4977, + "end": 4981, + "loc": { + "start": { + "line": 160, + "column": 89 + }, + "end": { + "line": 160, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 4983, + "end": 5099, + "loc": { + "start": { + "line": 160, + "column": 95 + }, + "end": { + "line": 162, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 4993, + "end": 5093, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 108 + } + }, + "expression": { + "type": "CallExpression", + "start": 4993, + "end": 5092, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 107 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5086, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 101 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5079, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 94 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5055, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 70 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5052, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 67 + } + }, + "callee": { + "type": "MemberExpression", + "start": 4993, + "end": 5044, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 59 + } + }, + "object": { + "type": "MemberExpression", + "start": 4993, + "end": 5036, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 4993, + "end": 5025, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 40 + } + }, + "object": { + "type": "CallExpression", + "start": 4993, + "end": 5022, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 4993, + "end": 4999, + "loc": { + "start": { + "line": 161, + "column": 8 + }, + "end": { + "line": 161, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5000, + "end": 5021, + "loc": { + "start": { + "line": 161, + "column": 15 + }, + "end": { + "line": 161, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5004, + "end": 5019, + "loc": { + "start": { + "line": 161, + "column": 19 + }, + "end": { + "line": 161, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5023, + "end": 5025, + "loc": { + "start": { + "line": 161, + "column": 38 + }, + "end": { + "line": 161, + "column": 40 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5026, + "end": 5036, + "loc": { + "start": { + "line": 161, + "column": 41 + }, + "end": { + "line": 161, + "column": 51 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5037, + "end": 5044, + "loc": { + "start": { + "line": 161, + "column": 52 + }, + "end": { + "line": 161, + "column": 59 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5045, + "end": 5051, + "loc": { + "start": { + "line": 161, + "column": 60 + }, + "end": { + "line": 161, + "column": 66 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5053, + "end": 5055, + "loc": { + "start": { + "line": 161, + "column": 68 + }, + "end": { + "line": 161, + "column": 70 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5056, + "end": 5062, + "loc": { + "start": { + "line": 161, + "column": 71 + }, + "end": { + "line": 161, + "column": 77 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5064, + "end": 5070, + "loc": { + "start": { + "line": 161, + "column": 79 + }, + "end": { + "line": 161, + "column": 85 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 5072, + "end": 5078, + "loc": { + "start": { + "line": 161, + "column": 87 + }, + "end": { + "line": 161, + "column": 93 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5080, + "end": 5086, + "loc": { + "start": { + "line": 161, + "column": 95 + }, + "end": { + "line": 161, + "column": 101 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 5087, + "end": 5091, + "loc": { + "start": { + "line": 161, + "column": 102 + }, + "end": { + "line": 161, + "column": 106 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5107, + "end": 5455, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 174, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5107, + "end": 5454, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 174, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5107, + "end": 5109, + "loc": { + "start": { + "line": 164, + "column": 4 + }, + "end": { + "line": 164, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5110, + "end": 5181, + "loc": { + "start": { + "line": 164, + "column": 7 + }, + "end": { + "line": 164, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing objects.", + "rawValue": "uses the produce assertion with a transformstream, producing objects.", + "raw": "\"uses the produce assertion with a transformstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 5183, + "end": 5453, + "loc": { + "start": { + "line": 164, + "column": 80 + }, + "end": { + "line": 174, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5192, + "end": 5196, + "loc": { + "start": { + "line": 164, + "column": 89 + }, + "end": { + "line": 164, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5198, + "end": 5453, + "loc": { + "start": { + "line": 164, + "column": 95 + }, + "end": { + "line": 174, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5208, + "end": 5447, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 24 + } + }, + "expression": { + "type": "CallExpression", + "start": 5208, + "end": 5446, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 23 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5440, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 17 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5433, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 173, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5337, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 169, + "column": 13 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5334, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 169, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5208, + "end": 5262, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 62 + } + }, + "object": { + "type": "MemberExpression", + "start": 5208, + "end": 5254, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 54 + } + }, + "object": { + "type": "MemberExpression", + "start": 5208, + "end": 5243, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 43 + } + }, + "object": { + "type": "CallExpression", + "start": 5208, + "end": 5240, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 5208, + "end": 5214, + "loc": { + "start": { + "line": 165, + "column": 8 + }, + "end": { + "line": 165, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5215, + "end": 5239, + "loc": { + "start": { + "line": 165, + "column": 15 + }, + "end": { + "line": 165, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 5219, + "end": 5237, + "loc": { + "start": { + "line": 165, + "column": 19 + }, + "end": { + "line": 165, + "column": 37 + } + }, + "name": "TransformObjStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5241, + "end": 5243, + "loc": { + "start": { + "line": 165, + "column": 41 + }, + "end": { + "line": 165, + "column": 43 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5244, + "end": 5254, + "loc": { + "start": { + "line": 165, + "column": 44 + }, + "end": { + "line": 165, + "column": 54 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5255, + "end": 5262, + "loc": { + "start": { + "line": 165, + "column": 55 + }, + "end": { + "line": 165, + "column": 62 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 5263, + "end": 5333, + "loc": { + "start": { + "line": 165, + "column": 63 + }, + "end": { + "line": 169, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 5277, + "end": 5323, + "loc": { + "start": { + "line": 166, + "column": 12 + }, + "end": { + "line": 168, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5277, + "end": 5281, + "loc": { + "start": { + "line": 166, + "column": 12 + }, + "end": { + "line": 166, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5283, + "end": 5323, + "loc": { + "start": { + "line": 166, + "column": 18 + }, + "end": { + "line": 168, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5301, + "end": 5309, + "loc": { + "start": { + "line": 167, + "column": 16 + }, + "end": { + "line": 167, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5301, + "end": 5305, + "loc": { + "start": { + "line": 167, + "column": 16 + }, + "end": { + "line": 167, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 5307, + "end": 5309, + "loc": { + "start": { + "line": 167, + "column": 22 + }, + "end": { + "line": 167, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5335, + "end": 5337, + "loc": { + "start": { + "line": 169, + "column": 11 + }, + "end": { + "line": 169, + "column": 13 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5338, + "end": 5344, + "loc": { + "start": { + "line": 169, + "column": 14 + }, + "end": { + "line": 169, + "column": 20 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5346, + "end": 5352, + "loc": { + "start": { + "line": 169, + "column": 22 + }, + "end": { + "line": 169, + "column": 28 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 5354, + "end": 5360, + "loc": { + "start": { + "line": 169, + "column": 30 + }, + "end": { + "line": 169, + "column": 36 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + }, + { + "type": "ObjectExpression", + "start": 5362, + "end": 5432, + "loc": { + "start": { + "line": 169, + "column": 38 + }, + "end": { + "line": 173, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 5376, + "end": 5422, + "loc": { + "start": { + "line": 170, + "column": 12 + }, + "end": { + "line": 172, + "column": 13 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5376, + "end": 5380, + "loc": { + "start": { + "line": 170, + "column": 12 + }, + "end": { + "line": 170, + "column": 16 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5382, + "end": 5422, + "loc": { + "start": { + "line": 170, + "column": 18 + }, + "end": { + "line": 172, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5400, + "end": 5408, + "loc": { + "start": { + "line": 171, + "column": 16 + }, + "end": { + "line": 171, + "column": 24 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5400, + "end": 5404, + "loc": { + "start": { + "line": 171, + "column": 16 + }, + "end": { + "line": 171, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 5406, + "end": 5408, + "loc": { + "start": { + "line": 171, + "column": 22 + }, + "end": { + "line": 171, + "column": 24 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5434, + "end": 5440, + "loc": { + "start": { + "line": 173, + "column": 11 + }, + "end": { + "line": 173, + "column": 17 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 5441, + "end": 5445, + "loc": { + "start": { + "line": 173, + "column": 18 + }, + "end": { + "line": 173, + "column": 22 + } + }, + "name": "done" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5461, + "end": 5779, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 183, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5461, + "end": 5778, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 183, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5461, + "end": 5463, + "loc": { + "start": { + "line": 176, + "column": 4 + }, + "end": { + "line": 176, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5464, + "end": 5536, + "loc": { + "start": { + "line": 176, + "column": 7 + }, + "end": { + "line": 176, + "column": 79 + } + }, + "value": "fails the produce assertion with a transformstream, producing buffers.", + "rawValue": "fails the produce assertion with a transformstream, producing buffers.", + "raw": "\"fails the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 5538, + "end": 5777, + "loc": { + "start": { + "line": 176, + "column": 81 + }, + "end": { + "line": 183, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5547, + "end": 5551, + "loc": { + "start": { + "line": 176, + "column": 90 + }, + "end": { + "line": 176, + "column": 94 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5553, + "end": 5777, + "loc": { + "start": { + "line": 176, + "column": 96 + }, + "end": { + "line": 183, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5563, + "end": 5732, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 5563, + "end": 5731, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5687, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 180, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5667, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 179, + "column": 31 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5651, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 179, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5635, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 42 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5563, + "end": 5627, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 5563, + "end": 5619, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 5563, + "end": 5608, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 178, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5563, + "end": 5592, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 177, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 5563, + "end": 5569, + "loc": { + "start": { + "line": 177, + "column": 8 + }, + "end": { + "line": 177, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5570, + "end": 5591, + "loc": { + "start": { + "line": 177, + "column": 15 + }, + "end": { + "line": 177, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5574, + "end": 5589, + "loc": { + "start": { + "line": 177, + "column": 19 + }, + "end": { + "line": 177, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5606, + "end": 5608, + "loc": { + "start": { + "line": 178, + "column": 13 + }, + "end": { + "line": 178, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5609, + "end": 5619, + "loc": { + "start": { + "line": 178, + "column": 16 + }, + "end": { + "line": 178, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5620, + "end": 5627, + "loc": { + "start": { + "line": 178, + "column": 27 + }, + "end": { + "line": 178, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5628, + "end": 5634, + "loc": { + "start": { + "line": 178, + "column": 35 + }, + "end": { + "line": 178, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5649, + "end": 5651, + "loc": { + "start": { + "line": 179, + "column": 13 + }, + "end": { + "line": 179, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 5652, + "end": 5658, + "loc": { + "start": { + "line": 179, + "column": 16 + }, + "end": { + "line": 179, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 5660, + "end": 5666, + "loc": { + "start": { + "line": 179, + "column": 24 + }, + "end": { + "line": 179, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 5681, + "end": 5687, + "loc": { + "start": { + "line": 180, + "column": 13 + }, + "end": { + "line": 180, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 5688, + "end": 5730, + "loc": { + "start": { + "line": 180, + "column": 20 + }, + "end": { + "line": 180, + "column": 62 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 5694, + "end": 5730, + "loc": { + "start": { + "line": 180, + "column": 26 + }, + "end": { + "line": 180, + "column": 62 + } + }, + "callee": { + "type": "Identifier", + "start": 5694, + "end": 5698, + "loc": { + "start": { + "line": 180, + "column": 26 + }, + "end": { + "line": 180, + "column": 30 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5699, + "end": 5729, + "loc": { + "start": { + "line": 180, + "column": 31 + }, + "end": { + "line": 180, + "column": 61 + } + }, + "callee": { + "type": "Identifier", + "start": 5703, + "end": 5708, + "loc": { + "start": { + "line": 180, + "column": 35 + }, + "end": { + "line": 180, + "column": 40 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 5709, + "end": 5728, + "loc": { + "start": { + "line": 180, + "column": 41 + }, + "end": { + "line": 180, + "column": 60 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5742, + "end": 5771, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 5742, + "end": 5770, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 5742, + "end": 5752, + "loc": { + "start": { + "line": 182, + "column": 8 + }, + "end": { + "line": 182, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 5753, + "end": 5765, + "loc": { + "start": { + "line": 182, + "column": 19 + }, + "end": { + "line": 182, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 5759, + "end": 5765, + "loc": { + "start": { + "line": 182, + "column": 25 + }, + "end": { + "line": 182, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 5759, + "end": 5763, + "loc": { + "start": { + "line": 182, + "column": 25 + }, + "end": { + "line": 182, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 5767, + "end": 5769, + "loc": { + "start": { + "line": 182, + "column": 33 + }, + "end": { + "line": 182, + "column": 35 + } + }, + "value": 70, + "rawValue": 70, + "raw": "70" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 5785, + "end": 6273, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 200, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 5785, + "end": 6272, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 200, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 5785, + "end": 5787, + "loc": { + "start": { + "line": 185, + "column": 4 + }, + "end": { + "line": 185, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 5788, + "end": 5860, + "loc": { + "start": { + "line": 185, + "column": 7 + }, + "end": { + "line": 185, + "column": 79 + } + }, + "value": "fails the produce assertion with a transformstream, producing objects.", + "rawValue": "fails the produce assertion with a transformstream, producing objects.", + "raw": "\"fails the produce assertion with a transformstream, producing objects.\"" + }, + { + "type": "FunctionExpression", + "start": 5862, + "end": 6271, + "loc": { + "start": { + "line": 185, + "column": 81 + }, + "end": { + "line": 200, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 5871, + "end": 5875, + "loc": { + "start": { + "line": 185, + "column": 90 + }, + "end": { + "line": 185, + "column": 94 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 5877, + "end": 6271, + "loc": { + "start": { + "line": 185, + "column": 96 + }, + "end": { + "line": 200, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 5887, + "end": 6226, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 64 + } + }, + "expression": { + "type": "CallExpression", + "start": 5887, + "end": 6225, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 63 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 6181, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 197, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 6161, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 196, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 6058, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 192, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 6042, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 191, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 5887, + "end": 5954, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 5887, + "end": 5946, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 5887, + "end": 5935, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 187, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 5887, + "end": 5919, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 186, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 5887, + "end": 5893, + "loc": { + "start": { + "line": 186, + "column": 8 + }, + "end": { + "line": 186, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 5894, + "end": 5918, + "loc": { + "start": { + "line": 186, + "column": 15 + }, + "end": { + "line": 186, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 5898, + "end": 5916, + "loc": { + "start": { + "line": 186, + "column": 19 + }, + "end": { + "line": 186, + "column": 37 + } + }, + "name": "TransformObjStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 5933, + "end": 5935, + "loc": { + "start": { + "line": 187, + "column": 13 + }, + "end": { + "line": 187, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5936, + "end": 5946, + "loc": { + "start": { + "line": 187, + "column": 16 + }, + "end": { + "line": 187, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 5947, + "end": 5954, + "loc": { + "start": { + "line": 187, + "column": 27 + }, + "end": { + "line": 187, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ObjectExpression", + "start": 5955, + "end": 6041, + "loc": { + "start": { + "line": 187, + "column": 35 + }, + "end": { + "line": 191, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 5973, + "end": 6027, + "loc": { + "start": { + "line": 188, + "column": 16 + }, + "end": { + "line": 190, + "column": 17 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 5973, + "end": 5977, + "loc": { + "start": { + "line": 188, + "column": 16 + }, + "end": { + "line": 188, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 5979, + "end": 6027, + "loc": { + "start": { + "line": 188, + "column": 22 + }, + "end": { + "line": 190, + "column": 17 + } + }, + "properties": [ + { + "type": "Property", + "start": 6001, + "end": 6009, + "loc": { + "start": { + "line": 189, + "column": 20 + }, + "end": { + "line": 189, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6001, + "end": 6005, + "loc": { + "start": { + "line": 189, + "column": 20 + }, + "end": { + "line": 189, + "column": 24 + } + }, + "name": "test" + }, + "value": { + "type": "ArrayExpression", + "start": 6007, + "end": 6009, + "loc": { + "start": { + "line": 189, + "column": 26 + }, + "end": { + "line": 189, + "column": 28 + } + }, + "elements": [] + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6056, + "end": 6058, + "loc": { + "start": { + "line": 192, + "column": 13 + }, + "end": { + "line": 192, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6059, + "end": 6065, + "loc": { + "start": { + "line": 192, + "column": 16 + }, + "end": { + "line": 192, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 6067, + "end": 6073, + "loc": { + "start": { + "line": 192, + "column": 24 + }, + "end": { + "line": 192, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "ObjectExpression", + "start": 6075, + "end": 6160, + "loc": { + "start": { + "line": 192, + "column": 32 + }, + "end": { + "line": 196, + "column": 13 + } + }, + "properties": [ + { + "type": "Property", + "start": 6093, + "end": 6146, + "loc": { + "start": { + "line": 193, + "column": 16 + }, + "end": { + "line": 195, + "column": 17 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6093, + "end": 6097, + "loc": { + "start": { + "line": 193, + "column": 16 + }, + "end": { + "line": 193, + "column": 20 + } + }, + "name": "test" + }, + "value": { + "type": "ObjectExpression", + "start": 6099, + "end": 6146, + "loc": { + "start": { + "line": 193, + "column": 22 + }, + "end": { + "line": 195, + "column": 17 + } + }, + "properties": [ + { + "type": "Property", + "start": 6121, + "end": 6128, + "loc": { + "start": { + "line": 194, + "column": 20 + }, + "end": { + "line": 194, + "column": 27 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 6121, + "end": 6125, + "loc": { + "start": { + "line": 194, + "column": 20 + }, + "end": { + "line": 194, + "column": 24 + } + }, + "name": "test" + }, + "value": { + "type": "Literal", + "start": 6127, + "end": 6128, + "loc": { + "start": { + "line": 194, + "column": 26 + }, + "end": { + "line": 194, + "column": 27 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6175, + "end": 6181, + "loc": { + "start": { + "line": 197, + "column": 13 + }, + "end": { + "line": 197, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 6182, + "end": 6224, + "loc": { + "start": { + "line": 197, + "column": 20 + }, + "end": { + "line": 197, + "column": 62 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 6188, + "end": 6224, + "loc": { + "start": { + "line": 197, + "column": 26 + }, + "end": { + "line": 197, + "column": 62 + } + }, + "callee": { + "type": "Identifier", + "start": 6188, + "end": 6192, + "loc": { + "start": { + "line": 197, + "column": 26 + }, + "end": { + "line": 197, + "column": 30 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6193, + "end": 6223, + "loc": { + "start": { + "line": 197, + "column": 31 + }, + "end": { + "line": 197, + "column": 61 + } + }, + "callee": { + "type": "Identifier", + "start": 6197, + "end": 6202, + "loc": { + "start": { + "line": 197, + "column": 35 + }, + "end": { + "line": 197, + "column": 40 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 6203, + "end": 6222, + "loc": { + "start": { + "line": 197, + "column": 41 + }, + "end": { + "line": 197, + "column": 60 + } + }, + "value": "should not finish", + "rawValue": "should not finish", + "raw": "\"should not finish\"" + } + ] + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6236, + "end": 6265, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 37 + } + }, + "expression": { + "type": "CallExpression", + "start": 6236, + "end": 6264, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 6236, + "end": 6246, + "loc": { + "start": { + "line": 199, + "column": 8 + }, + "end": { + "line": 199, + "column": 18 + } + }, + "name": "setTimeout" + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 6247, + "end": 6259, + "loc": { + "start": { + "line": 199, + "column": 19 + }, + "end": { + "line": 199, + "column": 31 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 6253, + "end": 6259, + "loc": { + "start": { + "line": 199, + "column": 25 + }, + "end": { + "line": 199, + "column": 31 + } + }, + "callee": { + "type": "Identifier", + "start": 6253, + "end": 6257, + "loc": { + "start": { + "line": 199, + "column": 25 + }, + "end": { + "line": 199, + "column": 29 + } + }, + "name": "done" + }, + "arguments": [] + } + }, + { + "type": "Literal", + "start": 6261, + "end": 6263, + "loc": { + "start": { + "line": 199, + "column": 33 + }, + "end": { + "line": 199, + "column": 35 + } + }, + "value": 70, + "rawValue": 70, + "raw": "70" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6279, + "end": 6594, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 209, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6279, + "end": 6593, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 209, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6279, + "end": 6281, + "loc": { + "start": { + "line": 202, + "column": 4 + }, + "end": { + "line": 202, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6282, + "end": 6321, + "loc": { + "start": { + "line": 202, + "column": 7 + }, + "end": { + "line": 202, + "column": 46 + } + }, + "value": "tries to test a readstream with input", + "rawValue": "tries to test a readstream with input", + "raw": "\"tries to test a readstream with input\"" + }, + { + "type": "FunctionExpression", + "start": 6323, + "end": 6592, + "loc": { + "start": { + "line": 202, + "column": 48 + }, + "end": { + "line": 209, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6332, + "end": 6336, + "loc": { + "start": { + "line": 202, + "column": 57 + }, + "end": { + "line": 202, + "column": 61 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 6338, + "end": 6592, + "loc": { + "start": { + "line": 202, + "column": 63 + }, + "end": { + "line": 209, + "column": 5 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 6348, + "end": 6586, + "loc": { + "start": { + "line": 203, + "column": 8 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 6352, + "end": 6454, + "loc": { + "start": { + "line": 203, + "column": 12 + }, + "end": { + "line": 205, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6366, + "end": 6444, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6366, + "end": 6443, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6437, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 83 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6430, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 76 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6423, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 69 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6420, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6366, + "end": 6412, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 58 + } + }, + "object": { + "type": "MemberExpression", + "start": 6366, + "end": 6404, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 6366, + "end": 6393, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 39 + } + }, + "object": { + "type": "CallExpression", + "start": 6366, + "end": 6390, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 6366, + "end": 6372, + "loc": { + "start": { + "line": 204, + "column": 12 + }, + "end": { + "line": 204, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6373, + "end": 6389, + "loc": { + "start": { + "line": 204, + "column": 19 + }, + "end": { + "line": 204, + "column": 35 + } + }, + "callee": { + "type": "Identifier", + "start": 6377, + "end": 6387, + "loc": { + "start": { + "line": 204, + "column": 23 + }, + "end": { + "line": 204, + "column": 33 + } + }, + "name": "ReadStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6391, + "end": 6393, + "loc": { + "start": { + "line": 204, + "column": 37 + }, + "end": { + "line": 204, + "column": 39 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6394, + "end": 6404, + "loc": { + "start": { + "line": 204, + "column": 40 + }, + "end": { + "line": 204, + "column": 50 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6405, + "end": 6412, + "loc": { + "start": { + "line": 204, + "column": 51 + }, + "end": { + "line": 204, + "column": 58 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6413, + "end": 6419, + "loc": { + "start": { + "line": 204, + "column": 59 + }, + "end": { + "line": 204, + "column": 65 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6421, + "end": 6423, + "loc": { + "start": { + "line": 204, + "column": 67 + }, + "end": { + "line": 204, + "column": 69 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6424, + "end": 6429, + "loc": { + "start": { + "line": 204, + "column": 70 + }, + "end": { + "line": 204, + "column": 75 + } + }, + "value": "bla", + "rawValue": "bla", + "raw": "\"bla\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6431, + "end": 6437, + "loc": { + "start": { + "line": 204, + "column": 77 + }, + "end": { + "line": 204, + "column": 83 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 6438, + "end": 6442, + "loc": { + "start": { + "line": 204, + "column": 84 + }, + "end": { + "line": 204, + "column": 88 + } + }, + "name": "done" + } + ] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 6455, + "end": 6586, + "loc": { + "start": { + "line": 205, + "column": 10 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 6461, + "end": 6462, + "loc": { + "start": { + "line": 205, + "column": 16 + }, + "end": { + "line": 205, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 6464, + "end": 6586, + "loc": { + "start": { + "line": 205, + "column": 19 + }, + "end": { + "line": 208, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6478, + "end": 6556, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6478, + "end": 6555, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6478, + "end": 6490, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 6478, + "end": 6484, + "loc": { + "start": { + "line": 206, + "column": 12 + }, + "end": { + "line": 206, + "column": 18 + } + }, + "name": "assert" + }, + "property": { + "type": "Identifier", + "start": 6485, + "end": 6490, + "loc": { + "start": { + "line": 206, + "column": 19 + }, + "end": { + "line": 206, + "column": 24 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6491, + "end": 6500, + "loc": { + "start": { + "line": 206, + "column": 25 + }, + "end": { + "line": 206, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 6491, + "end": 6492, + "loc": { + "start": { + "line": 206, + "column": 25 + }, + "end": { + "line": 206, + "column": 26 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 6493, + "end": 6500, + "loc": { + "start": { + "line": 206, + "column": 27 + }, + "end": { + "line": 206, + "column": 34 + } + }, + "name": "message" + }, + "computed": false + }, + { + "type": "Literal", + "start": 6502, + "end": 6554, + "loc": { + "start": { + "line": 206, + "column": 36 + }, + "end": { + "line": 206, + "column": 88 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6569, + "end": 6576, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 6569, + "end": 6575, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 6569, + "end": 6573, + "loc": { + "start": { + "line": 207, + "column": 12 + }, + "end": { + "line": 207, + "column": 16 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6600, + "end": 6923, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 218, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6600, + "end": 6922, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 218, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6600, + "end": 6602, + "loc": { + "start": { + "line": 211, + "column": 4 + }, + "end": { + "line": 211, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6603, + "end": 6650, + "loc": { + "start": { + "line": 211, + "column": 7 + }, + "end": { + "line": 211, + "column": 54 + } + }, + "value": "tries to test a transformstream without input", + "rawValue": "tries to test a transformstream without input", + "raw": "\"tries to test a transformstream without input\"" + }, + { + "type": "FunctionExpression", + "start": 6652, + "end": 6921, + "loc": { + "start": { + "line": 211, + "column": 56 + }, + "end": { + "line": 218, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6661, + "end": 6665, + "loc": { + "start": { + "line": 211, + "column": 65 + }, + "end": { + "line": 211, + "column": 69 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 6667, + "end": 6921, + "loc": { + "start": { + "line": 211, + "column": 71 + }, + "end": { + "line": 218, + "column": 5 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 6677, + "end": 6915, + "loc": { + "start": { + "line": 212, + "column": 8 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "block": { + "type": "BlockStatement", + "start": 6681, + "end": 6783, + "loc": { + "start": { + "line": 212, + "column": 12 + }, + "end": { + "line": 214, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6695, + "end": 6773, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6695, + "end": 6772, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6766, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 83 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6759, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 76 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6757, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 74 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6754, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6695, + "end": 6746, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 6695, + "end": 6738, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 55 + } + }, + "object": { + "type": "MemberExpression", + "start": 6695, + "end": 6727, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 6695, + "end": 6724, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 6695, + "end": 6701, + "loc": { + "start": { + "line": 213, + "column": 12 + }, + "end": { + "line": 213, + "column": 18 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 6702, + "end": 6723, + "loc": { + "start": { + "line": 213, + "column": 19 + }, + "end": { + "line": 213, + "column": 40 + } + }, + "callee": { + "type": "Identifier", + "start": 6706, + "end": 6721, + "loc": { + "start": { + "line": 213, + "column": 23 + }, + "end": { + "line": 213, + "column": 38 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 6725, + "end": 6727, + "loc": { + "start": { + "line": 213, + "column": 42 + }, + "end": { + "line": 213, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6728, + "end": 6738, + "loc": { + "start": { + "line": 213, + "column": 45 + }, + "end": { + "line": 213, + "column": 55 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 6739, + "end": 6746, + "loc": { + "start": { + "line": 213, + "column": 56 + }, + "end": { + "line": 213, + "column": 63 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 6747, + "end": 6753, + "loc": { + "start": { + "line": 213, + "column": 64 + }, + "end": { + "line": 213, + "column": 70 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 6755, + "end": 6757, + "loc": { + "start": { + "line": 213, + "column": 72 + }, + "end": { + "line": 213, + "column": 74 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [] + }, + "property": { + "type": "Identifier", + "start": 6760, + "end": 6766, + "loc": { + "start": { + "line": 213, + "column": 77 + }, + "end": { + "line": 213, + "column": 83 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 6767, + "end": 6771, + "loc": { + "start": { + "line": 213, + "column": 84 + }, + "end": { + "line": 213, + "column": 88 + } + }, + "name": "done" + } + ] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 6784, + "end": 6915, + "loc": { + "start": { + "line": 214, + "column": 10 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "param": { + "type": "Identifier", + "start": 6790, + "end": 6791, + "loc": { + "start": { + "line": 214, + "column": 16 + }, + "end": { + "line": 214, + "column": 17 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 6793, + "end": 6915, + "loc": { + "start": { + "line": 214, + "column": 19 + }, + "end": { + "line": 217, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 6807, + "end": 6885, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 90 + } + }, + "expression": { + "type": "CallExpression", + "start": 6807, + "end": 6884, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 89 + } + }, + "callee": { + "type": "MemberExpression", + "start": 6807, + "end": 6819, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 6807, + "end": 6813, + "loc": { + "start": { + "line": 215, + "column": 12 + }, + "end": { + "line": 215, + "column": 18 + } + }, + "name": "assert" + }, + "property": { + "type": "Identifier", + "start": 6814, + "end": 6819, + "loc": { + "start": { + "line": 215, + "column": 19 + }, + "end": { + "line": 215, + "column": 24 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 6820, + "end": 6829, + "loc": { + "start": { + "line": 215, + "column": 25 + }, + "end": { + "line": 215, + "column": 34 + } + }, + "object": { + "type": "Identifier", + "start": 6820, + "end": 6821, + "loc": { + "start": { + "line": 215, + "column": 25 + }, + "end": { + "line": 215, + "column": 26 + } + }, + "name": "e" + }, + "property": { + "type": "Identifier", + "start": 6822, + "end": 6829, + "loc": { + "start": { + "line": 215, + "column": 27 + }, + "end": { + "line": 215, + "column": 34 + } + }, + "name": "message" + }, + "computed": false + }, + { + "type": "Literal", + "start": 6831, + "end": 6883, + "loc": { + "start": { + "line": 215, + "column": 36 + }, + "end": { + "line": 215, + "column": 88 + } + }, + "value": "You can only use arguments with a writable stream.", + "rawValue": "You can only use arguments with a writable stream.", + "raw": "\"You can only use arguments with a writable stream.\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6898, + "end": 6905, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 19 + } + }, + "expression": { + "type": "CallExpression", + "start": 6898, + "end": 6904, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 6898, + "end": 6902, + "loc": { + "start": { + "line": 216, + "column": 12 + }, + "end": { + "line": 216, + "column": 16 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 6929, + "end": 7248, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 225, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 6929, + "end": 7247, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 225, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 6929, + "end": 6931, + "loc": { + "start": { + "line": 220, + "column": 4 + }, + "end": { + "line": 220, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 6932, + "end": 7003, + "loc": { + "start": { + "line": 220, + "column": 7 + }, + "end": { + "line": 220, + "column": 78 + } + }, + "value": "uses the produce assertion with a transformstream, producing buffers.", + "rawValue": "uses the produce assertion with a transformstream, producing buffers.", + "raw": "\"uses the produce assertion with a transformstream, producing buffers.\"" + }, + { + "type": "FunctionExpression", + "start": 7005, + "end": 7246, + "loc": { + "start": { + "line": 220, + "column": 80 + }, + "end": { + "line": 225, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7014, + "end": 7018, + "loc": { + "start": { + "line": 220, + "column": 89 + }, + "end": { + "line": 220, + "column": 93 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 7020, + "end": 7246, + "loc": { + "start": { + "line": 220, + "column": 95 + }, + "end": { + "line": 225, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 7030, + "end": 7240, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 88 + } + }, + "expression": { + "type": "CallExpression", + "start": 7030, + "end": 7239, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 87 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7171, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 224, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7151, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 223, + "column": 39 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7127, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 223, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7111, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7030, + "end": 7083, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 23 + } + }, + "object": { + "type": "MemberExpression", + "start": 7030, + "end": 7075, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 222, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7030, + "end": 7059, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 221, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 7030, + "end": 7036, + "loc": { + "start": { + "line": 221, + "column": 8 + }, + "end": { + "line": 221, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7037, + "end": 7058, + "loc": { + "start": { + "line": 221, + "column": 15 + }, + "end": { + "line": 221, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 7041, + "end": 7056, + "loc": { + "start": { + "line": 221, + "column": 19 + }, + "end": { + "line": 221, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7073, + "end": 7075, + "loc": { + "start": { + "line": 222, + "column": 13 + }, + "end": { + "line": 222, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7076, + "end": 7083, + "loc": { + "start": { + "line": 222, + "column": 16 + }, + "end": { + "line": 222, + "column": 23 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7084, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 24 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7084, + "end": 7085, + "loc": { + "start": { + "line": 222, + "column": 24 + }, + "end": { + "line": 222, + "column": 25 + } + }, + "name": "x" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 7089, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "test": { + "type": "BinaryExpression", + "start": 7089, + "end": 7101, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 41 + } + }, + "left": { + "type": "Identifier", + "start": 7089, + "end": 7090, + "loc": { + "start": { + "line": 222, + "column": 29 + }, + "end": { + "line": 222, + "column": 30 + } + }, + "name": "x" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 7095, + "end": 7101, + "loc": { + "start": { + "line": 222, + "column": 35 + }, + "end": { + "line": 222, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + }, + "consequent": { + "type": "Literal", + "start": 7104, + "end": 7105, + "loc": { + "start": { + "line": 222, + "column": 44 + }, + "end": { + "line": 222, + "column": 45 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 7108, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 48 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 7109, + "end": 7110, + "loc": { + "start": { + "line": 222, + "column": 49 + }, + "end": { + "line": 222, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + } + ] + }, + "property": { + "type": "Identifier", + "start": 7125, + "end": 7127, + "loc": { + "start": { + "line": 223, + "column": 13 + }, + "end": { + "line": 223, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7128, + "end": 7134, + "loc": { + "start": { + "line": 223, + "column": 16 + }, + "end": { + "line": 223, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 7136, + "end": 7142, + "loc": { + "start": { + "line": 223, + "column": 24 + }, + "end": { + "line": 223, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 7144, + "end": 7150, + "loc": { + "start": { + "line": 223, + "column": 32 + }, + "end": { + "line": 223, + "column": 38 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7165, + "end": 7171, + "loc": { + "start": { + "line": 224, + "column": 13 + }, + "end": { + "line": 224, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7172, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 20 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7172, + "end": 7173, + "loc": { + "start": { + "line": 224, + "column": 20 + }, + "end": { + "line": 224, + "column": 21 + } + }, + "name": "e" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 7177, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "test": { + "type": "BinaryExpression", + "start": 7177, + "end": 7195, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 43 + } + }, + "left": { + "type": "Identifier", + "start": 7177, + "end": 7178, + "loc": { + "start": { + "line": 224, + "column": 25 + }, + "end": { + "line": 224, + "column": 26 + } + }, + "name": "e" + }, + "operator": "instanceof", + "right": { + "type": "Identifier", + "start": 7190, + "end": 7195, + "loc": { + "start": { + "line": 224, + "column": 38 + }, + "end": { + "line": 224, + "column": 43 + } + }, + "name": "Error" + } + }, + "consequent": { + "type": "CallExpression", + "start": 7198, + "end": 7204, + "loc": { + "start": { + "line": 224, + "column": 46 + }, + "end": { + "line": 224, + "column": 52 + } + }, + "callee": { + "type": "Identifier", + "start": 7198, + "end": 7202, + "loc": { + "start": { + "line": 224, + "column": 46 + }, + "end": { + "line": 224, + "column": 50 + } + }, + "name": "done" + }, + "arguments": [] + }, + "alternate": { + "type": "CallExpression", + "start": 7207, + "end": 7238, + "loc": { + "start": { + "line": 224, + "column": 55 + }, + "end": { + "line": 224, + "column": 86 + } + }, + "callee": { + "type": "Identifier", + "start": 7207, + "end": 7211, + "loc": { + "start": { + "line": 224, + "column": 55 + }, + "end": { + "line": 224, + "column": 59 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7212, + "end": 7237, + "loc": { + "start": { + "line": 224, + "column": 60 + }, + "end": { + "line": 224, + "column": 85 + } + }, + "callee": { + "type": "Identifier", + "start": 7216, + "end": 7221, + "loc": { + "start": { + "line": 224, + "column": 64 + }, + "end": { + "line": 224, + "column": 69 + } + }, + "name": "Error" + }, + "arguments": [ + { + "type": "Literal", + "start": 7222, + "end": 7236, + "loc": { + "start": { + "line": 224, + "column": 70 + }, + "end": { + "line": 224, + "column": 84 + } + }, + "value": "should throw", + "rawValue": "should throw", + "raw": "\"should throw\"" + } + ] + } + ] + } + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7254, + "end": 8137, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 248, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 7254, + "end": 8136, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 248, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 7254, + "end": 7256, + "loc": { + "start": { + "line": 227, + "column": 4 + }, + "end": { + "line": 227, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 7257, + "end": 7284, + "loc": { + "start": { + "line": 227, + "column": 7 + }, + "end": { + "line": 227, + "column": 34 + } + }, + "value": "taps a stream under test.", + "rawValue": "taps a stream under test.", + "raw": "\"taps a stream under test.\"" + }, + { + "type": "FunctionExpression", + "start": 7286, + "end": 8135, + "loc": { + "start": { + "line": 227, + "column": 36 + }, + "end": { + "line": 248, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 7295, + "end": 7299, + "loc": { + "start": { + "line": 227, + "column": 45 + }, + "end": { + "line": 227, + "column": 49 + } + }, + "name": "done" + } + ], + "body": { + "type": "BlockStatement", + "start": 7301, + "end": 8135, + "loc": { + "start": { + "line": 227, + "column": 51 + }, + "end": { + "line": 248, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 7311, + "end": 7335, + "loc": { + "start": { + "line": 228, + "column": 8 + }, + "end": { + "line": 228, + "column": 32 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 7317, + "end": 7334, + "loc": { + "start": { + "line": 228, + "column": 14 + }, + "end": { + "line": 228, + "column": 31 + } + }, + "id": { + "type": "Identifier", + "start": 7317, + "end": 7320, + "loc": { + "start": { + "line": 228, + "column": 14 + }, + "end": { + "line": 228, + "column": 17 + } + }, + "name": "spy" + }, + "init": { + "type": "CallExpression", + "start": 7323, + "end": 7334, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 31 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7323, + "end": 7332, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 7323, + "end": 7328, + "loc": { + "start": { + "line": 228, + "column": 20 + }, + "end": { + "line": 228, + "column": 25 + } + }, + "name": "sinon" + }, + "property": { + "type": "Identifier", + "start": 7329, + "end": 7332, + "loc": { + "start": { + "line": 228, + "column": 26 + }, + "end": { + "line": 228, + "column": 29 + } + }, + "name": "spy" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 7345, + "end": 8129, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 247, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 7345, + "end": 8128, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 247, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7499, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 234, + "column": 19 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7479, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 233, + "column": 21 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7474, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 233, + "column": 16 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7457, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 232, + "column": 39 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7433, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 232, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7417, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 42 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7345, + "end": 7409, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 34 + } + }, + "object": { + "type": "MemberExpression", + "start": 7345, + "end": 7401, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 26 + } + }, + "object": { + "type": "MemberExpression", + "start": 7345, + "end": 7390, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 231, + "column": 15 + } + }, + "object": { + "type": "CallExpression", + "start": 7345, + "end": 7374, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 230, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 7345, + "end": 7351, + "loc": { + "start": { + "line": 230, + "column": 8 + }, + "end": { + "line": 230, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "NewExpression", + "start": 7352, + "end": 7373, + "loc": { + "start": { + "line": 230, + "column": 15 + }, + "end": { + "line": 230, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 7356, + "end": 7371, + "loc": { + "start": { + "line": 230, + "column": 19 + }, + "end": { + "line": 230, + "column": 34 + } + }, + "name": "TransformStream" + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7388, + "end": 7390, + "loc": { + "start": { + "line": 231, + "column": 13 + }, + "end": { + "line": 231, + "column": 15 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7391, + "end": 7401, + "loc": { + "start": { + "line": 231, + "column": 16 + }, + "end": { + "line": 231, + "column": 26 + } + }, + "name": "eventually" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7402, + "end": 7409, + "loc": { + "start": { + "line": 231, + "column": 27 + }, + "end": { + "line": 231, + "column": 34 + } + }, + "name": "produce" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7410, + "end": 7416, + "loc": { + "start": { + "line": 231, + "column": 35 + }, + "end": { + "line": 231, + "column": 41 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7431, + "end": 7433, + "loc": { + "start": { + "line": 232, + "column": 13 + }, + "end": { + "line": 232, + "column": 15 + } + }, + "name": "on" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7434, + "end": 7440, + "loc": { + "start": { + "line": 232, + "column": 16 + }, + "end": { + "line": 232, + "column": 22 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + }, + { + "type": "Literal", + "start": 7442, + "end": 7448, + "loc": { + "start": { + "line": 232, + "column": 24 + }, + "end": { + "line": 232, + "column": 30 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + }, + { + "type": "Literal", + "start": 7450, + "end": 7456, + "loc": { + "start": { + "line": 232, + "column": 32 + }, + "end": { + "line": 232, + "column": 38 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7471, + "end": 7474, + "loc": { + "start": { + "line": 233, + "column": 13 + }, + "end": { + "line": 233, + "column": 16 + } + }, + "name": "tap" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 7475, + "end": 7478, + "loc": { + "start": { + "line": 233, + "column": 17 + }, + "end": { + "line": 233, + "column": 20 + } + }, + "name": "spy" + } + ] + }, + "property": { + "type": "Identifier", + "start": 7493, + "end": 7499, + "loc": { + "start": { + "line": 234, + "column": 13 + }, + "end": { + "line": 234, + "column": 19 + } + }, + "name": "notify" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 7500, + "end": 8127, + "loc": { + "start": { + "line": 234, + "column": 20 + }, + "end": { + "line": 247, + "column": 13 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 7506, + "end": 8127, + "loc": { + "start": { + "line": 234, + "column": 26 + }, + "end": { + "line": 247, + "column": 13 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 7524, + "end": 8113, + "loc": { + "start": { + "line": 235, + "column": 16 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "block": { + "type": "BlockStatement", + "start": 7528, + "end": 8055, + "loc": { + "start": { + "line": 235, + "column": 20 + }, + "end": { + "line": 244, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 7550, + "end": 7584, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 54 + } + }, + "expression": { + "type": "CallExpression", + "start": 7550, + "end": 7583, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7550, + "end": 7580, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 7550, + "end": 7574, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 7550, + "end": 7571, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 7550, + "end": 7556, + "loc": { + "start": { + "line": 236, + "column": 20 + }, + "end": { + "line": 236, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 7557, + "end": 7570, + "loc": { + "start": { + "line": 236, + "column": 27 + }, + "end": { + "line": 236, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7557, + "end": 7560, + "loc": { + "start": { + "line": 236, + "column": 27 + }, + "end": { + "line": 236, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7561, + "end": 7570, + "loc": { + "start": { + "line": 236, + "column": 31 + }, + "end": { + "line": 236, + "column": 40 + } + }, + "name": "callCount" + }, + "computed": false + } + ] + }, + "property": { + "type": "Identifier", + "start": 7572, + "end": 7574, + "loc": { + "start": { + "line": 236, + "column": 42 + }, + "end": { + "line": 236, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7575, + "end": 7580, + "loc": { + "start": { + "line": 236, + "column": 45 + }, + "end": { + "line": 236, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7581, + "end": 7582, + "loc": { + "start": { + "line": 236, + "column": 51 + }, + "end": { + "line": 236, + "column": 52 + } + }, + "value": 3, + "rawValue": 3, + "raw": "3" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7605, + "end": 7657, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 7605, + "end": 7656, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7605, + "end": 7648, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7605, + "end": 7642, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7605, + "end": 7639, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7605, + "end": 7611, + "loc": { + "start": { + "line": 237, + "column": 20 + }, + "end": { + "line": 237, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7612, + "end": 7638, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7612, + "end": 7636, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7612, + "end": 7630, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7612, + "end": 7625, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7612, + "end": 7615, + "loc": { + "start": { + "line": 237, + "column": 27 + }, + "end": { + "line": 237, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7616, + "end": 7625, + "loc": { + "start": { + "line": 237, + "column": 31 + }, + "end": { + "line": 237, + "column": 40 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7626, + "end": 7630, + "loc": { + "start": { + "line": 237, + "column": 41 + }, + "end": { + "line": 237, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7631, + "end": 7636, + "loc": { + "start": { + "line": 237, + "column": 46 + }, + "end": { + "line": 237, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7640, + "end": 7642, + "loc": { + "start": { + "line": 237, + "column": 55 + }, + "end": { + "line": 237, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7643, + "end": 7648, + "loc": { + "start": { + "line": 237, + "column": 58 + }, + "end": { + "line": 237, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7649, + "end": 7655, + "loc": { + "start": { + "line": 237, + "column": 64 + }, + "end": { + "line": 237, + "column": 70 + } + }, + "value": "lala", + "rawValue": "lala", + "raw": "\"lala\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7678, + "end": 7725, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 67 + } + }, + "expression": { + "type": "CallExpression", + "start": 7678, + "end": 7724, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7678, + "end": 7721, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7678, + "end": 7715, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7678, + "end": 7712, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7678, + "end": 7684, + "loc": { + "start": { + "line": 238, + "column": 20 + }, + "end": { + "line": 238, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7685, + "end": 7711, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7685, + "end": 7709, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7685, + "end": 7703, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7685, + "end": 7698, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7685, + "end": 7688, + "loc": { + "start": { + "line": 238, + "column": 27 + }, + "end": { + "line": 238, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7689, + "end": 7698, + "loc": { + "start": { + "line": 238, + "column": 31 + }, + "end": { + "line": 238, + "column": 40 + } + }, + "name": "firstCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7699, + "end": 7703, + "loc": { + "start": { + "line": 238, + "column": 41 + }, + "end": { + "line": 238, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7704, + "end": 7709, + "loc": { + "start": { + "line": 238, + "column": 46 + }, + "end": { + "line": 238, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7713, + "end": 7715, + "loc": { + "start": { + "line": 238, + "column": 55 + }, + "end": { + "line": 238, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7716, + "end": 7721, + "loc": { + "start": { + "line": 238, + "column": 58 + }, + "end": { + "line": 238, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7722, + "end": 7723, + "loc": { + "start": { + "line": 238, + "column": 64 + }, + "end": { + "line": 238, + "column": 65 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7746, + "end": 7799, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 73 + } + }, + "expression": { + "type": "CallExpression", + "start": 7746, + "end": 7798, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 72 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7746, + "end": 7790, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 7746, + "end": 7784, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 7746, + "end": 7781, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 7746, + "end": 7752, + "loc": { + "start": { + "line": 239, + "column": 20 + }, + "end": { + "line": 239, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7753, + "end": 7780, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7753, + "end": 7778, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 7753, + "end": 7772, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 7753, + "end": 7767, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 41 + } + }, + "object": { + "type": "Identifier", + "start": 7753, + "end": 7756, + "loc": { + "start": { + "line": 239, + "column": 27 + }, + "end": { + "line": 239, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7757, + "end": 7767, + "loc": { + "start": { + "line": 239, + "column": 31 + }, + "end": { + "line": 239, + "column": 41 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7768, + "end": 7772, + "loc": { + "start": { + "line": 239, + "column": 42 + }, + "end": { + "line": 239, + "column": 46 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7773, + "end": 7778, + "loc": { + "start": { + "line": 239, + "column": 47 + }, + "end": { + "line": 239, + "column": 52 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7782, + "end": 7784, + "loc": { + "start": { + "line": 239, + "column": 56 + }, + "end": { + "line": 239, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7785, + "end": 7790, + "loc": { + "start": { + "line": 239, + "column": 59 + }, + "end": { + "line": 239, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7791, + "end": 7797, + "loc": { + "start": { + "line": 239, + "column": 65 + }, + "end": { + "line": 239, + "column": 71 + } + }, + "value": "test", + "rawValue": "test", + "raw": "\"test\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7820, + "end": 7868, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 68 + } + }, + "expression": { + "type": "CallExpression", + "start": 7820, + "end": 7867, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 67 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7820, + "end": 7864, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 64 + } + }, + "object": { + "type": "MemberExpression", + "start": 7820, + "end": 7858, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 58 + } + }, + "object": { + "type": "CallExpression", + "start": 7820, + "end": 7855, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 55 + } + }, + "callee": { + "type": "Identifier", + "start": 7820, + "end": 7826, + "loc": { + "start": { + "line": 240, + "column": 20 + }, + "end": { + "line": 240, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7827, + "end": 7854, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7827, + "end": 7852, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 52 + } + }, + "object": { + "type": "MemberExpression", + "start": 7827, + "end": 7846, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 46 + } + }, + "object": { + "type": "MemberExpression", + "start": 7827, + "end": 7841, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 41 + } + }, + "object": { + "type": "Identifier", + "start": 7827, + "end": 7830, + "loc": { + "start": { + "line": 240, + "column": 27 + }, + "end": { + "line": 240, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7831, + "end": 7841, + "loc": { + "start": { + "line": 240, + "column": 31 + }, + "end": { + "line": 240, + "column": 41 + } + }, + "name": "secondCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7842, + "end": 7846, + "loc": { + "start": { + "line": 240, + "column": 42 + }, + "end": { + "line": 240, + "column": 46 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7847, + "end": 7852, + "loc": { + "start": { + "line": 240, + "column": 47 + }, + "end": { + "line": 240, + "column": 52 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7856, + "end": 7858, + "loc": { + "start": { + "line": 240, + "column": 56 + }, + "end": { + "line": 240, + "column": 58 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7859, + "end": 7864, + "loc": { + "start": { + "line": 240, + "column": 59 + }, + "end": { + "line": 240, + "column": 64 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7865, + "end": 7866, + "loc": { + "start": { + "line": 240, + "column": 65 + }, + "end": { + "line": 240, + "column": 66 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7889, + "end": 7941, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 72 + } + }, + "expression": { + "type": "CallExpression", + "start": 7889, + "end": 7940, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 71 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7889, + "end": 7932, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7889, + "end": 7926, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7889, + "end": 7923, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7889, + "end": 7895, + "loc": { + "start": { + "line": 241, + "column": 20 + }, + "end": { + "line": 241, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7896, + "end": 7922, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7896, + "end": 7920, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7896, + "end": 7914, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7896, + "end": 7909, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7896, + "end": 7899, + "loc": { + "start": { + "line": 241, + "column": 27 + }, + "end": { + "line": 241, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7900, + "end": 7909, + "loc": { + "start": { + "line": 241, + "column": 31 + }, + "end": { + "line": 241, + "column": 40 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7910, + "end": 7914, + "loc": { + "start": { + "line": 241, + "column": 41 + }, + "end": { + "line": 241, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7915, + "end": 7920, + "loc": { + "start": { + "line": 241, + "column": 46 + }, + "end": { + "line": 241, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7924, + "end": 7926, + "loc": { + "start": { + "line": 241, + "column": 55 + }, + "end": { + "line": 241, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7927, + "end": 7932, + "loc": { + "start": { + "line": 241, + "column": 58 + }, + "end": { + "line": 241, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 7933, + "end": 7939, + "loc": { + "start": { + "line": 241, + "column": 64 + }, + "end": { + "line": 241, + "column": 70 + } + }, + "value": "huhu", + "rawValue": "huhu", + "raw": "\"huhu\"" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 7962, + "end": 8009, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 67 + } + }, + "expression": { + "type": "CallExpression", + "start": 7962, + "end": 8008, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 66 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7962, + "end": 8005, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 63 + } + }, + "object": { + "type": "MemberExpression", + "start": 7962, + "end": 7999, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 57 + } + }, + "object": { + "type": "CallExpression", + "start": 7962, + "end": 7996, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 7962, + "end": 7968, + "loc": { + "start": { + "line": 242, + "column": 20 + }, + "end": { + "line": 242, + "column": 26 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 7969, + "end": 7995, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 7969, + "end": 7993, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 51 + } + }, + "object": { + "type": "MemberExpression", + "start": 7969, + "end": 7987, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 45 + } + }, + "object": { + "type": "MemberExpression", + "start": 7969, + "end": 7982, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 7969, + "end": 7972, + "loc": { + "start": { + "line": 242, + "column": 27 + }, + "end": { + "line": 242, + "column": 30 + } + }, + "name": "spy" + }, + "property": { + "type": "Identifier", + "start": 7973, + "end": 7982, + "loc": { + "start": { + "line": 242, + "column": 31 + }, + "end": { + "line": 242, + "column": 40 + } + }, + "name": "thirdCall" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7983, + "end": 7987, + "loc": { + "start": { + "line": 242, + "column": 41 + }, + "end": { + "line": 242, + "column": 45 + } + }, + "name": "args" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 7988, + "end": 7993, + "loc": { + "start": { + "line": 242, + "column": 46 + }, + "end": { + "line": 242, + "column": 51 + } + }, + "name": "shift" + }, + "computed": false + }, + "arguments": [] + } + ] + }, + "property": { + "type": "Identifier", + "start": 7997, + "end": 7999, + "loc": { + "start": { + "line": 242, + "column": 55 + }, + "end": { + "line": 242, + "column": 57 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 8000, + "end": 8005, + "loc": { + "start": { + "line": 242, + "column": 58 + }, + "end": { + "line": 242, + "column": 63 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 8006, + "end": 8007, + "loc": { + "start": { + "line": 242, + "column": 64 + }, + "end": { + "line": 242, + "column": 65 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 8030, + "end": 8037, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 27 + } + }, + "expression": { + "type": "CallExpression", + "start": 8030, + "end": 8036, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 8030, + "end": 8034, + "loc": { + "start": { + "line": 243, + "column": 20 + }, + "end": { + "line": 243, + "column": 24 + } + }, + "name": "done" + }, + "arguments": [] + } + } + ] + }, + "handler": { + "type": "CatchClause", + "start": 8056, + "end": 8113, + "loc": { + "start": { + "line": 244, + "column": 18 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "param": { + "type": "Identifier", + "start": 8062, + "end": 8063, + "loc": { + "start": { + "line": 244, + "column": 24 + }, + "end": { + "line": 244, + "column": 25 + } + }, + "name": "e" + }, + "body": { + "type": "BlockStatement", + "start": 8065, + "end": 8113, + "loc": { + "start": { + "line": 244, + "column": 27 + }, + "end": { + "line": 246, + "column": 17 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 8087, + "end": 8095, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 28 + } + }, + "expression": { + "type": "CallExpression", + "start": 8087, + "end": 8094, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 27 + } + }, + "callee": { + "type": "Identifier", + "start": 8087, + "end": 8091, + "loc": { + "start": { + "line": 245, + "column": 20 + }, + "end": { + "line": 245, + "column": 24 + } + }, + "name": "done" + }, + "arguments": [ + { + "type": "Identifier", + "start": 8092, + "end": 8093, + "loc": { + "start": { + "line": 245, + "column": 25 + }, + "end": { + "line": 245, + "column": 26 + } + }, + "name": "e" + } + ] + } + } + ] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/__tests__/ExpectedTest.js.json b/docs/ast/source/__tests__/ExpectedTest.js.json new file mode 100644 index 0000000..aae8054 --- /dev/null +++ b/docs/ast/source/__tests__/ExpectedTest.js.json @@ -0,0 +1,7435 @@ +{ + "type": "Program", + "start": 0, + "end": 2442, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 70, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": "Expected" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 21, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "value": "../Expected", + "rawValue": "../Expected", + "raw": "\"../Expected\"" + } + }, + { + "type": "ImportDeclaration", + "start": 36, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + }, + "local": { + "type": "Identifier", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "name": "expect" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 59, + "end": 65, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 29 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + }, + { + "type": "ExpressionStatement", + "start": 68, + "end": 2441, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 69, + "column": 3 + } + }, + "expression": { + "type": "CallExpression", + "start": 68, + "end": 2440, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 69, + "column": 2 + } + }, + "callee": { + "type": "Identifier", + "start": 68, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "name": "describe" + }, + "arguments": [ + { + "type": "Literal", + "start": 77, + "end": 87, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "value": "Expected", + "rawValue": "Expected", + "raw": "\"Expected\"" + }, + { + "type": "FunctionExpression", + "start": 89, + "end": 2439, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 100, + "end": 2439, + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 69, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 106, + "end": 337, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 106, + "end": 336, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 10, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 106, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 109, + "end": 156, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 54 + } + }, + "value": "compares a single value with the expected one", + "rawValue": "compares a single value with the expected one", + "raw": "\"compares a single value with the expected one\"" + }, + { + "type": "FunctionExpression", + "start": 158, + "end": 335, + "loc": { + "start": { + "line": 5, + "column": 56 + }, + "end": { + "line": 10, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 169, + "end": 335, + "loc": { + "start": { + "line": 5, + "column": 67 + }, + "end": { + "line": 10, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 179, + "end": 220, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 49 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 185, + "end": 219, + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 48 + } + }, + "id": { + "type": "Identifier", + "start": 185, + "end": 193, + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 196, + "end": 219, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 48 + } + }, + "callee": { + "type": "MemberExpression", + "start": 196, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 196, + "end": 204, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 205, + "end": 207, + "loc": { + "start": { + "line": 6, + "column": 34 + }, + "end": { + "line": 6, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 208, + "end": 214, + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 43 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + }, + { + "type": "ObjectExpression", + "start": 216, + "end": 218, + "loc": { + "start": { + "line": 6, + "column": 45 + }, + "end": { + "line": 6, + "column": 47 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 230, + "end": 273, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 51 + } + }, + "expression": { + "type": "CallExpression", + "start": 230, + "end": 272, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 50 + } + }, + "callee": { + "type": "MemberExpression", + "start": 230, + "end": 269, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 230, + "end": 263, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 230, + "end": 260, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 230, + "end": 236, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 237, + "end": 259, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 37 + } + }, + "callee": { + "type": "MemberExpression", + "start": 237, + "end": 251, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 237, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 246, + "end": 251, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 252, + "end": 258, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 36 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 261, + "end": 263, + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 264, + "end": 269, + "loc": { + "start": { + "line": 8, + "column": 42 + }, + "end": { + "line": 8, + "column": 47 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 270, + "end": 271, + "loc": { + "start": { + "line": 8, + "column": 48 + }, + "end": { + "line": 8, + "column": 49 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 282, + "end": 329, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 55 + } + }, + "expression": { + "type": "CallExpression", + "start": 282, + "end": 328, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 282, + "end": 324, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 282, + "end": 318, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 282, + "end": 315, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 282, + "end": 288, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 289, + "end": 314, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 289, + "end": 303, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 289, + "end": 297, + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 298, + "end": 303, + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 304, + "end": 313, + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 39 + } + }, + "value": "NotTest", + "rawValue": "NotTest", + "raw": "\"NotTest\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 316, + "end": 318, + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 319, + "end": 324, + "loc": { + "start": { + "line": 9, + "column": 45 + }, + "end": { + "line": 9, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 325, + "end": 327, + "loc": { + "start": { + "line": 9, + "column": 51 + }, + "end": { + "line": 9, + "column": 53 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 326, + "end": 327, + "loc": { + "start": { + "line": 9, + "column": 52 + }, + "end": { + "line": 9, + "column": 53 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 343, + "end": 643, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 19, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 343, + "end": 642, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 19, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 343, + "end": 345, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 346, + "end": 425, + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 86 + } + }, + "value": "compares a single value with the expected one, skipping all not matching ones", + "rawValue": "compares a single value with the expected one, skipping all not matching ones", + "raw": "\"compares a single value with the expected one, skipping all not matching ones\"" + }, + { + "type": "FunctionExpression", + "start": 427, + "end": 641, + "loc": { + "start": { + "line": 12, + "column": 88 + }, + "end": { + "line": 19, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 438, + "end": 641, + "loc": { + "start": { + "line": 12, + "column": 99 + }, + "end": { + "line": 19, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 448, + "end": 527, + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 15, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 454, + "end": 526, + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 15, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 454, + "end": 462, + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 465, + "end": 526, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 15, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 465, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 465, + "end": 473, + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 474, + "end": 476, + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 477, + "end": 483, + "loc": { + "start": { + "line": 13, + "column": 37 + }, + "end": { + "line": 13, + "column": 43 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + }, + { + "type": "ObjectExpression", + "start": 485, + "end": 525, + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 15, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 499, + "end": 515, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 499, + "end": 509, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 511, + "end": 515, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 537, + "end": 580, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 51 + } + }, + "expression": { + "type": "CallExpression", + "start": 537, + "end": 579, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 50 + } + }, + "callee": { + "type": "MemberExpression", + "start": 537, + "end": 576, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 47 + } + }, + "object": { + "type": "MemberExpression", + "start": 537, + "end": 570, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "object": { + "type": "CallExpression", + "start": 537, + "end": 567, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 537, + "end": 543, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 544, + "end": 566, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 37 + } + }, + "callee": { + "type": "MemberExpression", + "start": 544, + "end": 558, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 544, + "end": 552, + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 553, + "end": 558, + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 559, + "end": 565, + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + }, + "value": "Test", + "rawValue": "Test", + "raw": "\"Test\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 568, + "end": 570, + "loc": { + "start": { + "line": 17, + "column": 39 + }, + "end": { + "line": 17, + "column": 41 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 571, + "end": 576, + "loc": { + "start": { + "line": 17, + "column": 42 + }, + "end": { + "line": 17, + "column": 47 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 577, + "end": 578, + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 49 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 589, + "end": 635, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 54 + } + }, + "expression": { + "type": "CallExpression", + "start": 589, + "end": 634, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 53 + } + }, + "callee": { + "type": "MemberExpression", + "start": 589, + "end": 631, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 50 + } + }, + "object": { + "type": "MemberExpression", + "start": 589, + "end": 625, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 44 + } + }, + "object": { + "type": "CallExpression", + "start": 589, + "end": 622, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 589, + "end": 595, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 596, + "end": 621, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 596, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 596, + "end": 604, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 605, + "end": 610, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 611, + "end": 620, + "loc": { + "start": { + "line": 18, + "column": 30 + }, + "end": { + "line": 18, + "column": 39 + } + }, + "value": "NotTest", + "rawValue": "NotTest", + "raw": "\"NotTest\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 623, + "end": 625, + "loc": { + "start": { + "line": 18, + "column": 42 + }, + "end": { + "line": 18, + "column": 44 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 626, + "end": 631, + "loc": { + "start": { + "line": 18, + "column": 45 + }, + "end": { + "line": 18, + "column": 50 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 632, + "end": 633, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 52 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 649, + "end": 960, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 27, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 649, + "end": 959, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 27, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 649, + "end": 651, + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 652, + "end": 707, + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 62 + } + }, + "value": "compares a list of values with another list of values", + "rawValue": "compares a list of values with another list of values", + "raw": "\"compares a list of values with another list of values\"" + }, + { + "type": "FunctionExpression", + "start": 709, + "end": 958, + "loc": { + "start": { + "line": 21, + "column": 64 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 720, + "end": 958, + "loc": { + "start": { + "line": 21, + "column": 75 + }, + "end": { + "line": 27, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 730, + "end": 792, + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 70 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 736, + "end": 791, + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 69 + } + }, + "id": { + "type": "Identifier", + "start": 736, + "end": 744, + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 747, + "end": 791, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 69 + } + }, + "callee": { + "type": "MemberExpression", + "start": 747, + "end": 758, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 747, + "end": 755, + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 756, + "end": 758, + "loc": { + "start": { + "line": 22, + "column": 34 + }, + "end": { + "line": 22, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 759, + "end": 786, + "loc": { + "start": { + "line": 22, + "column": 37 + }, + "end": { + "line": 22, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 760, + "end": 767, + "loc": { + "start": { + "line": 22, + "column": 38 + }, + "end": { + "line": 22, + "column": 45 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + }, + { + "type": "Literal", + "start": 769, + "end": 776, + "loc": { + "start": { + "line": 22, + "column": 47 + }, + "end": { + "line": 22, + "column": 54 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + }, + { + "type": "Literal", + "start": 778, + "end": 785, + "loc": { + "start": { + "line": 22, + "column": 56 + }, + "end": { + "line": 22, + "column": 63 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 788, + "end": 790, + "loc": { + "start": { + "line": 22, + "column": 66 + }, + "end": { + "line": 22, + "column": 68 + } + }, + "properties": [] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 802, + "end": 846, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 802, + "end": 845, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 802, + "end": 842, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 802, + "end": 836, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 802, + "end": 833, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 802, + "end": 808, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 809, + "end": 832, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 809, + "end": 823, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 809, + "end": 817, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 818, + "end": 823, + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 824, + "end": 831, + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 37 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 834, + "end": 836, + "loc": { + "start": { + "line": 24, + "column": 40 + }, + "end": { + "line": 24, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 837, + "end": 842, + "loc": { + "start": { + "line": 24, + "column": 43 + }, + "end": { + "line": 24, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 843, + "end": 844, + "loc": { + "start": { + "line": 24, + "column": 49 + }, + "end": { + "line": 24, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 855, + "end": 899, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 855, + "end": 898, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 855, + "end": 895, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 855, + "end": 889, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 855, + "end": 886, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 855, + "end": 861, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 862, + "end": 885, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 862, + "end": 876, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 862, + "end": 870, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 871, + "end": 876, + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 877, + "end": 884, + "loc": { + "start": { + "line": 25, + "column": 30 + }, + "end": { + "line": 25, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 887, + "end": 889, + "loc": { + "start": { + "line": 25, + "column": 40 + }, + "end": { + "line": 25, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 890, + "end": 895, + "loc": { + "start": { + "line": 25, + "column": 43 + }, + "end": { + "line": 25, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 896, + "end": 897, + "loc": { + "start": { + "line": 25, + "column": 49 + }, + "end": { + "line": 25, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 908, + "end": 952, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 908, + "end": 951, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 908, + "end": 948, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 908, + "end": 942, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 908, + "end": 939, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 908, + "end": 914, + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 915, + "end": 938, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 915, + "end": 929, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 915, + "end": 923, + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 924, + "end": 929, + "loc": { + "start": { + "line": 26, + "column": 24 + }, + "end": { + "line": 26, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 930, + "end": 937, + "loc": { + "start": { + "line": 26, + "column": 30 + }, + "end": { + "line": 26, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 940, + "end": 942, + "loc": { + "start": { + "line": 26, + "column": 40 + }, + "end": { + "line": 26, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 943, + "end": 948, + "loc": { + "start": { + "line": 26, + "column": 43 + }, + "end": { + "line": 26, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 949, + "end": 950, + "loc": { + "start": { + "line": 26, + "column": 49 + }, + "end": { + "line": 26, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 966, + "end": 1384, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 966, + "end": 1383, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 38, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 966, + "end": 968, + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 969, + "end": 1040, + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 78 + } + }, + "value": "compares a list of values with another list, skipping all non-matches", + "rawValue": "compares a list of values with another list, skipping all non-matches", + "raw": "\"compares a list of values with another list, skipping all non-matches\"" + }, + { + "type": "FunctionExpression", + "start": 1042, + "end": 1382, + "loc": { + "start": { + "line": 29, + "column": 80 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1053, + "end": 1382, + "loc": { + "start": { + "line": 29, + "column": 91 + }, + "end": { + "line": 38, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1063, + "end": 1163, + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 32, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1069, + "end": 1162, + "loc": { + "start": { + "line": 30, + "column": 14 + }, + "end": { + "line": 32, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1069, + "end": 1077, + "loc": { + "start": { + "line": 30, + "column": 14 + }, + "end": { + "line": 30, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1080, + "end": 1162, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 32, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1080, + "end": 1091, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 30, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1080, + "end": 1088, + "loc": { + "start": { + "line": 30, + "column": 25 + }, + "end": { + "line": 30, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1089, + "end": 1091, + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1092, + "end": 1119, + "loc": { + "start": { + "line": 30, + "column": 37 + }, + "end": { + "line": 30, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1093, + "end": 1100, + "loc": { + "start": { + "line": 30, + "column": 38 + }, + "end": { + "line": 30, + "column": 45 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "Literal", + "start": 1102, + "end": 1109, + "loc": { + "start": { + "line": 30, + "column": 47 + }, + "end": { + "line": 30, + "column": 54 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + }, + { + "type": "Literal", + "start": 1111, + "end": 1118, + "loc": { + "start": { + "line": 30, + "column": 56 + }, + "end": { + "line": 30, + "column": 63 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 1121, + "end": 1161, + "loc": { + "start": { + "line": 30, + "column": 66 + }, + "end": { + "line": 32, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1135, + "end": 1151, + "loc": { + "start": { + "line": 31, + "column": 12 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1135, + "end": 1145, + "loc": { + "start": { + "line": 31, + "column": 12 + }, + "end": { + "line": 31, + "column": 22 + } + }, + "name": "eventually" + }, + "value": { + "type": "Literal", + "start": 1147, + "end": 1151, + "loc": { + "start": { + "line": 31, + "column": 24 + }, + "end": { + "line": 31, + "column": 28 + } + }, + "value": true, + "rawValue": true, + "raw": "true" + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1173, + "end": 1217, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1173, + "end": 1216, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1173, + "end": 1213, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1173, + "end": 1207, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1173, + "end": 1204, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1173, + "end": 1179, + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1180, + "end": 1203, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1180, + "end": 1194, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1180, + "end": 1188, + "loc": { + "start": { + "line": 34, + "column": 15 + }, + "end": { + "line": 34, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1189, + "end": 1194, + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1195, + "end": 1202, + "loc": { + "start": { + "line": 34, + "column": 30 + }, + "end": { + "line": 34, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1205, + "end": 1207, + "loc": { + "start": { + "line": 34, + "column": 40 + }, + "end": { + "line": 34, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1208, + "end": 1213, + "loc": { + "start": { + "line": 34, + "column": 43 + }, + "end": { + "line": 34, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1214, + "end": 1215, + "loc": { + "start": { + "line": 34, + "column": 49 + }, + "end": { + "line": 34, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1226, + "end": 1270, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1226, + "end": 1269, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1226, + "end": 1266, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1226, + "end": 1260, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1226, + "end": 1257, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1226, + "end": 1232, + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1233, + "end": 1256, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1233, + "end": 1247, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1233, + "end": 1241, + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1242, + "end": 1247, + "loc": { + "start": { + "line": 35, + "column": 24 + }, + "end": { + "line": 35, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1248, + "end": 1255, + "loc": { + "start": { + "line": 35, + "column": 30 + }, + "end": { + "line": 35, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1258, + "end": 1260, + "loc": { + "start": { + "line": 35, + "column": 40 + }, + "end": { + "line": 35, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1261, + "end": 1266, + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1267, + "end": 1268, + "loc": { + "start": { + "line": 35, + "column": 49 + }, + "end": { + "line": 35, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1279, + "end": 1323, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1279, + "end": 1322, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1279, + "end": 1319, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1279, + "end": 1313, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1279, + "end": 1310, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1279, + "end": 1285, + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1286, + "end": 1309, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1286, + "end": 1300, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1286, + "end": 1294, + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1295, + "end": 1300, + "loc": { + "start": { + "line": 36, + "column": 24 + }, + "end": { + "line": 36, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1301, + "end": 1308, + "loc": { + "start": { + "line": 36, + "column": 30 + }, + "end": { + "line": 36, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1311, + "end": 1313, + "loc": { + "start": { + "line": 36, + "column": 40 + }, + "end": { + "line": 36, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1314, + "end": 1319, + "loc": { + "start": { + "line": 36, + "column": 43 + }, + "end": { + "line": 36, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1320, + "end": 1321, + "loc": { + "start": { + "line": 36, + "column": 49 + }, + "end": { + "line": 36, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1332, + "end": 1376, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1332, + "end": 1375, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1332, + "end": 1372, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1332, + "end": 1366, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1332, + "end": 1363, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1332, + "end": 1338, + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1339, + "end": 1362, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1339, + "end": 1353, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1339, + "end": 1347, + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1348, + "end": 1353, + "loc": { + "start": { + "line": 37, + "column": 24 + }, + "end": { + "line": 37, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1354, + "end": 1361, + "loc": { + "start": { + "line": 37, + "column": 30 + }, + "end": { + "line": 37, + "column": 37 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1364, + "end": 1366, + "loc": { + "start": { + "line": 37, + "column": 40 + }, + "end": { + "line": 37, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1367, + "end": 1372, + "loc": { + "start": { + "line": 37, + "column": 43 + }, + "end": { + "line": 37, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1373, + "end": 1374, + "loc": { + "start": { + "line": 37, + "column": 49 + }, + "end": { + "line": 37, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1390, + "end": 1796, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 49, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1390, + "end": 1795, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 49, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1390, + "end": 1392, + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1393, + "end": 1434, + "loc": { + "start": { + "line": 40, + "column": 7 + }, + "end": { + "line": 40, + "column": 48 + } + }, + "value": "compares a list of values with a filter", + "rawValue": "compares a list of values with a filter", + "raw": "\"compares a list of values with a filter\"" + }, + { + "type": "FunctionExpression", + "start": 1436, + "end": 1794, + "loc": { + "start": { + "line": 40, + "column": 50 + }, + "end": { + "line": 49, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1447, + "end": 1794, + "loc": { + "start": { + "line": 40, + "column": 61 + }, + "end": { + "line": 49, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1457, + "end": 1575, + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 43, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1463, + "end": 1574, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1463, + "end": 1471, + "loc": { + "start": { + "line": 41, + "column": 14 + }, + "end": { + "line": 41, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1474, + "end": 1574, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 43, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1474, + "end": 1485, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1474, + "end": 1482, + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1483, + "end": 1485, + "loc": { + "start": { + "line": 41, + "column": 34 + }, + "end": { + "line": 41, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrayExpression", + "start": 1486, + "end": 1513, + "loc": { + "start": { + "line": 41, + "column": 37 + }, + "end": { + "line": 41, + "column": 64 + } + }, + "elements": [ + { + "type": "Literal", + "start": 1487, + "end": 1494, + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "Literal", + "start": 1496, + "end": 1503, + "loc": { + "start": { + "line": 41, + "column": 47 + }, + "end": { + "line": 41, + "column": 54 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + }, + { + "type": "Literal", + "start": 1505, + "end": 1512, + "loc": { + "start": { + "line": 41, + "column": 56 + }, + "end": { + "line": 41, + "column": 63 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + }, + { + "type": "ObjectExpression", + "start": 1515, + "end": 1573, + "loc": { + "start": { + "line": 41, + "column": 66 + }, + "end": { + "line": 43, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1529, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1529, + "end": 1535, + "loc": { + "start": { + "line": 42, + "column": 12 + }, + "end": { + "line": 42, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 1537, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1537, + "end": 1542, + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 1546, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 1546, + "end": 1551, + "loc": { + "start": { + "line": 42, + "column": 29 + }, + "end": { + "line": 42, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 1556, + "end": 1563, + "loc": { + "start": { + "line": 42, + "column": 39 + }, + "end": { + "line": 42, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1585, + "end": 1629, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1585, + "end": 1628, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1585, + "end": 1625, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1585, + "end": 1619, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1585, + "end": 1616, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1585, + "end": 1591, + "loc": { + "start": { + "line": 45, + "column": 8 + }, + "end": { + "line": 45, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1592, + "end": 1615, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1592, + "end": 1606, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1592, + "end": 1600, + "loc": { + "start": { + "line": 45, + "column": 15 + }, + "end": { + "line": 45, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1601, + "end": 1606, + "loc": { + "start": { + "line": 45, + "column": 24 + }, + "end": { + "line": 45, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1607, + "end": 1614, + "loc": { + "start": { + "line": 45, + "column": 30 + }, + "end": { + "line": 45, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1617, + "end": 1619, + "loc": { + "start": { + "line": 45, + "column": 40 + }, + "end": { + "line": 45, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1620, + "end": 1625, + "loc": { + "start": { + "line": 45, + "column": 43 + }, + "end": { + "line": 45, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1626, + "end": 1627, + "loc": { + "start": { + "line": 45, + "column": 49 + }, + "end": { + "line": 45, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1638, + "end": 1682, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1638, + "end": 1681, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1638, + "end": 1678, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1638, + "end": 1672, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1638, + "end": 1669, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1638, + "end": 1644, + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1645, + "end": 1668, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1645, + "end": 1659, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1645, + "end": 1653, + "loc": { + "start": { + "line": 46, + "column": 15 + }, + "end": { + "line": 46, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1654, + "end": 1659, + "loc": { + "start": { + "line": 46, + "column": 24 + }, + "end": { + "line": 46, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1660, + "end": 1667, + "loc": { + "start": { + "line": 46, + "column": 30 + }, + "end": { + "line": 46, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1670, + "end": 1672, + "loc": { + "start": { + "line": 46, + "column": 40 + }, + "end": { + "line": 46, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1673, + "end": 1678, + "loc": { + "start": { + "line": 46, + "column": 43 + }, + "end": { + "line": 46, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1679, + "end": 1680, + "loc": { + "start": { + "line": 46, + "column": 49 + }, + "end": { + "line": 46, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1691, + "end": 1735, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1691, + "end": 1734, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1691, + "end": 1731, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1691, + "end": 1725, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1691, + "end": 1722, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1691, + "end": 1697, + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1698, + "end": 1721, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1698, + "end": 1712, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1698, + "end": 1706, + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1707, + "end": 1712, + "loc": { + "start": { + "line": 47, + "column": 24 + }, + "end": { + "line": 47, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1713, + "end": 1720, + "loc": { + "start": { + "line": 47, + "column": 30 + }, + "end": { + "line": 47, + "column": 37 + } + }, + "value": "Test4", + "rawValue": "Test4", + "raw": "\"Test4\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1723, + "end": 1725, + "loc": { + "start": { + "line": 47, + "column": 40 + }, + "end": { + "line": 47, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1726, + "end": 1731, + "loc": { + "start": { + "line": 47, + "column": 43 + }, + "end": { + "line": 47, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1732, + "end": 1733, + "loc": { + "start": { + "line": 47, + "column": 49 + }, + "end": { + "line": 47, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1744, + "end": 1788, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1744, + "end": 1787, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1744, + "end": 1784, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1744, + "end": 1778, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1744, + "end": 1775, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1744, + "end": 1750, + "loc": { + "start": { + "line": 48, + "column": 8 + }, + "end": { + "line": 48, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1751, + "end": 1774, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1751, + "end": 1765, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1751, + "end": 1759, + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1760, + "end": 1765, + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1766, + "end": 1773, + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 37 + } + }, + "value": "Test5", + "rawValue": "Test5", + "raw": "\"Test5\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 1776, + "end": 1778, + "loc": { + "start": { + "line": 48, + "column": 40 + }, + "end": { + "line": 48, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 1779, + "end": 1784, + "loc": { + "start": { + "line": 48, + "column": 43 + }, + "end": { + "line": 48, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1785, + "end": 1786, + "loc": { + "start": { + "line": 48, + "column": 49 + }, + "end": { + "line": 48, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 1802, + "end": 2084, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 58, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 1802, + "end": 2083, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 58, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 1802, + "end": 1804, + "loc": { + "start": { + "line": 51, + "column": 4 + }, + "end": { + "line": 51, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 1805, + "end": 1848, + "loc": { + "start": { + "line": 51, + "column": 7 + }, + "end": { + "line": 51, + "column": 50 + } + }, + "value": "compares a single of values with a filter", + "rawValue": "compares a single of values with a filter", + "raw": "\"compares a single of values with a filter\"" + }, + { + "type": "FunctionExpression", + "start": 1850, + "end": 2082, + "loc": { + "start": { + "line": 51, + "column": 52 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 1861, + "end": 2082, + "loc": { + "start": { + "line": 51, + "column": 63 + }, + "end": { + "line": 58, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 1871, + "end": 1969, + "loc": { + "start": { + "line": 52, + "column": 8 + }, + "end": { + "line": 54, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 1877, + "end": 1968, + "loc": { + "start": { + "line": 52, + "column": 14 + }, + "end": { + "line": 54, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 1877, + "end": 1885, + "loc": { + "start": { + "line": 52, + "column": 14 + }, + "end": { + "line": 52, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 1888, + "end": 1968, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 54, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1888, + "end": 1899, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 1888, + "end": 1896, + "loc": { + "start": { + "line": 52, + "column": 25 + }, + "end": { + "line": 52, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 1897, + "end": 1899, + "loc": { + "start": { + "line": 52, + "column": 34 + }, + "end": { + "line": 52, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 1900, + "end": 1907, + "loc": { + "start": { + "line": 52, + "column": 37 + }, + "end": { + "line": 52, + "column": 44 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + }, + { + "type": "ObjectExpression", + "start": 1909, + "end": 1967, + "loc": { + "start": { + "line": 52, + "column": 46 + }, + "end": { + "line": 54, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 1923, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 1923, + "end": 1929, + "loc": { + "start": { + "line": 53, + "column": 12 + }, + "end": { + "line": 53, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 1931, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 20 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1931, + "end": 1936, + "loc": { + "start": { + "line": 53, + "column": 20 + }, + "end": { + "line": 53, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 1940, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 29 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 1940, + "end": 1945, + "loc": { + "start": { + "line": 53, + "column": 29 + }, + "end": { + "line": 53, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 1950, + "end": 1957, + "loc": { + "start": { + "line": 53, + "column": 39 + }, + "end": { + "line": 53, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 1979, + "end": 2023, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 1979, + "end": 2022, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1979, + "end": 2019, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 1979, + "end": 2013, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 1979, + "end": 2010, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 1979, + "end": 1985, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 1986, + "end": 2009, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 1986, + "end": 2000, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 1986, + "end": 1994, + "loc": { + "start": { + "line": 56, + "column": 15 + }, + "end": { + "line": 56, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 1995, + "end": 2000, + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2001, + "end": 2008, + "loc": { + "start": { + "line": 56, + "column": 30 + }, + "end": { + "line": 56, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2011, + "end": 2013, + "loc": { + "start": { + "line": 56, + "column": 40 + }, + "end": { + "line": 56, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2014, + "end": 2019, + "loc": { + "start": { + "line": 56, + "column": 43 + }, + "end": { + "line": 56, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2020, + "end": 2021, + "loc": { + "start": { + "line": 56, + "column": 49 + }, + "end": { + "line": 56, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2032, + "end": 2076, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2032, + "end": 2075, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2032, + "end": 2072, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2032, + "end": 2066, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2032, + "end": 2063, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2032, + "end": 2038, + "loc": { + "start": { + "line": 57, + "column": 8 + }, + "end": { + "line": 57, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2039, + "end": 2062, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2039, + "end": 2053, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2039, + "end": 2047, + "loc": { + "start": { + "line": 57, + "column": 15 + }, + "end": { + "line": 57, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2048, + "end": 2053, + "loc": { + "start": { + "line": 57, + "column": 24 + }, + "end": { + "line": 57, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2054, + "end": 2061, + "loc": { + "start": { + "line": 57, + "column": 30 + }, + "end": { + "line": 57, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2064, + "end": 2066, + "loc": { + "start": { + "line": 57, + "column": 40 + }, + "end": { + "line": 57, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2067, + "end": 2072, + "loc": { + "start": { + "line": 57, + "column": 43 + }, + "end": { + "line": 57, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2073, + "end": 2074, + "loc": { + "start": { + "line": 57, + "column": 49 + }, + "end": { + "line": 57, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2090, + "end": 2437, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 2090, + "end": 2436, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 68, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 2090, + "end": 2092, + "loc": { + "start": { + "line": 60, + "column": 4 + }, + "end": { + "line": 60, + "column": 6 + } + }, + "name": "it" + }, + "arguments": [ + { + "type": "Literal", + "start": 2093, + "end": 2119, + "loc": { + "start": { + "line": 60, + "column": 7 + }, + "end": { + "line": 60, + "column": 33 + } + }, + "value": "compares with a function", + "rawValue": "compares with a function", + "raw": "\"compares with a function\"" + }, + { + "type": "FunctionExpression", + "start": 2121, + "end": 2435, + "loc": { + "start": { + "line": 60, + "column": 35 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 2132, + "end": 2435, + "loc": { + "start": { + "line": 60, + "column": 46 + }, + "end": { + "line": 68, + "column": 5 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2142, + "end": 2268, + "loc": { + "start": { + "line": 61, + "column": 8 + }, + "end": { + "line": 63, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2148, + "end": 2267, + "loc": { + "start": { + "line": 61, + "column": 14 + }, + "end": { + "line": 63, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 2148, + "end": 2156, + "loc": { + "start": { + "line": 61, + "column": 14 + }, + "end": { + "line": 61, + "column": 22 + } + }, + "name": "expected" + }, + "init": { + "type": "CallExpression", + "start": 2159, + "end": 2267, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 63, + "column": 10 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2159, + "end": 2170, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 36 + } + }, + "object": { + "type": "Identifier", + "start": 2159, + "end": 2167, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 33 + } + }, + "name": "Expected" + }, + "property": { + "type": "Identifier", + "start": 2168, + "end": 2170, + "loc": { + "start": { + "line": 61, + "column": 34 + }, + "end": { + "line": 61, + "column": 36 + } + }, + "name": "of" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArrowFunctionExpression", + "start": 2171, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 37 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2171, + "end": 2176, + "loc": { + "start": { + "line": 61, + "column": 37 + }, + "end": { + "line": 61, + "column": 42 + } + }, + "name": "value" + } + ], + "body": { + "type": "ConditionalExpression", + "start": 2180, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2180, + "end": 2197, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 63 + } + }, + "left": { + "type": "Identifier", + "start": 2180, + "end": 2185, + "loc": { + "start": { + "line": 61, + "column": 46 + }, + "end": { + "line": 61, + "column": 51 + } + }, + "name": "value" + }, + "operator": "===", + "right": { + "type": "Literal", + "start": 2190, + "end": 2197, + "loc": { + "start": { + "line": 61, + "column": 56 + }, + "end": { + "line": 61, + "column": 63 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + }, + "consequent": { + "type": "Literal", + "start": 2200, + "end": 2201, + "loc": { + "start": { + "line": 61, + "column": 66 + }, + "end": { + "line": 61, + "column": 67 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + }, + "alternate": { + "type": "UnaryExpression", + "start": 2204, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 70 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2205, + "end": 2206, + "loc": { + "start": { + "line": 61, + "column": 71 + }, + "end": { + "line": 61, + "column": 72 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + } + }, + { + "type": "ObjectExpression", + "start": 2208, + "end": 2266, + "loc": { + "start": { + "line": 61, + "column": 74 + }, + "end": { + "line": 63, + "column": 9 + } + }, + "properties": [ + { + "type": "Property", + "start": 2222, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 12 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 2222, + "end": 2228, + "loc": { + "start": { + "line": 62, + "column": 12 + }, + "end": { + "line": 62, + "column": 18 + } + }, + "name": "filter" + }, + "value": { + "type": "ArrowFunctionExpression", + "start": 2230, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2230, + "end": 2235, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 25 + } + }, + "name": "value" + } + ], + "body": { + "type": "BinaryExpression", + "start": 2239, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 29 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 2239, + "end": 2244, + "loc": { + "start": { + "line": 62, + "column": 29 + }, + "end": { + "line": 62, + "column": 34 + } + }, + "name": "value" + }, + "operator": "!==", + "right": { + "type": "Literal", + "start": 2249, + "end": 2256, + "loc": { + "start": { + "line": 62, + "column": 39 + }, + "end": { + "line": 62, + "column": 46 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + } + }, + "kind": "init" + } + ] + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 2278, + "end": 2323, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 53 + } + }, + "expression": { + "type": "CallExpression", + "start": 2278, + "end": 2322, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2278, + "end": 2318, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2278, + "end": 2312, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2278, + "end": 2309, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2278, + "end": 2284, + "loc": { + "start": { + "line": 65, + "column": 8 + }, + "end": { + "line": 65, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2285, + "end": 2308, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2285, + "end": 2299, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2285, + "end": 2293, + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2294, + "end": 2299, + "loc": { + "start": { + "line": 65, + "column": 24 + }, + "end": { + "line": 65, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2300, + "end": 2307, + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 37 + } + }, + "value": "Test1", + "rawValue": "Test1", + "raw": "\"Test1\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2310, + "end": 2312, + "loc": { + "start": { + "line": 65, + "column": 40 + }, + "end": { + "line": 65, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2313, + "end": 2318, + "loc": { + "start": { + "line": 65, + "column": 43 + }, + "end": { + "line": 65, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "UnaryExpression", + "start": 2319, + "end": 2321, + "loc": { + "start": { + "line": 65, + "column": 49 + }, + "end": { + "line": 65, + "column": 51 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Literal", + "start": 2320, + "end": 2321, + "loc": { + "start": { + "line": 65, + "column": 50 + }, + "end": { + "line": 65, + "column": 51 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2332, + "end": 2376, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2332, + "end": 2375, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2332, + "end": 2372, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2332, + "end": 2366, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2332, + "end": 2363, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2332, + "end": 2338, + "loc": { + "start": { + "line": 66, + "column": 8 + }, + "end": { + "line": 66, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2339, + "end": 2362, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2339, + "end": 2353, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2339, + "end": 2347, + "loc": { + "start": { + "line": 66, + "column": 15 + }, + "end": { + "line": 66, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2348, + "end": 2353, + "loc": { + "start": { + "line": 66, + "column": 24 + }, + "end": { + "line": 66, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2354, + "end": 2361, + "loc": { + "start": { + "line": 66, + "column": 30 + }, + "end": { + "line": 66, + "column": 37 + } + }, + "value": "Test2", + "rawValue": "Test2", + "raw": "\"Test2\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2364, + "end": 2366, + "loc": { + "start": { + "line": 66, + "column": 40 + }, + "end": { + "line": 66, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2367, + "end": 2372, + "loc": { + "start": { + "line": 66, + "column": 43 + }, + "end": { + "line": 66, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2373, + "end": 2374, + "loc": { + "start": { + "line": 66, + "column": 49 + }, + "end": { + "line": 66, + "column": 50 + } + }, + "value": 0, + "rawValue": 0, + "raw": "0" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 2385, + "end": 2429, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 52 + } + }, + "expression": { + "type": "CallExpression", + "start": 2385, + "end": 2428, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 51 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2385, + "end": 2425, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "object": { + "type": "MemberExpression", + "start": 2385, + "end": 2419, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 42 + } + }, + "object": { + "type": "CallExpression", + "start": 2385, + "end": 2416, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 2385, + "end": 2391, + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 14 + } + }, + "name": "expect" + }, + "arguments": [ + { + "type": "CallExpression", + "start": 2392, + "end": 2415, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2392, + "end": 2406, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 29 + } + }, + "object": { + "type": "Identifier", + "start": 2392, + "end": 2400, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 23 + } + }, + "name": "expected" + }, + "property": { + "type": "Identifier", + "start": 2401, + "end": 2406, + "loc": { + "start": { + "line": 67, + "column": 24 + }, + "end": { + "line": 67, + "column": 29 + } + }, + "name": "match" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2407, + "end": 2414, + "loc": { + "start": { + "line": 67, + "column": 30 + }, + "end": { + "line": 67, + "column": 37 + } + }, + "value": "Test3", + "rawValue": "Test3", + "raw": "\"Test3\"" + } + ] + } + ] + }, + "property": { + "type": "Identifier", + "start": 2417, + "end": 2419, + "loc": { + "start": { + "line": 67, + "column": 40 + }, + "end": { + "line": 67, + "column": 42 + } + }, + "name": "to" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 2420, + "end": 2425, + "loc": { + "start": { + "line": 67, + "column": 43 + }, + "end": { + "line": 67, + "column": 48 + } + }, + "name": "equal" + }, + "computed": false + }, + "arguments": [ + { + "type": "Literal", + "start": 2426, + "end": 2427, + "loc": { + "start": { + "line": 67, + "column": 49 + }, + "end": { + "line": 67, + "column": 50 + } + }, + "value": 1, + "rawValue": 1, + "raw": "1" + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/examples/test.js.json b/docs/ast/source/examples/test.js.json new file mode 100644 index 0000000..1130fe3 --- /dev/null +++ b/docs/ast/source/examples/test.js.json @@ -0,0 +1,17 @@ +{ + "type": "Program", + "start": 0, + "end": 0, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + }, + "sourceType": "module", + "body": [] +} \ No newline at end of file diff --git a/docs/ast/source/index.js.json b/docs/ast/source/index.js.json new file mode 100644 index 0000000..b042b04 --- /dev/null +++ b/docs/ast/source/index.js.json @@ -0,0 +1,376 @@ +{ + "type": "Program", + "start": 0, + "end": 123, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": "StreamHelper" + } + } + ], + "importKind": "value", + "source": { + "type": "Literal", + "start": 25, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "value": "./StreamHelper", + "rawValue": "./StreamHelper", + "raw": "\"./StreamHelper\"" + } + }, + { + "type": "VariableDeclaration", + "start": 44, + "end": 73, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 50, + "end": 72, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 50, + "end": 54, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "name": "chai" + }, + "init": { + "type": "CallExpression", + "start": 57, + "end": 72, + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "callee": { + "type": "Identifier", + "start": 57, + "end": 64, + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + }, + "name": "require" + }, + "arguments": [ + { + "type": "Literal", + "start": 65, + "end": 71, + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + }, + "value": "chai", + "rawValue": "chai", + "raw": "\"chai\"" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "ExpressionStatement", + "start": 75, + "end": 98, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 75, + "end": 97, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 75, + "end": 83, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "object": { + "type": "Identifier", + "start": 75, + "end": 79, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + }, + "name": "chai" + }, + "property": { + "type": "Identifier", + "start": 80, + "end": 83, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + }, + "name": "use" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 84, + "end": 96, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 21 + } + }, + "name": "StreamHelper" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 100, + "end": 122, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 22 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 100, + "end": 121, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 100, + "end": 114, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 14 + } + }, + "object": { + "type": "Identifier", + "start": 100, + "end": 106, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + }, + "name": "module" + }, + "property": { + "type": "Identifier", + "start": 107, + "end": 114, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 14 + } + }, + "name": "exports" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 117, + "end": 121, + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + }, + "name": "chai" + } + } + } + ] +} \ No newline at end of file diff --git a/docs/badge.svg b/docs/badge.svg new file mode 100644 index 0000000..2676430 --- /dev/null +++ b/docs/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + 50% + 50% + + diff --git a/docs/class/src/AssertStream.js~AssertStream.html b/docs/class/src/AssertStream.js~AssertStream.html new file mode 100644 index 0000000..4f20b1e --- /dev/null +++ b/docs/class/src/AssertStream.js~AssertStream.html @@ -0,0 +1,464 @@ + + + + + + AssertStream | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +
    +
    import AssertStream from 'expect-stream/src/AssertStream.js'
    + public + class + + + + | source +
    + +
    +

    AssertStream

    + + + + + +

    Extends:

    stream~Writable → AssertStream
    + + + + + + + + + +

    this stream is used to be piped into. +it ends if the expected value was received.

    +
    + + + + + + + + +
    + + + +

    Constructor Summary

    + + + + + + + + + +
    Public Constructor
    + public + + + + + +
    +

    + constructor(expected: *, options: object) +

    +
    +
    + + +

    constructor for this stream

    +
    +
    +
    + + +
    +
    +

    Member Summary

    + + + + + + + + + + + + + + +
    Public Members
    + public + + + + + +
    +

    + expected: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + tapper: * +

    +
    +
    + + + +
    +
    + + +
    +
    +

    Method Summary

    + + + + + + + + + +
    Public Methods
    + public + + + + + +
    +

    + _write(chunk: string | object, enc: string, cb: function): * +

    +
    +
    + + +

    implementation of the write function.

    +
    +
    +
    + + +
    +
    + + + + + +

    Public Constructors

    + +
    +

    + public + + + + + constructor(expected: *, options: object) + + + + source + +

    + + + + +

    constructor for this stream

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    expected*

    value

    +
    optionsobject

    configuring the behaviour of AssertSream

    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    Public Members

    + +
    +

    + public + + + + + expected: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + tapper: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    Public Methods

    + +
    +

    + public + + + + + _write(chunk: string | object, enc: string, cb: function): * + + + + source + +

    + + + + +

    implementation of the write function. transforms data, +so that it can be compared, emits end on match, otherwise +continues.

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    chunkstring | object

    of data

    +
    encstring

    of data

    +
    cbfunction

    when operation finished

    +
    +
    +
    + +
    +

    Return:

    + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + diff --git a/docs/class/src/Expected.js~Expected.html b/docs/class/src/Expected.js~Expected.html new file mode 100644 index 0000000..e7660fa --- /dev/null +++ b/docs/class/src/Expected.js~Expected.html @@ -0,0 +1,983 @@ + + + + + + Expected | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +
    +
    import Expected from 'expect-stream/src/Expected.js'
    + public + class + + + + | source +
    + +
    +

    Expected

    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    Static Method Summary

    + + + + + + + + + +
    Static Public Methods
    + public + static + + + + +
    +

    + of(args: *): Expected +

    +
    +
    + + +

    Creates an ExpectationClass, that checks, +whether an incoming value matches the +expectations

    +
    +
    +
    + + +
    +
    +

    Constructor Summary

    + + + + + + + + + +
    Public Constructor
    + public + + + + + +
    +

    + constructor(expected: *, options: object) +

    +
    +
    + + +

    Constructor of Expected

    +
    +
    +
    + + +
    +
    +

    Member Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Members
    + public + + + + + +
    +

    + expected: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + expection: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + filter: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + matcher: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + messages: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + onMisMatch: * +

    +
    +
    + + + +
    +
    + + +
    +
    +

    Method Summary

    + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + public + + + + + +
    +

    + getError(): Error +

    +
    +
    + + +

    produces the error containing the expected vs actual results

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + includes(value: *): Number +

    +
    +
    + + +

    Checks if next value in list matches the input

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + match(value: *): Number +

    +
    +
    + + +

    Compares input with expectations

    +
    +
    +
    + + +
    +
    + + + + +

    Static Public Methods

    + +
    +

    + public + static + + + + of(args: *): Expected + + + + source + +

    + + + + +

    Creates an ExpectationClass, that checks, +whether an incoming value matches the +expectations

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    args*

    needed for creation

    +
    +
    +
    + +
    +

    Return:

    + + + + + +
    Expected
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +

    Public Constructors

    + +
    +

    + public + + + + + constructor(expected: *, options: object) + + + + source + +

    + + + + +

    Constructor of Expected

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    expected*

    compared with input

    +
    optionsobject

    for custom matcning behaviour

    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    Public Members

    + +
    +

    + public + + + + + expected: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + expection: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + filter: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + matcher: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + messages: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + onMisMatch: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    Public Methods

    + +
    +

    + public + + + + + getError(): Error + + + + source + +

    + + + + +

    produces the error containing the expected vs actual results

    +
    + + + +
    +
    + +
    +

    Return:

    + + + + + +
    Error
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +

    + public + + + + + includes(value: *): Number + + + + source + +

    + + + + +

    Checks if next value in list matches the input

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    value*

    to be compared

    +
    +
    +
    + +
    +

    Return:

    + + + + + +
    Number
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +

    + public + + + + + match(value: *): Number + + + + source + +

    + + + + +

    Compares input with expectations

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    value*

    to be compared

    +
    +
    +
    + +
    +

    Return:

    + + + + + +
    Number
    +
    +
    +
    + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + diff --git a/docs/coverage.json b/docs/coverage.json new file mode 100644 index 0000000..05c148e --- /dev/null +++ b/docs/coverage.json @@ -0,0 +1,33 @@ +{ + "coverage": "50%", + "expectCount": 18, + "actualCount": 9, + "files": { + "src/AssertStream.js": { + "expectCount": 5, + "actualCount": 3, + "undocumentLines": [ + 25, + 26 + ] + }, + "src/Expected.js": { + "expectCount": 12, + "actualCount": 5, + "undocumentLines": [ + 8, + 32, + 31, + 35, + 33, + 30, + 34 + ] + }, + "src/StreamHelper.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + } + } +} \ No newline at end of file diff --git a/docs/css/prettify-tomorrow.css b/docs/css/prettify-tomorrow.css new file mode 100644 index 0000000..b6f92a7 --- /dev/null +++ b/docs/css/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/docs/css/style.css b/docs/css/style.css new file mode 100644 index 0000000..baf349f --- /dev/null +++ b/docs/css/style.css @@ -0,0 +1,944 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700); + +* { + margin: 0; + padding: 0; + text-decoration: none; +} + +html +{ + font-family: 'Roboto', sans-serif; + overflow: auto; + font-size: 14px; + /*color: #4d4e53;*/ + color: rgba(0, 0, 0, .68); + background-color: #fff; +} + +a { + /*color: #0095dd;*/ + /*color:rgb(37, 138, 175);*/ + color: #039BE5; +} + +code a:hover { + text-decoration: underline; +} + +ul, ol { + padding-left: 20px; +} + +ul li { + list-style: disc; + margin: 4px 0; +} + +ol li { + margin: 4px 0; +} + +h1 { + margin-bottom: 10px; + font-size: 34px; + font-weight: 300; + border-bottom: solid 1px #ddd; +} + +h2 { + margin-top: 24px; + margin-bottom: 10px; + font-size: 20px; + border-bottom: solid 1px #ddd; + font-weight: 300; +} + +h3 { + position: relative; + font-size: 16px; + margin-bottom: 12px; + background-color: #E2E2E2; + padding: 4px; + font-weight: 300; +} + +del { + text-decoration: line-through; +} + +p { + margin-bottom: 15px; + line-height: 1.5; +} + +p > code { + background-color: #f5f5f5; + border-radius: 3px; +} + +pre > code { + display: block; +} + +pre.prettyprint, pre > code { + padding: 4px; + margin: 1em 0; + background-color: #f5f5f5; + border-radius: 3px; +} + +pre.prettyprint > code { + margin: 0; +} + +p > code, +li > code { + padding: 0 4px; + border-radius: 3px; +} + +.import-path pre.prettyprint, +.import-path pre.prettyprint code { + margin: 0; + padding: 0; + border: none; + background: white; +} + +.layout-container { + /*display: flex;*/ + /*flex-direction: row;*/ + /*justify-content: flex-start;*/ + /*align-items: stretch;*/ +} + +.layout-container > header { + height: 40px; + line-height: 40px; + font-size: 16px; + padding: 0 10px; + margin: 0; + position: fixed; + width: 100%; + z-index: 1; + background-color: white; + top: 0; + border-bottom: solid 1px #E02130; +} +.layout-container > header > a{ + margin: 0 5px; +} + +.layout-container > header > a.repo-url-github { + font-size: 0; + display: inline-block; + width: 20px; + height: 38px; + background: url("../image/github.png") no-repeat center; + background-size: 20px; + vertical-align: top; +} + +.navigation { + position: fixed; + top: 0; + left: 0; + box-sizing: border-box; + width: 250px; + height: 100%; + padding-top: 40px; + padding-left: 15px; + padding-bottom: 2em; + margin-top:1em; + overflow-x: scroll; + box-shadow: rgba(255, 255, 255, 1) -1px 0 0 inset; + border-right: 1px solid rgba(0, 0, 0, 0.1); +} + +.navigation ul { + padding: 0; +} + +.navigation li { + list-style: none; + margin: 4px 0; + white-space: nowrap; +} + +.navigation .nav-dir-path { + margin-top: 0.7em; + margin-bottom: 0.25em; + font-size: 0.8em; + color: #aaa; +} + +.kind-class, +.kind-interface, +.kind-function, +.kind-typedef, +.kind-variable, +.kind-external { + margin-left: 0.75em; + width: 1.2em; + height: 1.2em; + display: inline-block; + text-align: center; + border-radius: 0.2em; + margin-right: 0.2em; + font-weight: bold; +} + +.kind-class { + color: #009800; + background-color: #bfe5bf; +} + +.kind-interface { + color: #fbca04; + background-color: #fef2c0; +} + +.kind-function { + color: #6b0090; + background-color: #d6bdde; +} + +.kind-variable { + color: #eb6420; + background-color: #fad8c7; +} + +.kind-typedef { + color: #db001e; + background-color: #edbec3; +} + +.kind-external { + color: #0738c3; + background-color: #bbcbea; +} + +h1 .version, +h1 .url a { + font-size: 14px; + color: #aaa; +} + +.content { + margin-top: 40px; + margin-left: 250px; + padding: 10px 50px 10px 20px; +} + +.header-notice { + font-size: 14px; + color: #aaa; + margin: 0; +} + +.expression-extends .prettyprint { + margin-left: 10px; + background: white; +} + +.extends-chain { + border-bottom: 1px solid#ddd; + padding-bottom: 10px; + margin-bottom: 10px; +} + +.extends-chain span:nth-of-type(1) { + padding-left: 10px; +} + +.extends-chain > div { + margin: 5px 0; +} + +.description table { + font-size: 14px; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +.description thead { + background: #999; + color: white; +} + +.description table td, +.description table th { + border: solid 1px #ddd; + padding: 4px; + font-weight: normal; +} + +.flat-list ul { + padding-left: 0; +} + +.flat-list li { + display: inline; + list-style: none; +} + +table.summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.summary thead { + background: #999; + color: white; +} + +table.summary td { + border: solid 1px #ddd; + padding: 4px 10px; +} + +table.summary tbody td:nth-child(1) { + text-align: right; + white-space: nowrap; + min-width: 64px; + vertical-align: top; +} + +table.summary tbody td:nth-child(2) { + width: 100%; + border-right: none; +} + +table.summary tbody td:nth-child(3) { + white-space: nowrap; + border-left: none; + vertical-align: top; +} + +table.summary td > div:nth-of-type(2) { + padding-top: 4px; + padding-left: 15px; +} + +table.summary td p { + margin-bottom: 0; +} + +.inherited-summary thead td { + padding-left: 2px; +} + +.inherited-summary thead a { + color: white; +} + +.inherited-summary .summary tbody { + display: none; +} + +.inherited-summary .summary .toggle { + padding: 0 4px; + font-size: 12px; + cursor: pointer; +} +.inherited-summary .summary .toggle.closed:before { + content: "â–¶"; +} +.inherited-summary .summary .toggle.opened:before { + content: "â–¼"; +} + +.member, .method { + margin-bottom: 24px; +} + +table.params { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.params thead { + background: #eee; + color: #aaa; +} + +table.params td { + padding: 4px; + border: solid 1px #ddd; +} + +table.params td p { + margin: 0; +} + +.content .detail > * { + margin: 15px 0; +} + +.content .detail > h3 { + color: black; +} + +.content .detail > div { + margin-left: 10px; +} + +.content .detail > .import-path { + margin-top: -8px; +} + +.content .detail + .detail { + margin-top: 30px; +} + +.content .detail .throw td:first-child { + padding-right: 10px; +} + +.content .detail h4 + :not(pre) { + padding-left: 0; + margin-left: 10px; +} + +.content .detail h4 + ul li { + list-style: none; +} + +.return-param * { + display: inline; +} + +.argument-params { + margin-bottom: 20px; +} + +.return-type { + padding-right: 10px; + font-weight: normal; +} + +.return-desc { + margin-left: 10px; + margin-top: 4px; +} + +.return-desc p { + margin: 0; +} + +.deprecated, .experimental, .instance-docs { + border-left: solid 5px orange; + padding-left: 4px; + margin: 4px 0; +} + +tr.listen p, +tr.throw p, +tr.emit p{ + margin-bottom: 10px; +} + +.version, .since { + color: #aaa; +} + +h3 .right-info { + position: absolute; + right: 4px; + font-size: 14px; +} + +.version + .since:before { + content: '| '; +} + +.see { + margin-top: 10px; +} + +.see h4 { + margin: 4px 0; +} + +.content .detail h4 + .example-doc { + margin: 6px 0; +} + +.example-caption { + position: relative; + bottom: -1px; + display: inline-block; + padding: 4px; + font-style: italic; + background-color: #f5f5f5; + font-weight: bold; + border-radius: 3px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.example-caption + pre.source-code { + margin-top: 0; + border-top-left-radius: 0; +} + +footer, .file-footer { + text-align: right; + font-style: italic; + font-weight: 100; + font-size: 13px; + margin-right: 50px; + margin-left: 270px; + border-top: 1px solid #ddd; + padding-top: 30px; + margin-top: 20px; + padding-bottom: 10px; +} + +pre.source-code { + background: #f5f5f5; + padding: 4px; +} + +pre.raw-source-code > code { + padding: 0; + margin: 0; +} + +pre.source-code.line-number { + padding: 0; +} + +pre.source-code ol { + background: #eee; + padding-left: 40px; +} + +pre.source-code li { + background: white; + padding-left: 4px; + list-style: decimal; + margin: 0; +} + +pre.source-code.line-number li.active { + background: rgb(255, 255, 150); +} + +pre.source-code.line-number li.error-line { + background: #ffb8bf; +} + +table.files-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; + text-align: right; +} + +table.files-summary tbody tr:hover { + background: #eee; +} + +table.files-summary td:first-child, +table.files-summary td:nth-of-type(2) { + text-align: left; +} + +table.files-summary[data-use-coverage="false"] td.coverage { + display: none; +} + +table.files-summary thead { + background: #999; + color: white; +} + +table.files-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.files-summary td.identifiers > span { + display: block; + margin-top: 4px; +} +table.files-summary td.identifiers > span:first-child { + margin-top: 0; +} + +table.files-summary .coverage-count { + font-size: 12px; + color: #aaa; + display: inline-block; + min-width: 40px; +} + +.total-coverage-count { + position: relative; + bottom: 2px; + font-size: 12px; + color: #666; + font-weight: 500; + padding-left: 5px; +} + +table.test-summary thead { + background: #999; + color: white; +} + +table.test-summary thead .test-description { + width: 50%; +} + +table.test-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.test-summary thead .test-count { + width: 3em; +} + +table.test-summary tbody tr:hover { + background-color: #eee; +} + +table.test-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.test-summary td p { + margin: 0; +} + +table.test-summary tr.test-describe .toggle { + display: inline-block; + float: left; + margin-right: 4px; + cursor: pointer; +} + +table.test-summary tr.test-describe .toggle.opened:before { + content: 'â–¼'; +} + +table.test-summary tr.test-describe .toggle.closed:before { + content: 'â–¶'; +} + +table.test-summary .test-target > span { + display: block; + margin-top: 4px; +} +table.test-summary .test-target > span:first-child { + margin-top: 0; +} + +.inner-link-active { + background: rgb(255, 255, 150); +} + +/* search box */ +.search-box { + position: absolute; + top: 10px; + right: 50px; + padding-right: 8px; + padding-bottom: 10px; + line-height: normal; + font-size: 12px; +} + +.search-box img { + width: 20px; + vertical-align: top; +} + +.search-input { + display: inline; + visibility: hidden; + width: 0; + padding: 2px; + height: 1.5em; + outline: none; + background: transparent; + border: 1px #0af; + border-style: none none solid none; + vertical-align: bottom; +} + +.search-input-edge { + display: none; + width: 1px; + height: 5px; + background-color: #0af; + vertical-align: bottom; +} + +.search-result { + position: absolute; + display: none; + height: 600px; + width: 100%; + padding: 0; + margin-top: 5px; + margin-left: 24px; + background: white; + box-shadow: 1px 1px 4px rgb(0,0,0); + white-space: nowrap; + overflow-y: scroll; +} + +.search-result-import-path { + color: #aaa; + font-size: 12px; +} + +.search-result li { + list-style: none; + padding: 2px 4px; +} + +.search-result li a { + display: block; +} + +.search-result li.selected { + background: #ddd; +} + +.search-result li.search-separator { + background: rgb(37, 138, 175); + color: white; +} + +.search-box.active .search-input { + visibility: visible; + transition: width 0.2s ease-out; + width: 300px; +} + +.search-box.active .search-input-edge { + display: inline-block; +} + +/* coverage badge */ +.esdoc-coverage { + display: inline-block; + height: 20px; + vertical-align: top; +} + +h1 .esdoc-coverage { + position: relative; + top: -4px; +} + +.esdoc-coverage-wrap { + color: white; + font-size: 12px; + font-weight: 500; +} + +.esdoc-coverage-label { + padding: 3px 4px 3px 6px; + background: linear-gradient(to bottom, #5e5e5e 0%,#4c4c4c 100%); + border-radius: 4px 0 0 4px; + display: inline-block; + height: 20px; + box-sizing: border-box; + line-height: 14px; +} + +.esdoc-coverage-ratio { + padding: 3px 6px 3px 4px; + border-radius: 0 4px 4px 0; + display: inline-block; + height: 20px; + box-sizing: border-box; + line-height: 14px; +} + +.esdoc-coverage-low { + background: linear-gradient(to bottom, #db654f 0%,#c9533d 100%); +} + +.esdoc-coverage-middle { + background: linear-gradient(to bottom, #dab226 0%,#c9a179 100%); +} + +.esdoc-coverage-high { + background: linear-gradient(to bottom, #4fc921 0%,#3eb810 100%); +} + +.github-markdown .manual-toc { + padding-left: 0; +} + +/** manual */ + +.manual-root .navigation { + padding-left: 0; +} + +.navigation .manual-toc-title { + margin: 0; + padding: 0.5em 0 0.5em 1em; + border: none; + font-size: 1em; + font-weight: normal; +} + +.navigation .manual-toc-title:first-child { + margin-top: 0; +} + +.navigation .manual-toc { + display: none; + margin-left: 0.5em; + margin-top: -0.25em; +} + +.github-markdown .manual-toc-title a { + color: inherit; +} + +.manual-breadcrumb-list { + font-size: 0.8em; + margin-bottom: 1em; +} + +.manual-toc-title a:hover { + color: #039BE5; +} + +.manual-toc li { + margin: 0.75em 0; + list-style-type: none; +} + +.manual-toc .indent-h1 { + margin-left: 0; +} +.manual-toc .indent-h2 { + margin-left: 1em; +} +.manual-toc .indent-h3 { + margin-left: 3em; +} +.manual-toc .indent-h4 { + margin-left: 4em; +} +.manual-toc .indent-h5 { + margin-left: 5em; +} + +.manual-nav li { + margin: 0.75em 0; +} + +.manual-dot { + margin-left: 0.75em; + width: 0.6em; + height: 0.6em; + display: inline-block; + border-radius: 0.3em; + margin-right: 0.3em; + background-color: #bfe5bf; +} + +/* github markdown */ +.github-markdown { + font-size: 16px; +} + +.github-markdown h1, +.github-markdown h2, +.github-markdown h3, +.github-markdown h4, +.github-markdown h5 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + padding: 0; +} + +.github-markdown h1:nth-of-type(1) { + margin-top: 0; +} + +.github-markdown h1 { + font-size: 2em; + padding-bottom: 0.3em; +} + +.github-markdown h2 { + font-size: 1.75em; + padding-bottom: 0.3em; +} + +.github-markdown h3 { + font-size: 1.5em; + background-color: transparent; +} + +.github-markdown h4 { + font-size: 1.25em; +} + +.github-markdown h5 { + font-size: 1em; +} + +.github-markdown ul, .github-markdown ol { + padding-left: 2em; +} + +.github-markdown pre > code { + font-size: 0.85em; +} + +.github-markdown table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.github-markdown table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.github-markdown table th, +.github-markdown table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.github-markdown table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +/** badge(.svg) does not have border */ +.github-markdown img:not([src*=".svg"]) { + max-width: 100%; + box-shadow: 1px 1px 1px rgba(0,0,0,0.5); +} diff --git a/docs/dump.json b/docs/dump.json new file mode 100644 index 0000000..4089451 --- /dev/null +++ b/docs/dump.json @@ -0,0 +1,1582 @@ +[ + { + "__docId__": 0, + "kind": "file", + "static": true, + "variation": null, + "name": "src/AssertStream.js", + "memberof": null, + "longname": "src/AssertStream.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import { Writable } from \"stream\";\nimport Expected from \"./Expected\";\nimport defaults from \"set-default-value\";\n\n/**\n * this stream is used to be piped into.\n * it ends if the expected value was received.\n *\n * @author Marco Sliwa \n */\nexport default class AssertStream extends Writable {\n\n /**\n * constructor for this stream\n *\n * @constructor\n * @param {*} expected value\n * @param {object} options configuring the behaviour of AssertSream\n */\n constructor(expected, options) {\n super({\n objectMode: true\n });\n\n this.expected = Expected.of(expected, options);\n this.tapper = defaults(options.tapper).to(() => {});\n }\n\n /**\n * implementation of the write function. transforms data,\n * so that it can be compared, emits end on match, otherwise\n * continues.\n *\n * @param {string|object} chunk of data\n * @param {string} enc of data\n * @param {function} cb when operation finished\n * @return {*}\n */\n _write(chunk, enc, cb) {\n const data = Buffer.isBuffer(chunk) ? chunk.toString() : chunk;\n const result = this.expected.match(data);\n\n this.tapper(data, result);\n\n return result === -1 ? this.emit(\"error\", this.expected.getError()) : setTimeout(() => result === 1 ? this.emit(\"done\") : cb(), 1);\n }\n}\n" + }, + { + "__docId__": 1, + "kind": "class", + "static": true, + "variation": null, + "name": "AssertStream", + "memberof": "src/AssertStream.js", + "longname": "src/AssertStream.js~AssertStream", + "access": null, + "export": true, + "importPath": "expect-stream/src/AssertStream.js", + "importStyle": "AssertStream", + "description": "this stream is used to be piped into.\nit ends if the expected value was received.", + "lineNumber": 11, + "unknown": [ + { + "tagName": "@author", + "tagValue": "Marco Sliwa " + } + ], + "interface": false, + "extends": [ + "stream~Writable" + ] + }, + { + "__docId__": 2, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#constructor", + "access": null, + "description": "constructor for this stream", + "lineNumber": 20, + "unknown": [ + { + "tagName": "@constructor", + "tagValue": "" + } + ], + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "expected", + "description": "value" + }, + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "options", + "description": "configuring the behaviour of AssertSream" + } + ], + "generator": false + }, + { + "__docId__": 3, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#expected", + "access": null, + "description": null, + "lineNumber": 25, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 4, + "kind": "member", + "static": false, + "variation": null, + "name": "tapper", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#tapper", + "access": null, + "description": null, + "lineNumber": 26, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 5, + "kind": "method", + "static": false, + "variation": null, + "name": "_write", + "memberof": "src/AssertStream.js~AssertStream", + "longname": "src/AssertStream.js~AssertStream#_write", + "access": null, + "description": "implementation of the write function. transforms data,\nso that it can be compared, emits end on match, otherwise\ncontinues.", + "lineNumber": 39, + "params": [ + { + "nullable": null, + "types": [ + "string", + "object" + ], + "spread": false, + "optional": false, + "name": "chunk", + "description": "of data" + }, + { + "nullable": null, + "types": [ + "string" + ], + "spread": false, + "optional": false, + "name": "enc", + "description": "of data" + }, + { + "nullable": null, + "types": [ + "function" + ], + "spread": false, + "optional": false, + "name": "cb", + "description": "when operation finished" + } + ], + "return": { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 6, + "kind": "file", + "static": true, + "variation": null, + "name": "src/Expected.js", + "memberof": null, + "longname": "src/Expected.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isArray from \"lodash.isarray\";\nimport isEqual from \"lodash.isequal\";\nimport isFunction from \"lodash.isfunction\";\nimport isNil from \"lodash.isnil\";\nimport isMatch from \"lodash.ismatch\";\nimport { expect } from \"chai\";\n\nexport default class Expected {\n\n /**\n * Creates an ExpectationClass, that checks,\n * whether an incoming value matches the\n * expectations\n *\n * @param {*} args needed for creation\n * @return {Expected}\n */\n static of(...args) {\n return new Expected(...args);\n }\n\n /**\n * Constructor of Expected\n *\n * @constructor\n * @param {*} expected compared with input\n * @param {object} options for custom matcning behaviour\n */\n constructor(expected, { filter, eventually, strict }) {\n this.messages = [];\n this.expection = isArray(expected) ? expected.slice(0) : expected;\n this.expected = expected;\n this.matcher = isNil(strict) ? isMatch : isEqual;\n this.onMisMatch = isNil(eventually) ? -1 : 0;\n this.filter = isNil(filter) ? () => true : filter;\n }\n\n /**\n * Checks if next value in list matches the input\n *\n * @param {*} value to be compared\n * @return {Number}\n */\n includes(value) {\n const expected = this.expected.shift();\n const matches = this.matcher(value, expected);\n const onMatch = this.expected.length === 0 ? 1 : 0;\n\n this.expected = matches ? this.expected : [expected].concat(this.expected);\n\n return matches ? onMatch : this.onMisMatch;\n }\n\n /**\n * Compares input with expectations\n *\n * @param {*} value to be compared\n * @return {Number}\n */\n match(value) { // eslint-disable-line\n this.messages.push(value);\n\n if(!this.filter(value)) return 0;\n if(isFunction(this.expected)) return this.expected(value);\n if(isArray(this.expected)) return this.includes(value);\n\n return this.matcher(value, this.expected) ? 1 : this.onMisMatch;\n }\n\n /**\n * produces the error containing the expected vs actual results\n *\n * @return {Error}\n */\n getError() {\n if(isFunction(this.expection)) return new Error(`the messages ${JSON.stringify(this.messages)} do not match your expectations.`);\n\n try {\n expect(this.messages).to.eql(this.expection);\n\n return null;\n } catch(e) {\n return e;\n }\n }\n}\n" + }, + { + "__docId__": 7, + "kind": "class", + "static": true, + "variation": null, + "name": "Expected", + "memberof": "src/Expected.js", + "longname": "src/Expected.js~Expected", + "access": null, + "export": true, + "importPath": "expect-stream/src/Expected.js", + "importStyle": "Expected", + "description": null, + "lineNumber": 8, + "undocument": true, + "interface": false + }, + { + "__docId__": 8, + "kind": "method", + "static": true, + "variation": null, + "name": "of", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected.of", + "access": null, + "description": "Creates an ExpectationClass, that checks,\nwhether an incoming value matches the\nexpectations", + "lineNumber": 18, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "args", + "description": "needed for creation" + } + ], + "return": { + "nullable": null, + "types": [ + "Expected" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 9, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#constructor", + "access": null, + "description": "Constructor of Expected", + "lineNumber": 29, + "unknown": [ + { + "tagName": "@constructor", + "tagValue": "" + } + ], + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "expected", + "description": "compared with input" + }, + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "options", + "description": "for custom matcning behaviour" + } + ], + "generator": false + }, + { + "__docId__": 10, + "kind": "member", + "static": false, + "variation": null, + "name": "messages", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#messages", + "access": null, + "description": null, + "lineNumber": 30, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 11, + "kind": "member", + "static": false, + "variation": null, + "name": "expection", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expection", + "access": null, + "description": null, + "lineNumber": 31, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 12, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expected", + "access": null, + "description": null, + "lineNumber": 32, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 13, + "kind": "member", + "static": false, + "variation": null, + "name": "matcher", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#matcher", + "access": null, + "description": null, + "lineNumber": 33, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 14, + "kind": "member", + "static": false, + "variation": null, + "name": "onMisMatch", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#onMisMatch", + "access": null, + "description": null, + "lineNumber": 34, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 15, + "kind": "member", + "static": false, + "variation": null, + "name": "filter", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#filter", + "access": null, + "description": null, + "lineNumber": 35, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 16, + "kind": "method", + "static": false, + "variation": null, + "name": "includes", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#includes", + "access": null, + "description": "Checks if next value in list matches the input", + "lineNumber": 44, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "value", + "description": "to be compared" + } + ], + "return": { + "nullable": null, + "types": [ + "Number" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 17, + "kind": "member", + "static": false, + "variation": null, + "name": "expected", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#expected", + "access": null, + "description": null, + "lineNumber": 49, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 18, + "kind": "method", + "static": false, + "variation": null, + "name": "match", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#match", + "access": null, + "description": "Compares input with expectations", + "lineNumber": 60, + "params": [ + { + "nullable": null, + "types": [ + "*" + ], + "spread": false, + "optional": false, + "name": "value", + "description": "to be compared" + } + ], + "return": { + "nullable": null, + "types": [ + "Number" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 19, + "kind": "method", + "static": false, + "variation": null, + "name": "getError", + "memberof": "src/Expected.js~Expected", + "longname": "src/Expected.js~Expected#getError", + "access": null, + "description": "produces the error containing the expected vs actual results", + "lineNumber": 75, + "params": [], + "return": { + "nullable": null, + "types": [ + "Error" + ], + "spread": false, + "description": "" + }, + "generator": false + }, + { + "__docId__": 20, + "kind": "file", + "static": true, + "variation": null, + "name": "src/StreamHelper.js", + "memberof": null, + "longname": "src/StreamHelper.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isFunction from \"lodash.isfunction\";\nimport assert from \"assert\";\nimport AssertStream from \"./AssertStream\";\nimport defaults from \"set-default-value\";\n\n/**\n * this function adds the new methods to the Assertion\n * chain, where they have the following responsibilities:\n *\n * produce: sets the expected value of the stream\n * on: gives a set of input values, if testing\n * a transformer\n * notify: cb for error and done notifications\n *\n * @param {object} chai to be extended\n */\nconst StreamHelper = function({ Assertion }) {\n Assertion.addChainableMethod(\"exactly\", function(expected) {\n this.expected = defaults(expected).to(this.expected);\n this.strictEquality = true;\n }, function() {\n this.strictEquality = true;\n });\n\n Assertion.addChainableMethod(\"produce\", function(expected) {\n this.expected = expected;\n this.args = [];\n }, function() {\n this.args = [];\n });\n\n Assertion.addProperty(\"eventually\", function() {\n this.checkAllResults = true;\n });\n\n Assertion.addMethod(\"filter\", function(filter) {\n this.filterMethod = filter;\n });\n\n Assertion.addMethod(\"notify\", function(done) {\n const sink = new AssertStream(this.expected, {\n filter: this.filterMethod,\n tapper: this.tapper,\n eventually: this.checkAllResults,\n strict: this.strictEquality\n });\n\n this._obj.pipe(sink) // eslint-disable-line\n .on(\"done\", done)\n .on(\"error\", done);\n\n this.args.forEach(arg => this._obj.write(arg)); // eslint-disable-line\n });\n\n Assertion.addMethod(\"tap\", function(tapper) {\n this.tapper = tapper;\n });\n\n Assertion.addMethod(\"on\", function(...args) {\n const { write } = this._obj; // eslint-disable-line\n\n assert(\n (args.length > 0 && isFunction(write)) ||\n (args.length === 0 && !isFunction(write)\n ), \"You can only use arguments with a writable stream.\");\n\n this.args = args;\n });\n};\n\nexport default StreamHelper;\n" + }, + { + "__docId__": 21, + "kind": "function", + "static": true, + "variation": null, + "name": "StreamHelper", + "memberof": "src/StreamHelper.js", + "longname": "src/StreamHelper.js~StreamHelper", + "access": null, + "export": true, + "importPath": "expect-stream/src/StreamHelper.js", + "importStyle": "StreamHelper", + "description": "this function adds the new methods to the Assertion\nchain, where they have the following responsibilities:\n\nproduce: sets the expected value of the stream\non: gives a set of input values, if testing\n a transformer\nnotify: cb for error and done notifications", + "lineNumber": 17, + "params": [ + { + "nullable": null, + "types": [ + "object" + ], + "spread": false, + "optional": false, + "name": "chai", + "description": "to be extended" + } + ], + "generator": false + }, + { + "__docId__": 22, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/AssertStreamTest.js", + "memberof": null, + "longname": "src/__tests__/AssertStreamTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import AssertStream from \"../AssertStream\";\nimport sinon from \"sinon\";\nimport { expect } from \"chai\";\n\ndescribe(\"AssertStreamTest\", function() {\n it(\"writes to an assert stream with a value expectation, until it ends with the expected value.\", function(done) {\n const tapSpy = sinon.spy();\n const onEnd = sinon.spy();\n const stream = new AssertStream({\n test: \"test\"\n }, {\n tapper: tapSpy,\n eventually: true\n });\n\n stream.on(\"done\", onEnd);\n\n stream.write(\"bla\");\n stream.write({});\n stream.write({\n test: \"test\"\n });\n\n setTimeout(function() {\n expect(onEnd.callCount).to.equal(1);\n expect(tapSpy.firstCall.args.shift()).to.equal(\"bla\");\n expect(tapSpy.firstCall.args.shift()).to.equal(0);\n expect(tapSpy.secondCall.args.shift()).to.eql({});\n expect(tapSpy.secondCall.args.shift()).to.equal(0);\n expect(tapSpy.thirdCall.args.shift()).to.eql({\n test: \"test\"\n });\n expect(tapSpy.thirdCall.args.shift()).to.equal(1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n }, 20);\n });\n\n it(\"writes to an assert stream with a function expectation, until it ends with the expected value.\", function(done) {\n const onEnd = sinon.spy();\n const stream = new AssertStream(x => x.test === \"test\" ? 1 : 0, {});\n\n stream.on(\"done\", onEnd);\n\n stream.write(\"bla\");\n stream.write({});\n stream.write({\n test: \"test\"\n });\n\n setTimeout(function() {\n expect(onEnd.callCount).to.equal(1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n }, 20);\n });\n\n it(\"writes to an assert stream with a function expectation, until it ends with the expected value.\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream(x => x.test === \"test\" ? 1 : -1, {\n tapper: tapSpy\n });\n\n stream.on(\"error\", e => {\n expect(e.message).to.equal(\"the messages [\\\"bla\\\"] do not match your expectations.\");\n expect(tapSpy.firstCall.args.shift()).to.equal(\"bla\");\n expect(tapSpy.firstCall.args.shift()).to.equal(-1);\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n });\n\n stream.write(\"bla\");\n });\n\n it(\"writes to an assert stream, that expects multiple messages\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream([\"test1\", \"test2\", \"test3\"], {\n tapper: tapSpy\n });\n const onEnd = function() {\n expect(tapSpy.firstCall.calledWith(\"test1\", 0));\n expect(tapSpy.secondCall.calledWith(\"test2\", 0));\n expect(tapSpy.thirdCall.calledWith(\"test3\", 1));\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n };\n\n stream.on(\"done\", onEnd);\n stream.write(\"test1\");\n stream.write(\"test2\");\n stream.write(\"test3\");\n });\n\n it(\"writes to an assert stream, filtering some messages\", function(done) {\n const tapSpy = sinon.spy();\n const stream = new AssertStream([\"test1\", \"test2\"], {\n tapper: tapSpy,\n filter: value => value !== \"test4\"\n });\n\n const onEnd = function() {\n expect(tapSpy.firstCall.calledWith(\"test4\", 0));\n expect(tapSpy.secondCall.calledWith(\"test1\", 0));\n expect(tapSpy.thirdCall.calledWith(\"test2\", 1));\n expect(stream._writableState.ended).to.equal(false); // eslint-disable-line\n done();\n };\n\n stream.on(\"done\", onEnd);\n stream.write(\"test4\");\n stream.write(\"test1\");\n stream.write(\"test2\");\n });\n});\n" + }, + { + "__docId__": 23, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/ExpectStreamTest.js", + "memberof": null, + "longname": "src/__tests__/ExpectStreamTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import isArray from \"lodash.isarray\";\nimport { expect } from \"../index\";\nimport { Readable, Transform } from \"stream\";\nimport assert from \"assert\";\nimport sinon from \"sinon\";\n\nclass ReadStream extends Readable {\n constructor(messages = \"lala\") {\n super({ objectMode: true });\n\n this.messages = messages;\n }\n\n _read() {\n this.push(\n isArray(this.messages) ?\n this.messages.shift() :\n this.messages\n );\n }\n}\n\nclass TransformStream extends Transform {\n _transform(chunk, enc, cb) {\n this.push(chunk);\n setTimeout(cb, 20);\n }\n}\n\n\nclass ReadObjectStream extends Readable {\n constructor() {\n super({\n objectMode: true\n });\n }\n\n _read() {\n this.push({\n test: {\n test: []\n }\n });\n }\n}\n\nclass TransformObjStream extends Transform {\n constructor() {\n super({\n objectMode: true\n });\n }\n\n _transform(obj, enc, cb) {\n this.push(obj);\n setTimeout(cb, 20);\n }\n}\n\n\ndescribe(\"ExpectStreamTest\", function() { // eslint-disable-line\n it(\"uses the produce assertion with a readstream, matching exactly\", function(done) {\n expect(new ReadStream([\"lala1\", \"lala2\", \"lala3\"]))\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, matching on strict equality\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.exactly.produce({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, matching on strict equality - part2\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.produce.exactly({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, containing at least key test\", function(done) {\n expect(new ReadStream({ test: \"lala\", another: \"lulu\" }))\n .to.produce({ test: \"lala\" })\n .notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, containing at least key test\", function(done) {\n expect(new ReadStream({ test: \"lala\" }))\n .to.produce({ test: \"lala\", another: \"lulu\" })\n .notify(e => e ? done() : done(new Error(\"Shouldn't end up here.\")));\n });\n\n it(\"uses the produce assertion with a readstream, matching exactly and fails\", function(done) {\n const stream = new ReadStream([\"lala1\", \"lala\", \"lala3\"]);\n\n expect(stream)\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(e => {\n if(!e) return done(new Error(\"Should fail\"));\n\n try {\n expect(stream._readableState.ended).to.equal(false); // eslint-disable-line\n\n return done();\n } catch(e2) {\n return done(e2);\n }\n });\n });\n\n it(\"uses the produce assertion with a readstream, matching not exactly\", function(done) {\n const stream = new ReadStream([\"lala1\", \"lala\", \"lala2\", \"lala3\"]);\n\n expect(stream)\n .to.eventually.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(e => {\n if(e) return done(e);\n\n try {\n expect(stream._readableState.ended).to.equal(false); // eslint-disable-line\n\n return done();\n } catch(e2) {\n return done(e2);\n }\n });\n });\n\n it(\"uses the produce assertion with a readstream, matching exactly, but filtering some messages\", function(done) {\n expect(new ReadStream([\"lala1\", \"lala\", \"lala2\", \"lala3\"]))\n .filter(value => value !== \"lala\")\n .to.produce([\"lala1\", \"lala2\", \"lala3\"])\n .notify(done);\n });\n\n it(\"uses the eventually produce assertion with a readstream, producing buffers.\", function(done) {\n expect(new ReadStream()).to.eventually.produce(\"lala\").notify(done);\n });\n\n it(\"uses the produce assertion with a readstream, producing objects.\", function(done) {\n expect(new ReadObjectStream()).to.eventually.produce({\n test: {\n test: []\n }\n }).notify(done);\n });\n\n it(\"fails the produce assertion on the readstream with buffers.\", function(done) {\n expect(new ReadStream()).to.eventually.produce(\"lulu\").notify(() => done(new Error(\"should not finish\")));\n setTimeout(() => done(), 20);\n });\n\n it(\"fails the produce assertion on the readstream with objects.\", function(done) {\n expect(new ReadStream()).to.eventually.produce({\n test: \"test2\"\n }).notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 20);\n });\n\n it(\"uses the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream()).to.eventually.produce(\"huhu\").on(\"lala\", \"test\", \"huhu\").notify(done);\n });\n\n it(\"uses the produce assertion with a transformstream, producing objects.\", function(done) {\n expect(new TransformObjStream()).to.eventually.produce({\n test: {\n test: []\n }\n }).on(\"lala\", \"test\", \"huhu\", {\n test: {\n test: []\n }\n }).notify(done);\n });\n\n it(\"fails the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream())\n .to.eventually.produce(\"huhu\")\n .on(\"lala\", \"test\")\n .notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 70);\n });\n\n it(\"fails the produce assertion with a transformstream, producing objects.\", function(done) {\n expect(new TransformObjStream())\n .to.eventually.produce({\n test: {\n test: []\n }\n })\n .on(\"lala\", \"test\", {\n test: {\n test: 1\n }\n })\n .notify(() => done(new Error(\"should not finish\")));\n\n setTimeout(() => done(), 70);\n });\n\n it(\"tries to test a readstream with input\", function(done) {\n try {\n expect(new ReadStream()).to.eventually.produce(\"test\").on(\"bla\").notify(done);\n } catch(e) {\n assert.equal(e.message, \"You can only use arguments with a writable stream.\");\n done();\n }\n });\n\n it(\"tries to test a transformstream without input\", function(done) {\n try {\n expect(new TransformStream()).to.eventually.produce(\"test\").on().notify(done);\n } catch(e) {\n assert.equal(e.message, \"You can only use arguments with a writable stream.\");\n done();\n }\n });\n\n it(\"uses the produce assertion with a transformstream, producing buffers.\", function(done) {\n expect(new TransformStream())\n .to.produce(x => x === \"huhu\" ? 1 : -1)\n .on(\"lala\", \"test\", \"huhu\")\n .notify(e => e instanceof Error ? done() : done(new Error(\"should throw\")));\n });\n\n it(\"taps a stream under test.\", function(done) {\n const spy = sinon.spy();\n\n expect(new TransformStream())\n .to.eventually.produce(\"huhu\")\n .on(\"lala\", \"test\", \"huhu\")\n .tap(spy)\n .notify(() => {\n try {\n expect(spy.callCount).to.equal(3);\n expect(spy.firstCall.args.shift()).to.equal(\"lala\");\n expect(spy.firstCall.args.shift()).to.equal(0);\n expect(spy.secondCall.args.shift()).to.equal(\"test\");\n expect(spy.secondCall.args.shift()).to.equal(0);\n expect(spy.thirdCall.args.shift()).to.equal(\"huhu\");\n expect(spy.thirdCall.args.shift()).to.equal(1);\n done();\n } catch(e) {\n done(e);\n }\n });\n });\n});\n" + }, + { + "__docId__": 24, + "kind": "class", + "static": true, + "variation": null, + "name": "ReadStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 7, + "undocument": true, + "interface": false, + "extends": [ + "stream~Readable" + ] + }, + { + "__docId__": 25, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#constructor", + "access": null, + "description": null, + "lineNumber": 8, + "undocument": true, + "params": [ + { + "name": "messages", + "optional": true, + "types": [ + "string" + ], + "defaultRaw": "lala", + "defaultValue": "lala" + } + ], + "generator": false + }, + { + "__docId__": 26, + "kind": "member", + "static": false, + "variation": null, + "name": "messages", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#messages", + "access": null, + "description": null, + "lineNumber": 11, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 27, + "kind": "method", + "static": false, + "variation": null, + "name": "_read", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadStream#_read", + "access": null, + "description": null, + "lineNumber": 14, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 28, + "kind": "class", + "static": true, + "variation": null, + "name": "TransformStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~TransformStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 23, + "undocument": true, + "interface": false, + "extends": [ + "stream~Transform" + ] + }, + { + "__docId__": 29, + "kind": "method", + "static": false, + "variation": null, + "name": "_transform", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformStream#_transform", + "access": null, + "description": null, + "lineNumber": 24, + "undocument": true, + "params": [ + { + "name": "chunk", + "types": [ + "*" + ] + }, + { + "name": "enc", + "types": [ + "*" + ] + }, + { + "name": "cb", + "types": [ + "*" + ] + } + ], + "generator": false + }, + { + "__docId__": 30, + "kind": "class", + "static": true, + "variation": null, + "name": "ReadObjectStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 31, + "undocument": true, + "interface": false, + "extends": [ + "stream~Readable" + ] + }, + { + "__docId__": 31, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream#constructor", + "access": null, + "description": null, + "lineNumber": 32, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 32, + "kind": "method", + "static": false, + "variation": null, + "name": "_read", + "memberof": "src/__tests__/ExpectStreamTest.js~ReadObjectStream", + "longname": "src/__tests__/ExpectStreamTest.js~ReadObjectStream#_read", + "access": null, + "description": null, + "lineNumber": 38, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 33, + "kind": "class", + "static": true, + "variation": null, + "name": "TransformObjStream", + "memberof": "src/__tests__/ExpectStreamTest.js", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "access": null, + "export": false, + "importPath": "expect-stream/src/__tests__/ExpectStreamTest.js", + "importStyle": null, + "description": null, + "lineNumber": 47, + "undocument": true, + "interface": false, + "extends": [ + "stream~Transform" + ] + }, + { + "__docId__": 34, + "kind": "constructor", + "static": false, + "variation": null, + "name": "constructor", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream#constructor", + "access": null, + "description": null, + "lineNumber": 48, + "undocument": true, + "params": [], + "generator": false + }, + { + "__docId__": 35, + "kind": "method", + "static": false, + "variation": null, + "name": "_transform", + "memberof": "src/__tests__/ExpectStreamTest.js~TransformObjStream", + "longname": "src/__tests__/ExpectStreamTest.js~TransformObjStream#_transform", + "access": null, + "description": null, + "lineNumber": 54, + "undocument": true, + "params": [ + { + "name": "obj", + "types": [ + "*" + ] + }, + { + "name": "enc", + "types": [ + "*" + ] + }, + { + "name": "cb", + "types": [ + "*" + ] + } + ], + "generator": false + }, + { + "__docId__": 36, + "kind": "file", + "static": true, + "variation": null, + "name": "src/__tests__/ExpectedTest.js", + "memberof": null, + "longname": "src/__tests__/ExpectedTest.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import Expected from \"../Expected\";\nimport { expect } from \"chai\";\n\ndescribe(\"Expected\", function() {\n it(\"compares a single value with the expected one\", function() {\n const expected = Expected.of(\"Test\", {});\n\n expect(expected.match(\"Test\")).to.equal(1);\n expect(expected.match(\"NotTest\")).to.equal(-1);\n });\n\n it(\"compares a single value with the expected one, skipping all not matching ones\", function() {\n const expected = Expected.of(\"Test\", {\n eventually: true\n });\n\n expect(expected.match(\"Test\")).to.equal(1);\n expect(expected.match(\"NotTest\")).to.equal(0);\n });\n\n it(\"compares a list of values with another list of values\", function() {\n const expected = Expected.of([\"Test1\", \"Test2\", \"Test3\"], {});\n\n expect(expected.match(\"Test1\")).to.equal(0);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n\n it(\"compares a list of values with another list, skipping all non-matches\", function() {\n const expected = Expected.of([\"Test3\", \"Test4\", \"Test5\"], {\n eventually: true\n });\n\n expect(expected.match(\"Test3\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test5\")).to.equal(1);\n });\n\n it(\"compares a list of values with a filter\", function() {\n const expected = Expected.of([\"Test3\", \"Test4\", \"Test5\"], {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test3\")).to.equal(0);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test4\")).to.equal(0);\n expect(expected.match(\"Test5\")).to.equal(1);\n });\n\n it(\"compares a single of values with a filter\", function() {\n const expected = Expected.of(\"Test3\", {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n\n it(\"compares with a function\", function() {\n const expected = Expected.of(value => value === \"Test3\" ? 1 : -1, {\n filter: value => value !== \"Test2\"\n });\n\n expect(expected.match(\"Test1\")).to.equal(-1);\n expect(expected.match(\"Test2\")).to.equal(0);\n expect(expected.match(\"Test3\")).to.equal(1);\n });\n});\n" + }, + { + "__docId__": 37, + "kind": "file", + "static": true, + "variation": null, + "name": "src/examples/test.js", + "memberof": null, + "longname": "src/examples/test.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "" + }, + { + "__docId__": 38, + "kind": "file", + "static": true, + "variation": null, + "name": "src/index.js", + "memberof": null, + "longname": "src/index.js", + "access": null, + "description": null, + "lineNumber": 1, + "content": "import StreamHelper from \"./StreamHelper\";\n\nconst chai = require(\"chai\");\n\nchai.use(StreamHelper);\n\nmodule.exports = chai;\n" + }, + { + "__docId__": 39, + "kind": "variable", + "static": true, + "variation": null, + "name": "chai", + "memberof": "src/index.js", + "longname": "src/index.js~chai", + "access": null, + "export": false, + "importPath": "expect-stream/src/index.js", + "importStyle": null, + "description": null, + "lineNumber": 3, + "undocument": true, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 41, + "kind": "external", + "static": true, + "variation": null, + "name": "Infinity", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 42, + "kind": "external", + "static": true, + "variation": null, + "name": "NaN", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 43, + "kind": "external", + "static": true, + "variation": null, + "name": "undefined", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 44, + "kind": "external", + "static": true, + "variation": null, + "name": "null", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~null", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 45, + "kind": "external", + "static": true, + "variation": null, + "name": "Object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 46, + "kind": "external", + "static": true, + "variation": null, + "name": "object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 47, + "kind": "external", + "static": true, + "variation": null, + "name": "Function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 48, + "kind": "external", + "static": true, + "variation": null, + "name": "function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 49, + "kind": "external", + "static": true, + "variation": null, + "name": "Boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 50, + "kind": "external", + "static": true, + "variation": null, + "name": "boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 51, + "kind": "external", + "static": true, + "variation": null, + "name": "Symbol", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 52, + "kind": "external", + "static": true, + "variation": null, + "name": "Error", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Error", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 53, + "kind": "external", + "static": true, + "variation": null, + "name": "EvalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 54, + "kind": "external", + "static": true, + "variation": null, + "name": "InternalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 55, + "kind": "external", + "static": true, + "variation": null, + "name": "RangeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 56, + "kind": "external", + "static": true, + "variation": null, + "name": "ReferenceError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 57, + "kind": "external", + "static": true, + "variation": null, + "name": "SyntaxError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 58, + "kind": "external", + "static": true, + "variation": null, + "name": "TypeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 59, + "kind": "external", + "static": true, + "variation": null, + "name": "URIError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 60, + "kind": "external", + "static": true, + "variation": null, + "name": "Number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 61, + "kind": "external", + "static": true, + "variation": null, + "name": "number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 62, + "kind": "external", + "static": true, + "variation": null, + "name": "Date", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Date", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 63, + "kind": "external", + "static": true, + "variation": null, + "name": "String", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~String", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 64, + "kind": "external", + "static": true, + "variation": null, + "name": "string", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~string", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 65, + "kind": "external", + "static": true, + "variation": null, + "name": "RegExp", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 66, + "kind": "external", + "static": true, + "variation": null, + "name": "Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 67, + "kind": "external", + "static": true, + "variation": null, + "name": "Int8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 68, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 69, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint8ClampedArray", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 70, + "kind": "external", + "static": true, + "variation": null, + "name": "Int16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 71, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 72, + "kind": "external", + "static": true, + "variation": null, + "name": "Int32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 73, + "kind": "external", + "static": true, + "variation": null, + "name": "Uint32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 74, + "kind": "external", + "static": true, + "variation": null, + "name": "Float32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 75, + "kind": "external", + "static": true, + "variation": null, + "name": "Float64Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 76, + "kind": "external", + "static": true, + "variation": null, + "name": "Map", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Map", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 77, + "kind": "external", + "static": true, + "variation": null, + "name": "Set", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Set", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 78, + "kind": "external", + "static": true, + "variation": null, + "name": "WeakMap", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 79, + "kind": "external", + "static": true, + "variation": null, + "name": "WeakSet", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 80, + "kind": "external", + "static": true, + "variation": null, + "name": "ArrayBuffer", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 81, + "kind": "external", + "static": true, + "variation": null, + "name": "DataView", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 82, + "kind": "external", + "static": true, + "variation": null, + "name": "JSON", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 83, + "kind": "external", + "static": true, + "variation": null, + "name": "Promise", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 84, + "kind": "external", + "static": true, + "variation": null, + "name": "Generator", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 85, + "kind": "external", + "static": true, + "variation": null, + "name": "GeneratorFunction", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 86, + "kind": "external", + "static": true, + "variation": null, + "name": "Reflect", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 87, + "kind": "external", + "static": true, + "variation": null, + "name": "Proxy", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 89, + "kind": "external", + "static": true, + "variation": null, + "name": "CanvasRenderingContext2D", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 90, + "kind": "external", + "static": true, + "variation": null, + "name": "DocumentFragment", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 91, + "kind": "external", + "static": true, + "variation": null, + "name": "Element", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Element", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 92, + "kind": "external", + "static": true, + "variation": null, + "name": "Event", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Event", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 93, + "kind": "external", + "static": true, + "variation": null, + "name": "Node", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~Node", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 94, + "kind": "external", + "static": true, + "variation": null, + "name": "NodeList", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~NodeList", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 95, + "kind": "external", + "static": true, + "variation": null, + "name": "XMLHttpRequest", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 96, + "kind": "external", + "static": true, + "variation": null, + "name": "AudioContext", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "longname": "BuiltinExternal/WebAPIExternal.js~AudioContext", + "access": null, + "description": "", + "builtinExternal": true + } +] \ No newline at end of file diff --git a/docs/file/src/AssertStream.js.html b/docs/file/src/AssertStream.js.html new file mode 100644 index 0000000..be0a994 --- /dev/null +++ b/docs/file/src/AssertStream.js.html @@ -0,0 +1,106 @@ + + + + + + src/AssertStream.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/AssertStream.js

    +
    import { Writable } from "stream";
    +import Expected from "./Expected";
    +import defaults from "set-default-value";
    +
    +/**
    + * this stream is used to be piped into.
    + * it ends if the expected value was received.
    + *
    + * @author Marco Sliwa <marco@circle.ai>
    + */
    +export default class AssertStream extends Writable {
    +
    +    /**
    +     * constructor for this stream
    +     *
    +     * @constructor
    +     * @param       {*}      expected value
    +     * @param       {object} options  configuring the behaviour of AssertSream
    +     */
    +    constructor(expected, options) {
    +        super({
    +            objectMode: true
    +        });
    +
    +        this.expected = Expected.of(expected, options);
    +        this.tapper   = defaults(options.tapper).to(() => {});
    +    }
    +
    +    /**
    +     * implementation of the write function. transforms data,
    +     * so that it can be compared, emits end on match, otherwise
    +     * continues.
    +     *
    +     * @param  {string|object} chunk of data
    +     * @param  {string}        enc   of data
    +     * @param  {function}      cb    when operation finished
    +     * @return {*}
    +     */
    +    _write(chunk, enc, cb) {
    +        const data   = Buffer.isBuffer(chunk) ? chunk.toString() : chunk;
    +        const result = this.expected.match(data);
    +
    +        this.tapper(data, result);
    +
    +        return result === -1 ? this.emit("error", this.expected.getError()) : setTimeout(() => result === 1 ? this.emit("done") : cb(), 1);
    +    }
    +}
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/Expected.js.html b/docs/file/src/Expected.js.html new file mode 100644 index 0000000..5aadf3f --- /dev/null +++ b/docs/file/src/Expected.js.html @@ -0,0 +1,145 @@ + + + + + + src/Expected.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/Expected.js

    +
    import isArray from "lodash.isarray";
    +import isEqual from "lodash.isequal";
    +import isFunction from "lodash.isfunction";
    +import isNil from "lodash.isnil";
    +import isMatch from "lodash.ismatch";
    +import { expect } from "chai";
    +
    +export default class Expected {
    +
    +    /**
    +     * Creates an ExpectationClass, that checks,
    +     * whether an incoming value matches the
    +     * expectations
    +     *
    +     * @param  {*}        args needed for creation
    +     * @return {Expected}
    +     */
    +    static of(...args) {
    +        return new Expected(...args);
    +    }
    +
    +    /**
    +     * Constructor of Expected
    +     *
    +     * @constructor
    +     * @param       {*}      expected   compared with input
    +     * @param       {object} options    for custom matcning behaviour
    +     */
    +    constructor(expected, { filter, eventually, strict }) {
    +        this.messages   = [];
    +        this.expection  = isArray(expected) ? expected.slice(0) : expected;
    +        this.expected   = expected;
    +        this.matcher    = isNil(strict) ? isMatch : isEqual;
    +        this.onMisMatch = isNil(eventually) ? -1 : 0;
    +        this.filter     = isNil(filter) ? () => true : filter;
    +    }
    +
    +    /**
    +     * Checks if next value in list matches the input
    +     *
    +     * @param  {*}      value to be compared
    +     * @return {Number}
    +     */
    +    includes(value) {
    +        const expected = this.expected.shift();
    +        const matches  = this.matcher(value, expected);
    +        const onMatch  = this.expected.length === 0 ? 1 : 0;
    +
    +        this.expected = matches ? this.expected : [expected].concat(this.expected);
    +
    +        return matches ? onMatch : this.onMisMatch;
    +    }
    +
    +    /**
    +     * Compares input with expectations
    +     *
    +     * @param  {*}      value to be compared
    +     * @return {Number}
    +     */
    +    match(value) { // eslint-disable-line
    +        this.messages.push(value);
    +
    +        if(!this.filter(value))       return 0;
    +        if(isFunction(this.expected)) return this.expected(value);
    +        if(isArray(this.expected))    return this.includes(value);
    +
    +        return this.matcher(value, this.expected) ? 1 : this.onMisMatch;
    +    }
    +
    +    /**
    +     * produces the error containing the expected vs actual results
    +     *
    +     * @return {Error}
    +     */
    +    getError() {
    +        if(isFunction(this.expection)) return new Error(`the messages ${JSON.stringify(this.messages)} do not match your expectations.`);
    +
    +        try {
    +            expect(this.messages).to.eql(this.expection);
    +
    +            return null;
    +        } catch(e) {
    +            return e;
    +        }
    +    }
    +}
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/StreamHelper.js.html b/docs/file/src/StreamHelper.js.html new file mode 100644 index 0000000..acdc482 --- /dev/null +++ b/docs/file/src/StreamHelper.js.html @@ -0,0 +1,130 @@ + + + + + + src/StreamHelper.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/StreamHelper.js

    +
    import isFunction from "lodash.isfunction";
    +import assert from "assert";
    +import AssertStream from "./AssertStream";
    +import defaults from "set-default-value";
    +
    +/**
    + * this function adds the new methods to the Assertion
    + * chain, where they have the following responsibilities:
    + *
    + * produce: sets the expected value of the stream
    + * on:      gives a set of input values, if testing
    + *          a transformer
    + * notify:  cb for error and done notifications
    + *
    + * @param {object} chai  to be extended
    + */
    +const StreamHelper = function({ Assertion }) {
    +    Assertion.addChainableMethod("exactly", function(expected) {
    +        this.expected       = defaults(expected).to(this.expected);
    +        this.strictEquality = true;
    +    }, function() {
    +        this.strictEquality = true;
    +    });
    +
    +    Assertion.addChainableMethod("produce", function(expected) {
    +        this.expected = expected;
    +        this.args     = [];
    +    }, function() {
    +        this.args = [];
    +    });
    +
    +    Assertion.addProperty("eventually", function() {
    +        this.checkAllResults = true;
    +    });
    +
    +    Assertion.addMethod("filter", function(filter) {
    +        this.filterMethod = filter;
    +    });
    +
    +    Assertion.addMethod("notify", function(done) {
    +        const sink = new AssertStream(this.expected, {
    +            filter:     this.filterMethod,
    +            tapper:     this.tapper,
    +            eventually: this.checkAllResults,
    +            strict:     this.strictEquality
    +        });
    +
    +        this._obj.pipe(sink)     // eslint-disable-line
    +            .on("done", done)
    +            .on("error", done);
    +
    +        this.args.forEach(arg => this._obj.write(arg)); // eslint-disable-line
    +    });
    +
    +    Assertion.addMethod("tap", function(tapper) {
    +        this.tapper = tapper;
    +    });
    +
    +    Assertion.addMethod("on", function(...args) {
    +        const { write } = this._obj; // eslint-disable-line
    +
    +        assert(
    +            (args.length > 0 && isFunction(write)) ||
    +            (args.length === 0 && !isFunction(write)
    +        ), "You can only use arguments with a writable stream.");
    +
    +        this.args = args;
    +    });
    +};
    +
    +export default StreamHelper;
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/__tests__/AssertStreamTest.js.html b/docs/file/src/__tests__/AssertStreamTest.js.html new file mode 100644 index 0000000..fce224b --- /dev/null +++ b/docs/file/src/__tests__/AssertStreamTest.js.html @@ -0,0 +1,173 @@ + + + + + + src/__tests__/AssertStreamTest.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/__tests__/AssertStreamTest.js

    +
    import AssertStream from "../AssertStream";
    +import sinon from "sinon";
    +import { expect } from "chai";
    +
    +describe("AssertStreamTest", function() {
    +    it("writes to an assert stream with a value expectation, until it ends with the expected value.", function(done) {
    +        const tapSpy = sinon.spy();
    +        const onEnd  = sinon.spy();
    +        const stream = new AssertStream({
    +            test: "test"
    +        }, {
    +            tapper:     tapSpy,
    +            eventually: true
    +        });
    +
    +        stream.on("done", onEnd);
    +
    +        stream.write("bla");
    +        stream.write({});
    +        stream.write({
    +            test: "test"
    +        });
    +
    +        setTimeout(function() {
    +            expect(onEnd.callCount).to.equal(1);
    +            expect(tapSpy.firstCall.args.shift()).to.equal("bla");
    +            expect(tapSpy.firstCall.args.shift()).to.equal(0);
    +            expect(tapSpy.secondCall.args.shift()).to.eql({});
    +            expect(tapSpy.secondCall.args.shift()).to.equal(0);
    +            expect(tapSpy.thirdCall.args.shift()).to.eql({
    +                test: "test"
    +            });
    +            expect(tapSpy.thirdCall.args.shift()).to.equal(1);
    +            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
    +            done();
    +        }, 20);
    +    });
    +
    +    it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) {
    +        const onEnd  = sinon.spy();
    +        const stream = new AssertStream(x => x.test === "test" ? 1 : 0, {});
    +
    +        stream.on("done", onEnd);
    +
    +        stream.write("bla");
    +        stream.write({});
    +        stream.write({
    +            test: "test"
    +        });
    +
    +        setTimeout(function() {
    +            expect(onEnd.callCount).to.equal(1);
    +            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
    +            done();
    +        }, 20);
    +    });
    +
    +    it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) {
    +        const tapSpy = sinon.spy();
    +        const stream = new AssertStream(x => x.test === "test" ? 1 : -1, {
    +            tapper: tapSpy
    +        });
    +
    +        stream.on("error", e => {
    +            expect(e.message).to.equal("the messages [\"bla\"] do not match your expectations.");
    +            expect(tapSpy.firstCall.args.shift()).to.equal("bla");
    +            expect(tapSpy.firstCall.args.shift()).to.equal(-1);
    +            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
    +            done();
    +        });
    +
    +        stream.write("bla");
    +    });
    +
    +    it("writes to an assert stream, that expects multiple messages", function(done) {
    +        const tapSpy = sinon.spy();
    +        const stream = new AssertStream(["test1", "test2", "test3"], {
    +            tapper: tapSpy
    +        });
    +        const onEnd = function() {
    +            expect(tapSpy.firstCall.calledWith("test1", 0));
    +            expect(tapSpy.secondCall.calledWith("test2", 0));
    +            expect(tapSpy.thirdCall.calledWith("test3", 1));
    +            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
    +            done();
    +        };
    +
    +        stream.on("done", onEnd);
    +        stream.write("test1");
    +        stream.write("test2");
    +        stream.write("test3");
    +    });
    +
    +    it("writes to an assert stream, filtering some messages", function(done) {
    +        const tapSpy = sinon.spy();
    +        const stream = new AssertStream(["test1", "test2"], {
    +            tapper: tapSpy,
    +            filter: value => value !== "test4"
    +        });
    +
    +        const onEnd = function() {
    +            expect(tapSpy.firstCall.calledWith("test4", 0));
    +            expect(tapSpy.secondCall.calledWith("test1", 0));
    +            expect(tapSpy.thirdCall.calledWith("test2", 1));
    +            expect(stream._writableState.ended).to.equal(false); // eslint-disable-line
    +            done();
    +        };
    +
    +        stream.on("done", onEnd);
    +        stream.write("test4");
    +        stream.write("test1");
    +        stream.write("test2");
    +    });
    +});
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/__tests__/ExpectStreamTest.js.html b/docs/file/src/__tests__/ExpectStreamTest.js.html new file mode 100644 index 0000000..b93f428 --- /dev/null +++ b/docs/file/src/__tests__/ExpectStreamTest.js.html @@ -0,0 +1,308 @@ + + + + + + src/__tests__/ExpectStreamTest.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/__tests__/ExpectStreamTest.js

    +
    import isArray from "lodash.isarray";
    +import { expect } from "../index";
    +import { Readable, Transform } from "stream";
    +import assert from "assert";
    +import sinon from "sinon";
    +
    +class ReadStream extends Readable {
    +    constructor(messages = "lala") {
    +        super({ objectMode: true });
    +
    +        this.messages = messages;
    +    }
    +
    +    _read() {
    +        this.push(
    +            isArray(this.messages) ?
    +            this.messages.shift() :
    +            this.messages
    +        );
    +    }
    +}
    +
    +class TransformStream extends Transform {
    +    _transform(chunk, enc, cb) {
    +        this.push(chunk);
    +        setTimeout(cb, 20);
    +    }
    +}
    +
    +
    +class ReadObjectStream extends Readable {
    +    constructor() {
    +        super({
    +            objectMode: true
    +        });
    +    }
    +
    +    _read() {
    +        this.push({
    +            test: {
    +                test: []
    +            }
    +        });
    +    }
    +}
    +
    +class TransformObjStream extends Transform {
    +    constructor() {
    +        super({
    +            objectMode: true
    +        });
    +    }
    +
    +    _transform(obj, enc, cb) {
    +        this.push(obj);
    +        setTimeout(cb, 20);
    +    }
    +}
    +
    +
    +describe("ExpectStreamTest", function() { // eslint-disable-line
    +    it("uses the produce assertion with a readstream, matching exactly", function(done) {
    +        expect(new ReadStream(["lala1", "lala2", "lala3"]))
    +            .to.produce(["lala1", "lala2", "lala3"])
    +            .notify(done);
    +    });
    +
    +    it("uses the produce assertion with a readstream, matching on strict equality", function(done) {
    +        expect(new ReadStream({ test: "lala" }))
    +            .to.exactly.produce({ test: "lala" })
    +            .notify(done);
    +    });
    +
    +    it("uses the produce assertion with a readstream, matching on strict equality - part2", function(done) {
    +        expect(new ReadStream({ test: "lala" }))
    +            .to.produce.exactly({ test: "lala" })
    +            .notify(done);
    +    });
    +
    +    it("uses the produce assertion with a readstream, containing at least key test", function(done) {
    +        expect(new ReadStream({ test: "lala", another: "lulu" }))
    +            .to.produce({ test: "lala" })
    +            .notify(done);
    +    });
    +
    +    it("uses the produce assertion with a readstream, containing at least key test", function(done) {
    +        expect(new ReadStream({ test: "lala" }))
    +            .to.produce({ test: "lala", another: "lulu" })
    +            .notify(e => e ? done() : done(new Error("Shouldn't end up here.")));
    +    });
    +
    +    it("uses the produce assertion with a readstream, matching exactly and fails", function(done) {
    +        const stream = new ReadStream(["lala1", "lala", "lala3"]);
    +
    +        expect(stream)
    +            .to.produce(["lala1", "lala2", "lala3"])
    +            .notify(e => {
    +                if(!e) return done(new Error("Should fail"));
    +
    +                try {
    +                    expect(stream._readableState.ended).to.equal(false); // eslint-disable-line
    +
    +                    return done();
    +                } catch(e2) {
    +                    return done(e2);
    +                }
    +            });
    +    });
    +
    +    it("uses the produce assertion with a readstream, matching not exactly", function(done) {
    +        const stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]);
    +
    +        expect(stream)
    +            .to.eventually.produce(["lala1", "lala2", "lala3"])
    +            .notify(e => {
    +                if(e) return done(e);
    +
    +                try {
    +                    expect(stream._readableState.ended).to.equal(false); // eslint-disable-line
    +
    +                    return done();
    +                } catch(e2) {
    +                    return done(e2);
    +                }
    +            });
    +    });
    +
    +    it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function(done) {
    +        expect(new ReadStream(["lala1", "lala", "lala2", "lala3"]))
    +            .filter(value => value !== "lala")
    +            .to.produce(["lala1", "lala2", "lala3"])
    +            .notify(done);
    +    });
    +
    +    it("uses the eventually produce assertion with a readstream, producing buffers.", function(done) {
    +        expect(new ReadStream()).to.eventually.produce("lala").notify(done);
    +    });
    +
    +    it("uses the produce assertion with a readstream, producing objects.", function(done) {
    +        expect(new ReadObjectStream()).to.eventually.produce({
    +            test: {
    +                test: []
    +            }
    +        }).notify(done);
    +    });
    +
    +    it("fails the produce assertion on the readstream with buffers.", function(done) {
    +        expect(new ReadStream()).to.eventually.produce("lulu").notify(() => done(new Error("should not finish")));
    +        setTimeout(() => done(), 20);
    +    });
    +
    +    it("fails the produce assertion on the readstream with objects.", function(done) {
    +        expect(new ReadStream()).to.eventually.produce({
    +            test: "test2"
    +        }).notify(() => done(new Error("should not finish")));
    +
    +        setTimeout(() => done(), 20);
    +    });
    +
    +    it("uses the produce assertion with a transformstream, producing buffers.", function(done) {
    +        expect(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").notify(done);
    +    });
    +
    +    it("uses the produce assertion with a transformstream, producing objects.", function(done) {
    +        expect(new TransformObjStream()).to.eventually.produce({
    +            test: {
    +                test: []
    +            }
    +        }).on("lala", "test", "huhu", {
    +            test: {
    +                test: []
    +            }
    +        }).notify(done);
    +    });
    +
    +    it("fails the produce assertion with a transformstream, producing buffers.", function(done) {
    +        expect(new TransformStream())
    +            .to.eventually.produce("huhu")
    +            .on("lala", "test")
    +            .notify(() => done(new Error("should not finish")));
    +
    +        setTimeout(() => done(), 70);
    +    });
    +
    +    it("fails the produce assertion with a transformstream, producing objects.", function(done) {
    +        expect(new TransformObjStream())
    +            .to.eventually.produce({
    +                test: {
    +                    test: []
    +                }
    +            })
    +            .on("lala", "test", {
    +                test: {
    +                    test: 1
    +                }
    +            })
    +            .notify(() => done(new Error("should not finish")));
    +
    +        setTimeout(() => done(), 70);
    +    });
    +
    +    it("tries to test a readstream with input", function(done) {
    +        try {
    +            expect(new ReadStream()).to.eventually.produce("test").on("bla").notify(done);
    +        } catch(e) {
    +            assert.equal(e.message, "You can only use arguments with a writable stream.");
    +            done();
    +        }
    +    });
    +
    +    it("tries to test a transformstream without input", function(done) {
    +        try {
    +            expect(new TransformStream()).to.eventually.produce("test").on().notify(done);
    +        } catch(e) {
    +            assert.equal(e.message, "You can only use arguments with a writable stream.");
    +            done();
    +        }
    +    });
    +
    +    it("uses the produce assertion with a transformstream, producing buffers.", function(done) {
    +        expect(new TransformStream())
    +            .to.produce(x => x === "huhu" ? 1 : -1)
    +            .on("lala", "test", "huhu")
    +            .notify(e => e instanceof Error ? done() : done(new Error("should throw")));
    +    });
    +
    +    it("taps a stream under test.", function(done) {
    +        const spy = sinon.spy();
    +
    +        expect(new TransformStream())
    +            .to.eventually.produce("huhu")
    +            .on("lala", "test", "huhu")
    +            .tap(spy)
    +            .notify(() => {
    +                try {
    +                    expect(spy.callCount).to.equal(3);
    +                    expect(spy.firstCall.args.shift()).to.equal("lala");
    +                    expect(spy.firstCall.args.shift()).to.equal(0);
    +                    expect(spy.secondCall.args.shift()).to.equal("test");
    +                    expect(spy.secondCall.args.shift()).to.equal(0);
    +                    expect(spy.thirdCall.args.shift()).to.equal("huhu");
    +                    expect(spy.thirdCall.args.shift()).to.equal(1);
    +                    done();
    +                } catch(e) {
    +                    done(e);
    +                }
    +            });
    +    });
    +});
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/__tests__/ExpectedTest.js.html b/docs/file/src/__tests__/ExpectedTest.js.html new file mode 100644 index 0000000..e700adb --- /dev/null +++ b/docs/file/src/__tests__/ExpectedTest.js.html @@ -0,0 +1,128 @@ + + + + + + src/__tests__/ExpectedTest.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/__tests__/ExpectedTest.js

    +
    import Expected from "../Expected";
    +import { expect } from "chai";
    +
    +describe("Expected", function() {
    +    it("compares a single value with the expected one", function() {
    +        const expected = Expected.of("Test", {});
    +
    +        expect(expected.match("Test")).to.equal(1);
    +        expect(expected.match("NotTest")).to.equal(-1);
    +    });
    +
    +    it("compares a single value with the expected one, skipping all not matching ones", function() {
    +        const expected = Expected.of("Test", {
    +            eventually: true
    +        });
    +
    +        expect(expected.match("Test")).to.equal(1);
    +        expect(expected.match("NotTest")).to.equal(0);
    +    });
    +
    +    it("compares a list of values with another list of values", function() {
    +        const expected = Expected.of(["Test1", "Test2", "Test3"], {});
    +
    +        expect(expected.match("Test1")).to.equal(0);
    +        expect(expected.match("Test2")).to.equal(0);
    +        expect(expected.match("Test3")).to.equal(1);
    +    });
    +
    +    it("compares a list of values with another list, skipping all non-matches", function() {
    +        const expected = Expected.of(["Test3", "Test4", "Test5"], {
    +            eventually: true
    +        });
    +
    +        expect(expected.match("Test3")).to.equal(0);
    +        expect(expected.match("Test4")).to.equal(0);
    +        expect(expected.match("Test4")).to.equal(0);
    +        expect(expected.match("Test5")).to.equal(1);
    +    });
    +
    +    it("compares a list of values with a filter", function() {
    +        const expected = Expected.of(["Test3", "Test4", "Test5"], {
    +            filter: value => value !== "Test2"
    +        });
    +
    +        expect(expected.match("Test3")).to.equal(0);
    +        expect(expected.match("Test2")).to.equal(0);
    +        expect(expected.match("Test4")).to.equal(0);
    +        expect(expected.match("Test5")).to.equal(1);
    +    });
    +
    +    it("compares a single of values with a filter", function() {
    +        const expected = Expected.of("Test3", {
    +            filter: value => value !== "Test2"
    +        });
    +
    +        expect(expected.match("Test2")).to.equal(0);
    +        expect(expected.match("Test3")).to.equal(1);
    +    });
    +
    +    it("compares with a function", function() {
    +        const expected = Expected.of(value => value === "Test3" ? 1 : -1, {
    +            filter: value => value !== "Test2"
    +        });
    +
    +        expect(expected.match("Test1")).to.equal(-1);
    +        expect(expected.match("Test2")).to.equal(0);
    +        expect(expected.match("Test3")).to.equal(1);
    +    });
    +});
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/file/src/examples/test.js.html b/docs/file/src/examples/test.js.html new file mode 100644 index 0000000..8aa9ce9 --- /dev/null +++ b/docs/file/src/examples/test.js.html @@ -0,0 +1,59 @@ + + + + + + src/examples/test.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/examples/test.js

    +
    
    +

    Sorry, this documentation does not provide source code.

    +
    + + + + + + + + + + + + diff --git a/docs/file/src/index.js.html b/docs/file/src/index.js.html new file mode 100644 index 0000000..fa7b29a --- /dev/null +++ b/docs/file/src/index.js.html @@ -0,0 +1,66 @@ + + + + + + src/index.js | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    src/index.js

    +
    import StreamHelper from "./StreamHelper";
    +
    +const chai = require("chai");
    +
    +chai.use(StreamHelper);
    +
    +module.exports = chai;
    +
    + +
    + + + + + + + + + + + + diff --git a/docs/function/index.html b/docs/function/index.html new file mode 100644 index 0000000..ca2df35 --- /dev/null +++ b/docs/function/index.html @@ -0,0 +1,157 @@ + + + + + + Function | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    Function

    +
    + + + + + + + + + +
    Static Public Summary
    + public + + + + + +
    +

    + StreamHelper(chai: object) +

    +
    +
    + + +

    this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

    +
    +
    +
    + + +
    +
    +

    Static Public

    + +
    +

    + public + + + + + StreamHelper(chai: object) + + + + source + +

    + +
    import StreamHelper from 'expect-stream/src/StreamHelper.js'
    + + +

    this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

    +

    produce: sets the expected value of the stream +on: gives a set of input values, if testing + a transformer +notify: cb for error and done notifications

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    chaiobject

    to be extended

    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + diff --git a/docs/identifiers.html b/docs/identifiers.html new file mode 100644 index 0000000..53cb573 --- /dev/null +++ b/docs/identifiers.html @@ -0,0 +1,153 @@ + + + + + + Index | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    References

    +

    Class Summary

    + + + + + + + + + + + + + + +
    Static Public Class Summary
    + public + + + + + +
    +

    + AssertStream +

    +
    +
    + + +

    this stream is used to be piped into.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + Expected +

    +
    +
    + + + +
    +
    + + +
    +
    + +

    Function Summary

    + + + + + + + + + +
    Static Public Function Summary
    + public + + + + + +
    +

    + StreamHelper(chai: object) +

    +
    +
    + + +

    this function adds the new methods to the Assertion +chain, where they have the following responsibilities:

    +
    +
    +
    + + +
    +
    + + + +
    + + + + + + + + + + + + diff --git a/docs/image/badge.svg b/docs/image/badge.svg new file mode 100644 index 0000000..324db4c --- /dev/null +++ b/docs/image/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + @ratio@ + @ratio@ + + diff --git a/docs/image/github.png b/docs/image/github.png new file mode 100644 index 0000000000000000000000000000000000000000..ea6ff545a246caa64074ba809bbc86fcb8589071 GIT binary patch literal 4268 zcmaJ_c|25m+@2YcEGe=tO+zT_42H4qTL_VT8D=nHX3PwRki9HfBH7BIQ7JCj_beeI z(PA%IQuZumf5*MI`@VnN`<~A^=eL~adA{p8f1EgTGXqv8J|+MFz-nZuYe^f)M;9Xl z?T$df2WbN@Nzaya1?NEuL=w;dEfmfT4L0&cdZI1SNK}yDE3_&AKqrE+vL)G?nkc*D ze5H{`7-_OEp2h|MR5i$Wq`Nno1a?DvVz6qEm4+4w7=u!S*eICFn&NfPUKqn*0{Tj@ znU#C6w>ts_(NG7gl9g!!zGxB>O!oD`5|znnkUw>mY4f9P83_1K2+3Ow@|RP#rsiNB z903hhkd~8jmxV&XaJV#7UI7k=N`hgsP?(G??SxA~<&_oS$}mOn-v@+djezn{w$#=C z+ZJu52Js@1@X9hWfq{Y2fpXF~f~O1=fj}H-z+h4|gcLCdOG1*RuteeC3c6^bI{||y zVQ^URks{I!=TB0D&^-Ms1Yi6=vRLBZX`&@ehK$6^K&54mLi!CfHU0mgzP|sUi6l$( z|N8r{!bGbeJX*#QO~m;V+-ZgL5I!=6SJok*kt7_!3WxLgokepm90^DC!r{R>SKwfA zQ=~fvd$e)kPllD+ zRvxaUgpifj{ms?Ix%>N~v83Nz6pahhl84G`Y3tCq(0}C~HG?mnW?2_azyzRC`UIRW z_|Kq~G5_t0?0@_67Z>#}zWf~rt)x_q6t=RejnvErW>9V+3xJmC z`WZuvjAn72w+0gZ!c zA#ROc&m%S~RCo}xuD5jUEbXg(tZCM@w!T|#S$ju3+PKnZvOq!Te!k1i>ZlAY2d$hq zcr3hl)6*dTc>dY=Qd5hg9F-3ZJx12?th3 zY?KG;EA_?MEA`bUgvx84mEd_1K6WD6Zh&~3v&UiJT=<@uGaZ9%(IN9U?-o?uhZNz# z0#o|=;zl}_TF1jsmf+jyEQ<#bNr0KCAUYnr%4g{D(N{m#MffRnz-^cE<1DqGVEx5r zS9<&IEpl`xM442IxYkCk*}6`7oUa@Kl_Om(Wi)GrS2ItP;Ou5QroVSmsVXN0)hk8e z;lQ7wszq5KKkzMEul9)W#^WhAdM9n0$1xd~J`)gN+?&lyrT2u#TL&e_WNZu=06!YS z_X6e%y?CXFn(qe)=6ByvLZ1sdi9L_*4O%9s*q`)g@<+ngXLPynb=p>5ndD-SPd(4C`aTbdZ?bxKHELC zZeth7;3PqZD?s#@He`g7m$B$qvPY*AnR5l@#vg7e+&xsaNZJ7s<$W$OK|T@wSM zh`E>hGt7-jtmLJrt}Ivhf&`2+J~l%A7}}Xca7jJxI^wvclcjQLM5Eta<3kf9Toscy z2I56cmFzMI1s+2ser!B|B({ns8CaFV`-AdpPxNlkWi`M4xfYlJ>bcQa_Db9t&LAY; zx^2E~@4$Karl&<}9jvxNSjTQMt#zzn;Qqi*Jw&F8Na(c1_Jsc6N8&(xJElah#X~^m zO$FtV=RBR5){5SC5(*jhk?uKK7`fi`Y}eJ#ci%vh-fi6~JE0;=vP_jpjlbT?{#e-Q zg~+X2Dcc7K^U`4_pWG;HNCdX~rJUssvKg;+f3y~ob_om7(fWQVrk~|8c+5Oyh)!0u zH&@f%C3-|i_!B$Ex|tDNvP7;t@z^Uj(%<;2W8RZEAuh0EPbru^)k9_D$^x*({E+n& z{y0*heI0x$J9Uj|T}LA6SZHS^U1@BX{##YX50iv${&P>g_W{k;`KLa}>>L)9+be$H za1Hq$db|JP;I|C#s!D6abpfQ!SMEJxNrX5Po=~2~$zN$@d{C4ae%`0;u5lJIc<5zV zW0x;w_KUnGPtktlP2P#J6QNQr*8K9PVlhCrtEJW_VcAdqvfOn2!G(Z&x2T5n3f@d6yv9qGdpFIWgxra94$P&Yhsnc!#t)-Gv2pxFx>U@5&M# z7#U*2+|*`pSdAT(GQiPE$Ex`}N+I!wwb~zatxGDuvCL1$dV-cI>A&21r3eoG;Lk8> zhmAcpb*$KgS=PzD#t!=+rn>kYXx#YR)Dn+tD7G%>f%NHRvzUhtr}1(z(HiB$A-%vD z`5X-Jp!>%UspC}u?_WmmD;h%*I*Zz09eZ~A{G;;OSqJ&?c>WA=&gyqG%p)(6V*26E z{`k1QNoE~O9dKi0)Wme|c} zpD9V60svR6jT^^lPq@XY4fnzWFP@(qA|#AoRZ#%ui7nS&g(Xw!JO=DIRz0X4b&exr zkY`td`J1Q{ea9M&%2%T#Ta;&a<1sj6L)n2PV_y7NO8EsgholQRo&m^2^@skl2bJt` zu{-&e43fXh6JRAQ*3k{gK53WkKIN2vD)Z{THopDGy|Ji5&I%H;Ecs!{lt{IB9_h<_F@CJB{)}FVpTFvK zXP(=eD=e5uI3>NH`X-wAtvibZtmZ?rL z7wsuLRIVuCeEjQ}R}+ZAfvu;^h{(w;f2~*YCtDTpuuti0eA}tHeTR8%o~dzA^q5{z zUQNy_)>BQCr4&n zY9ifZI%XxIcTU~-B#>+|02RG{!zI=^*x31j0>MV-*^bTh_(BK8Ju&5MRoaw8+1sG1 zL%CEWY*}Ha7nicSa&3PfVrP_f!DVI}!S&!{Ym;aR{feM{vMO6NOZr%GWB(&Z`wMOR z#)*@43&=FFCXmN^kEWAz)MHgZ6DzNPf8RC_rbOG((u3cI+!P)?mdoPYwy+W=xS^mz zfWC?vOdizPc*paTy;7&k%4PvouNbGIDHnoj<91_&*-aZqO)}LOa&*pZeF>N7l>Pz< zd;rv0z9>AUFFFYW!822_#dpkxb^lmTJyFw~@j`t0>4*7~9p0D`MHX1=O>e$JdK(YU zaj~=9#M%X_gvkYeC*Lkko|dT;vWBG#k0&O6W2g6_Mv4}FWx^J#7cBEjg3w2YH@g)Q zuPcXBzOk0d9;`^u*e`sV2s~bPHkR-tDYRo6Xua4hTUwLG+tvh)QIX*oR|Y1Ov28Zk zylyfJyrpjDH=Jjhz5$=Jg(|PB@fV!q?btPZ{rS$TKfdo!+1YTi23~<47U94_5&pH} znfUigS(B@ik&Xh(E?Ua@PItu=bDG)ZUT{R;eznP5G{Em}%@vdRrM`+tN6I(JQMxzt zzG?+!S4Ta~BX5?vtMn^pahCg%YIEzN%1z!wZj%6cu}N6lF1c=c&0t!fJ{z?E+8|pX ztL03D#Wef7T$WgBgBg5GX1JT$UHCk!=iSaW`dgj`dWdyaEzWVS!D%kH>i&#|Y?8|9 z-4$lE_MykI*a<$47lk7Bjbdv}w_`*zdXZuGN3Iu`_YOWZs2xJ(qa;J)R&SUlR@|sR zt8oL;Vk6BgD)ama+gNdT3rq5$E=wTS_vPNL5v7O8(WRT)ia$MvhreFxtoojl@A>L* z?V3N9{Or`QzB8zrK~Wzy9(B6iNvvA2IDC!4FDT_F{|-W_zsO%Zd!zcZU$$SrY)QbT z+}KQlk=a`^_W*hzPZ#yMhjHq8PQ9i6db5c4WxBN_N7p?>>OOl+NcT)WrFk4NdiE{l z;%pD)D#!i39~nk@^PUQri!2Iu0oQ(*7KqFFs)#t$B7j`oGM}O2VyLY`9N-5vh@n;< zRNIc6&UJhY@?%IVdD-=xjGWJqn^0=jZBU)tv{v1U7ED&2v5=oi(iJ2&r=CAe0V;*$ zW$8S9fv(wveNqLlBQuhxlIr{{L<<*+21HMjNzwF5+p`Q`+5~JF9k>|vUCpaTL{(Py zw>le+8;vV|Ci0p)i8;A|+2>n*&Llb{e1az3q!#5`h2t?5>RN5A0%e*-$ySQrj$M&HIK~a9W)6d?W8J*D|_Nsk$ zGP@D92-<(_m%Dt`w&=aK1L=et-x-8!#A~nMjd>p5y_E~xqvBa(g-xz$rbrZzJy}@V zMDqqtV5Q@0Jnd^ZegdA!J_j+KUwf*Q89r!GpX^tCjM-_vCiKDr%LHG*Tq?b|4*FY1 zr|I5VzQbkN?NfI!QSV9w{6i7N+PZuZNn#B7s)KDhPO1TQJe zZL1UgBIOOdRP;I*>7?O<3ezgLDn5OQ67L#>r1#{bKe8hz0Pg XLyRvu{aX3a{{tgEGu={c*U0|?Dtn-9 literal 0 HcmV?d00001 diff --git a/docs/image/search.png b/docs/image/search.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d84b697dad0c856a822c2df0a0da46ee3e9be3 GIT binary patch literal 12704 zcmaKTWn9x?_ct&$YBY?JE+wS96+raD)ZuW1T?Qn3UDI*M)-R57?D8{(G_ySR4Gggm^{a$ULZ`#Vl zSlI`9mR!860V&>^<>UGzD;4vViC})Ksa(fDL<)3`tNaT<{#2fw6lCrH>lD%OOh1aR z{Ml3g&0cbLo?W29O1rl;uYT|AlgnY5Wtk1R4fA56Y@{{Pk0y=hB9{g+(RJ5@-qNKjvOa^8CutOT_;keeKu@ z_jbkrr}T`M16BPOI@rG9dBd#DW>VRJ{#&#a8mSRjo@tTgVYnW?I9&fK^9LShqHR~{ z$R8L1OsSy~UIrW)mz5GLf*fiZIk{GSRhg^GGSMTs5zUk{PaJsQ(w^F#!a7XW=3U4z z4AJNt+u{kXwD)tMoSOx<=h4l5%wHVe@dVNP&MLuWh1Nm$=FKKwST}t}sBfyOa%w{a zt*5?f$bHex6HV#uP?MDB799wW=oz*W;m{eUa$fY6N&MX(9$!b-Ay}kWEZ1M{-ZfZj ztfc=7_nOtZen*(ef%;30)NJ++p(aumNd_c-=ORnXHxYRM-9%7MW`)tAhQMZFkn_GZc{UxHU(d&vI}-CD{u{JKt_sfMQ2f+e~1PX}g) z=yU{p!`wmdNnG#vywP9q0H0o*oEwx2n(2G_J-osbVltnfT=GJ4pl|k=v()=_&RSY5 zR5mY`_i4<2oKA25su*5#9{k+=oTsJ)aB`bWEi5aGb`j9x9uQm2mGv-ua!l-*Jvw3* z1X?C5dRE~*EjdJM^sBnO`TZP9lzJ5Hh&U~3?Y^W>OGkIyXRgjLjt`qEOIMvw zycfYPd#0*UcinQ^hHp&Er~`K?PP!Q9A~D(l>taQ51Sf4Bs~ex6{sATF%hoJkF>h(E zE_ybPL1AYGC|*@LRw>52Dk(-e3ywR;nB9?*362NUnTeko2S-rqnX1Z5DDG|`si(nI zrsM^8EfpT&5bu|0HkTVsJmagd1P@u}avO(Ek;zcy^VBCsU9!U`GR!yY4wWC8emffV zYafJtq~HooGv@!Utu_nFlx!q^>QKY1*1BJ`&_mJVb8v@TUtd?)o~d?o zuYZ{K1mtW53*8t^9!?W%XEb^BK)VaL>P@Za7JeS@Zk$t5s&dY#hc=H!vsn5wx0su> zzFWJhGVJaifQ5i{F;t#&p+FKf2Rpk|Wi1VMwqlA;+f?!f->oRRnnMCfYTVwsxh=mk zGYfnK6b@wrD2gg0<5VQ~T1inT)E#5^^SYK7(cekWU4a%9U9N=7inEQtSKfgZKS0FE%iFV;^>)0OMy$LK|I|vXh zhzS`bUcxGt*WTX#XN1@~M{>JivVMc5%K8~u&7`NN=j1n&`t`(D?vw;ry2`WoLc6zD z`&~@73ej4wk^1A^P?oyR-I}Y?3d71vQpNV30bCc!{E!+#^UF`%n)d9;{`8N0K3}+! z{KO;7*YfdoKKVPv6jH=5&Gju4%!PtYg-Ut-o%~i*RCI+&>0W-c$-}Edj*9+{6TZ*3 z&VKu5rpiobW@cu%fZ%Qb<_G#l1ON2tQ_izw9>GUyXB16%C+5QRY;_%+vn)!Uo4Qle zm8Pa($%xU%2$)M~dQ8=}5BobMWi=lI!t2sLRoeho<@2EUsy$-ZUtK`F@_;fc=o_Vc zd|ME$zGmJZg*L?{Qgp?_@1B&jHTtPQ3D{o~ZU*`k+}}VQmWysauEfuUBkJ}JaD_0x z;g76ITZ75>bgT^0qs|Gl*|kZCet^Svwfbq2uSD1m@EB*(YxH(fr1b+rx*na|A2ht3 z(6-UF;Vtmsi=(;=XNXMVz|GB$jNf}^>p9W0Bd_nQ-ggGVcb8em><`TyD-)-f?Bmf^y4J)XZpWkt?yEJIHL;|^ zqGfuKDhYtv#8n|%1QRHJ;L~VC2RW)^T7L&lgr}rQ%eva#_&DINL&vu`Fd?8^On$5T z!#$Zpi?OGWF|$($sMo<*n?sZ%?@a zE$BdYA)$SKo4)u92}8@3c8QmMgRgZ%9H1>0KHNN1Gwh>rKZ=tE7VU8|mmX@p%rh}D zxhR~stA}GmDK_Qd7e^Zwao_eNV$Glc;j}d>YAPlw&e{(vL82c803mkJIEWzMrypc0 zfp&ETz5!5r#QPRjjS?dRgGPRN!-*Hw^n_eJVY7>oNwbwSa@7ltI;~WkRQyz8r^Zh- zL#+{KU>#98B1=z`!%)$zldOK6y{%m2Hiu@$R_2D>^XR}4%%31FTUe-d=>uXgf`jg9 z4D-^27{Vl${W5K3@Xfb{@V>t6(OAGEIq`)Fe}Z`9HT>G#2SbS1!0#RKEKf@m$i+fR%YM7?i7qaDm~gM-c1?+)uTau(h;h~V$@ z12S1=(pY?7?|3I}iuh;0F%;}Pr>BW|9ukd8i;az4tm&=(!O0vzSG4zHQg9yZ zoSr>sdsyb7_kdtohdY=DMaTrmBg_+6%FNEb0^#qArBPq9FwRe8u%4R2Kd+F^&K349 zX~6-uvg>k7M63fZ{^lEm4pY-(kQZ3TvGrPYlG?A5Z_*1HCouf5daZqluY{wIElxIU zSH^jJG<7a=QMF>l%yHSdQ`I*HZnB!{M?2$Ev_qK`1=*Dq5bslHgutrLBu!f z!c5OzwFFQjb7nZ)-aYwi0^ecQup3fom_0zu+SF-X2!mqubfL?P$t%0DL>M5GrSuBf zr_ON~s%6hXi2d046z zJ|L$SM7XmYfw9YY0}%FMpSUX8ZRP@>Jh!aTAHj@MzPzIgbts?R1>FKO%sG<7FX*h; zIIfrbJ<}XtQAl!TJGKSg;i{YnW2hPv?k;coB8@U!I)rQkw zl5ly$AeqKlo6qp!&#cez)wXXL$wqG%D*EWRq8_|MW`u3=^SUFiEN+5cUM9ZI;I_xD zrq50TvZU16Nqzf5Am}c%;ZIm_Q8F5ejENH2zP-x`ouSF0CphWJw)JP;0{>s?+{^tcB z4xW3<n?TI268$OEjv^(LV{gTY{{8e~Ct41a%03AJRl?|+|V8n3x zv<$)A1zwYER6%xBtf<0&(nRQj2mwzod-b6Yz3x4|LGWuZx5-@PQ zr0R1J=;^jEi6~)$d3-Vmh}VX2!EsIJJ=@9n)jHyMeHi|J zMe#NX$-*uoPSkv~MZZ#QQ*sDen^VVklQ(sef z7gvw+Yh=$Qj*nC4tIt-sNP$a}fKU#GW`F;0=Z^w7IuDw7Hi|X1G@a#yLL9ONu#3a= z$Q>oYXYpw-4Gfsa<3-|UdwExx)|x6lxU4NO5V`3hd&KIgJ-BlUr$pn4tNuK~dDS6i z8-1=8@P)Rpx2dfKI@jP=9TBNY6-)LY z<%0@q6{8Dry;g5WLn}?2n=-V5=xgECRGTy40r&8UNZ5ldi256EHr*- z?#R_gJ7jhvaFAiYH5)_v1M|~ssE92}zKw{G9YhO#FD27C+YwKw-OsFL7lgvlAp~Bb zQT@poizbi)Y+~Z!so;Bm^!hQiycXhK0)MqYNaZ>?w8_TPt({RBf0Y=ps((<)AJO_U zy0^0dH$B!ygqUHI7n%Vx32iW+Vzic@E(f_qSTJ{wW=n*Wh0llzD;WU@zD3E8umDT(y2YHDiA?5s=1JrKlS zmw7(@)(Mc+Qj0tM1Zmpj{A=pzR`rA}4P%e&b7=JUKBnV?+^BYn$#D7}P! z>S9RFSo=%j#TI76+ zJ7)F1agox(sZP(pbW}Bd%lIKN%ZrO_afYyT#I+$ci}k?=T$j%2X$ag#F@W2GMn0oz zU7@I@`n~H&mV{e4ig~5MI6zR*$hIS^sUVt~zu=f~DM#jgpOvS^#5>)2gliNncp_RA zi&^7P2G`F_KS~zjfmK?DloQcw>+9uzf3D{J7w$*Eh*zVIaetEi zjYtSnX3F(~T1nD+Z2i59OSf7+ft7wDdWC0KLggh(rS`(`+izuMXcE7oB%1@pgVuBN zxR|WDaEP`uVvG|iY#R!(akr}^NP8#y5x)Y?$v}OG}|Dh(8H7cXZ^2rVG4HyH`DUHqP_K#rTonNVM?Byrd+L2p-8-uU_4U zX5Cxmgt&ChOiKoMMl>1}lQT&=r$Dydm%sS-M3SmEpxMcS87P)D!RMwX0Rf*53e5VwKlA$<$2}XGi-f$2?+e*d+sYD!PpH*D!#og!>0Oqj zka&E>dG6A~o&3lmK7QQ1DgyX=5#@+{bPp+9AOMs^_m0-9PK(N$I^_hUkqz3hSUzkIhCj5JUuf)@|>pjFv1;l|5RXPf9N|a6KhKB!no&_dXQL^3|FOGQltKS-I zr5y0Ea|X`{ds24{sk9$Hxyh8u^FAD%uRQX-s|tX*fU3&p(ESki$x%+|$jFGlcxK!c zwArcqvA~iTY)5)9v ziv^!%KfMOCyd?%Ggwo-*8~2}o^Tav0riU*Ax`p!-+f ztCqDP-?<_fhGwrc+VFhs+vRb0bEZ?Da9uOU*-4Y{SZ`so$dS>X zvNbUJRtNtWjS4Cn(~9wm@lBYG9y9|L5$C-OAb9MEoIZI^#Uyi)*A!>mu%&rw1i9Zck3mV)@DU<12 zto>MgY-g#9G_AKEVIA{YSUSUhzI*^37xhfHf7`7pfF;{W$r{+EJ|h+5660Z37Tu=_ z0@1>sepfo7QZBdS^f&H!GsdwL_AK>jI*Kko+U@nj>D|?r{Y~?Ib#V5_tHev?1{FbJ z{DpJP(kr*REarIiloKqG&`RSgU}c+pEnCX$d9x-7fO!B*UI+ zv?i9An7BN|V^q&!MAA51@Oc2c;+V5OSBXL8O?MUSB@*DiB zIr2AsZ{#F<2fNs`JF9N&V&H}SBhJol#f3!LNU}vpO|IhvnOi0(?UtvsZJ~R-B zgJ)$syj-a`QxB1K1#nmCL!)y!TS$F^IC zBRUs&13r|;h{OHa{Px8r-m6-5^FFiZwT=?}YOK+Mw@?0M(-&2n#rTPM92<-I(9qHO zu(jN2B>+WW(VHv#uF>X9s{2#)Q64_T-~k1>tv<$#UuKRHPxfD^3EU_>KvI*jv7G3a zYTsz$U!?N5@y2dQwv(Xqf$ zb@D?Oa$vj9ekaUVt8@%!Pc()a%^d5mV@Lm^h4}N&I~|a_*~NiF??Sx+(w&#zCwzEdS9~wq@FnAWVSW1|1xUJ9 z7=`Z&8HneW!GfRN`>w~Qf3y5!X5Pc#FX21}NT$#&mi|$NdkK*qni@~>WEqOmKkOQM zx(!?Pi)gj~qNAXpox+CYKG=9fswY2~W1$R(R-Q1{9HZzC4B^M7M@>xj29h`})B&wy zv@dZXp%3@|Z#JmHn^ak7^MR01m!A12Qr0v-y-sesI)A4YPBTjR70Z?G2z^@`@=T-y zctbTUGRbRPvhYAD)-K#T!xd$DF4FOaQPrG>BABG}y&wyyVgj>#-wz}=I)$VDyOo?n z&qkOPQ1BRR{prNkr-4%?LbSb228ypW;#0w7Wu@nmp)gB{>y`b6lGQi-IsJT>p zd?27jncg5HVp!;NuKd5-j8=Yq`pVyQ<-pVm{7-b&svze?Fy~ z0SdiS+V2`IaMgA4B1W(UIMgUaxiFX1J3rQ&ODEFlIsP<{PV}AKLzbK>P(NtlF4KSD zry{anV?G1aasTlzMUE{&xy`yO36WLrvv2z|CRW@)s;~S3{f?QvIWhj_6COGz+UICR z^riDXx%2w>p!a{QKyDsNW7u~30D78ey+OWmG1 zahql0m=l7FDO%?Bs%<^XX9U0l&&>@q$Btr6(uYs9F!;P}FZkVU0$PVN67G|&P7scL zjly9;Y=mIl^8ZV;f~0prr6XAA$Mz4}85&OiSEkhpU*t6O%O(TbR0l|YIz0a~D5ejZ zi2M2+kCI~wtVs5lFdO3wxyyfS=ndgSI;`m{qnoW-biv6w_uk8VV2E5kJdnY?+qlF_ zNtL#O6>Wq|u%ZrLVg85|7yj-~td8?+3=mH+ND5J=FW3Y=^0!Vcxqf2;ceF)5moL5C zUg?RtW2j56J@~M(Z;NmTozrJo6O>$qR902(f!mzL#-8~1Ctey8Fc49L=_v0EfaYoKHUQVF@ArA&DYRL=8=<{MpV@8}pnr3P{;vE{+ zx63E#>FQ#{tNa4MBZXqVukO=J$7*5hjN6DRJnonjO8Lib6d0-M^+olw(I@m_#UIvx4-2wEH=(O_L#B6%z{m2_A}7YoH@t@*)~t`?)9C2v zN>`YNtC64&ho>H2D3LsFk9%%nQ+HNR4|0$ecE^;Y?->I4DpcLVE$YFN>Vlq_D*^#o z|9tuJuaGY&L_CH33jW!Nt=)3MY<%#qW|X3#0W;%@xpTeWz67#57#BvPkO=3Zqje4@ z?c`S|?=G{R@_s91SKHZX-qzw&J2&KRi$8&B7qJffD#(7*MMCXpBrYi#)Lv4u9%fF4 zo@p-8&gJ7cH)_dXpib;KZwwBdaCY|j947~PJ%j63*50BP3u;Ya_-C`8feR1TF=eusR?=)c)HW)h7v;Lndw1a~Z znfg!lK5TvR@)4J>>Ht@p2c=(mW#w++-@kvU2UC>CG$REa`im-e`gbG7hlYm8b5kw% zOr{C(&E;<*70B@98+3K$j{!UdG6@2^fa`^LR@sQ>9QO|w9CL;61bWIJ7cRbIt z8VI|w_1e($strnQ2G{^I@>F_B+o;iNdm2)@rYe_MM3+G8a~ARZ7+d09`iSt15&-w3 z5^MvK{m+iXyg;M6WEyHwzpf=R_D1vkV#YKJHlJ*KAL+27Qm6n{>*x;f3DmO%kRP#F zuo~VAc=CIeq|hI1Hj^N&us2W<#s|uIG{&SHvn|)n;b%n&U&49T^D?dd02M~j$%o(LaX!#3d9tJOP|8oji^l;B?+RO=Ba}V22b_bZuXk%~Z;=IlBR_ zAePIadw-{GSufs^L}jn(9xvF6`I$7uumFYH@_+A{{Y%*$%5#vxfvZ0Mnj|vHTJECQ zQln1oE(cfwZt2Wp8|?nYoxj_?f@u`?%^Z_A^)RpF(`DYT#}AK;bP#n*F>pXhWAk8^ zt)M#{MB0Y6!DHP$2InZfz4rTO!o9m@*TFTdt-h$slkGL&&%%p;x8AWgjh2K=7XwdB z&0}=e5vI$Wrp4x#m?C~)hzVEkU%SgF)>CTLJ^ihFkrH;$LAq?ZM*V0y(rg3cOSKUk zfUPPfOW)Znymv~oxi}*NU>V~?g0NcjW##>bb#*9@_ZiXMZo3YHH&v;N#B5n<2G(WItdU&dH=i`0=5^b);) zWC1Pxs>t`bQ=33Xhyt;>XTC>uAhs_h;P~smTXI2<|BX)?G>Q`iGV+&pn!fKx19$JU z-u%`_xEe9aP>HZ~!BWzvpb1AS0E}P6g>EQ}=sAsYVV9LXT-BbZM-%{oLdvC%lvvs@ z6-0TU9il9q=3*#bC-p4_RslLc?In<+qjPh7LbMwe2r#}Nb}I}3o4V>ze*S#KS0I_S z+$Zq7$N8`k{{eRD&&_wSA9iS1>*($ymK3bUcVanTi4g+mTME#m-HFReKz6K}yE=Yc z;@RMk?ldC!9KP!@U`+q%U=fikDGKvBy(QTD?KS@@OF~4hbOW-^ZZysiP7EqZOBiU)4~k2ZOG$44Vi4yvSbzH#9fj4ZWjIkVH9QwZy>8 zf}bw{n3|fZ<{X~S-tm=RQUbyMec#|9+vk4t#+3xbNvbvoe(c&OHrZF-?9n~sO5aq{ zW}F+7AoLp%SUCg;!C4>g0fgX~N7VRkF7F%;HreRi|M9H?P4aTIL`P95JY*MfK4!nN+l-dGOT+LirWWqu1|nJ#8S`Xfl_g1m$|A3(!udzK#!BGyN;g>q!Q9C@Cg1kP+6_0+t*Pb0B* zGO6~XKE_(4=cdpeC;1af?>HVDa=@wn;o3yt4?K!4j$w~n0dRG;@0N{)CoZn8doG&~ zX~Xj<9uq3t2ThDfEngpE3*I0&G?yWdU7PENCB0<{9eDriWNekoD{LlDNVg9s&?YjS zxL#h01}r=wh8h_d=!ZZcol$!8i-BY0x`8H<-S2omhRj7`hQ&O_+_f9bh5oTs3WQjDiT9z3CRk*I^!7jFB6g^Hn)&G z&joW~?T`@er<8km$SZ4K-;0C}_xsQeEle_)3yGZ}s>4$h$0B@hA$($UA?j-`z%#62 z()?5dBkPC5{q?+1*8SM0nuBoMwS*OwE+^8%GiscF)oq2QgqAK_sFvkm&E7i#TyrBM zqpt;D&|7D;l#JLTbvlw=sl#dHPl7m<^|3I1>x8DQ(E_&(+}WsAof!Q?7gQrZwq{)W znJmG1wDA{M0%bf~Sy?$F)+06@h+mb8Ywstk5Y~9eb2KKJ+sV$?!+^GVb9pa1B+idG zPqB+4i5nY@P0Ab!19ftB2nTqu#@P=ZLo}fN0P1(G!j*;+x zqJxJetputfNtVb}DX6d;kg|-SKCu%oLQim=$Qb}RbyQ_NrVpSYhp3^R0jzF>tMfmj zfqe@6WMTlC4rRCwk|f;QPy_VOvM&oG?z?b`$p_0gxY!o3V&{WAp_k+!K{7pzd~rrZ za>zNB!PWPF`Y53d@u3@_B!MvSmmw@w1JLjMd~99h6g!Fy5c2PWQtm4Cm?&8DI_P8Wc?={EC<|j{rrKcswfGg=0y7neDnOsug<+#C z+<)WVFXygcu>gL|Tu!T@ZO%K0O#eH3E%lgh9Lh40}t?f*`y9eOD&)}tArkf({2#qw-# zkyqHo&P7{WTT=B8gfQQc8K=*M?&0eerZ8%uQVl6F_)CUA7q$pX5ai)&X>NZ0?G1_! zr73$Xy}@u`#yXX8ERl5+?r_%z%hUNFh&dFxqF0*>a#&hv$N;n z@-nMDEW~-)&UFH!mePQKjfA*kS4EYio;f-}dEZV;8DdlBw9=@qQecD%!pTuTOSFcIc&hy{iZ!&NJ1j z!^-~vu(r0AEK+VtymG~;m9p`^+S`$@_qm$s9re6q%0W9el!+Vgk`@&Db#%+LSA9J+ Vu(5TF{pSVFvnSfBRgWw~{|7^yU3&lk literal 0 HcmV?d00001 diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..355baae --- /dev/null +++ b/docs/index.html @@ -0,0 +1,264 @@ + + + + + + API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    CoreAssert

    +

    Testing stuff sucks and testing more esoteric stuff sucks harder. So we build this extension to chai to reduce the suck-factor of comparing images and testing node streams. +Now, let's forget about all the drama and call it a victory:

    +

    victory

    +

    API

    +

    As this module extends chai most of the documentation can be found at their website. CoreAssert extends it with new methods for asserting streams asynchronously and also ships some assertions for image comparison:

    +

    Streams

    +
    .produce
    +

    This method takes either one or multiple values, which are expected to be the only outputs produced by the stream under test or a function that takes the value and checks if it is the expected one. In the latter case, there are three values your callback should return to signal its state:

    +
      +
    • If the function returns 0, the input value is not the expected value, but does not represent an error case either. The test will go on (or timeout).

      +
    • +
    • If the function returns 1, it's the signal that the correct value has finally arrived. The assertion will notify the test, that it is successful.

      +
    • +
    • If the function returns -1, it signals that the given input value is erroneous. We will be notified of the error via notify.

      +
    • +
    +
    .eventually
    +

    This property allows CoreAssert to ignore mismatches until the correct values are produced.

    +

    .exactly

    +

    Using this chainable method will adjust the assertion configuration to strict equality. Otherwise CoreAssert validates, if the produced output contains the expected value.

    +
    .filter
    +

    This method accepts a function, that can be used to ignore some outputs, which is signalled by returning false in this callback.

    +
    .on
    +

    This method takes the values the stream under test should use to produce its output, if it isn't only a readable stream.

    +
    .notify
    +

    This method is used to notify the testrunner if an error occurs or if the streams ended and have produced the expected message

    +
    .tap
    +

    With this method you can tap into the stream under test and inspect whats going on, if an error happens

    +

    Image Comparison

    +
    .image
    +

    This function expects the value to be the buffer of the reference image you are testing against.

    +
    .part
    +

    In conjunction with the previous method this method enables you to ignore several regions of both images, when comparing them. See ImageComparer if you like to get to know more about regions.

    +

    Usage

    +

    Testing Streams

    +

    Suppose we have a transform stream, that adds a Mr. to the start of every value, that enters it:

    +
    // src/Misterizer
    +import { Transform } from "stream";
    +
    +export default class Misterizer extends Transform {
    +    _transform(name, enc, cb) {
    +        this.push(`Mr. ${name}`);
    +        cb();
    +    }
    +}
    +
    +

    Now we'd like to test it, using mocha with CoreAssert:

    +
    // src/__tests__/MisterizerTest
    +import { expect } from "core-assert";
    +import Misterizer from "../Misterizer"
    +
    +describe("MisterizerTest", function() {
    +    // this test passes
    +    it("Misterizes Circle", function(done) {
    +        expect(new Misterizer())
    +            .to.exactly.produce("Mr. Circle")
    +            .on("Circle")
    +            .notify(done);
    +    });
    +
    +    // this test will trigger a timeout
    +    it("Misterizes Square", function(done) {
    +        expect(new Misterizer())
    +            .to.eventually.produce("Mr. Circle")
    +            .on("Square")
    +            .tap(::console.log) // will print "Square, 0)"
    +            .notify(done);
    +    });
    +});
    +
    +

    But the mighty power of CoreAssert offers much more functionality, which will be presented by FunnyBot:

    +
    // src/FunnyBot
    +import { Readable } from "stream";
    +
    +export default class FunnyBot extends Readable {
    +    constructor(jokes) {
    +        super({ objectMode: true });
    +
    +        this.jokes = jokes;
    +    }
    +
    +    _read() {
    +        return this.push(this.jokes.shift());
    +    }
    +}
    +
    +

    All that is missing now are some funny jokes:

    +
    // src/__tests__/FunnyBotTest
    +import { expect } from "@circle/core-assert";
    +import FunnyBot from "../FunnyBot";
    +
    +describe("FunnyBot", function() {
    +    it("tells multiple really funny jokes", function() {
    +        expect(new FunnyBot([{
    +            date: Date.now(),
    +            joke: "Hello, I am FunnyBot!"
    +        }, {
    +            date: Date.now(),
    +            joke: "I am not a joke"
    +        }, {
    +            date: Date.now(),
    +            joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts"
    +        }]).filter(x => x.joke !== "I am not a joke").to.produce([{
    +            joke: "Hello, I am FunnyBot!" 
    +        }, {
    +            joke: "What do you see when the Pillsbury Dough Boy bends over? Dough nuts"
    +        }]).notify(done);
    +    });
    +
    +    it("thinks about complex problems", function() {
    +        expect(new FunnyBot([{
    +            date: Date.now(),
    +            joke: "Hello, I am FunnyBot!"
    +        }, {
    +            date: Date.now(),
    +            joke: "I am not a joke"
    +        }, {
    +            date: Date.now(),
    +            joke: "The line is an imaginary invention of imperfect biological life forms."
    +        }]).to.eventually.produce([{
    +            joke: "Hello, I am FunnyBot!" 
    +        }, {
    +            joke: "The line is an imaginary invention of imperfect biological life forms."
    +        }]).notify(done);
    +    });
    +
    +    it("writes up some new material", function() {
    +        expect(new FunnyBot([{
    +            firstTry: "Error. Error. Banal."
    +        }, {
    +            secondTry: "That has been done before."
    +        }, {
    +            lastTry: "Funnybot is now finished with final joke."
    +        }]).to.produce.exactly([{
    +            firstTry: "Error. Error. Banal."
    +        }, {
    +            secondTry: "That has been done before."
    +        }, {
    +            lastTry: "Funnybot is now finished with final joke."
    +        }]).notify(done);    
    +    });
    +});
    +
    +

    Testing Images

    +

    Using mocha with CoreAssert for image comparison results in the following:

    +
    // src/__tests__/ImageComparerTest
    +import { expect } from "core-assert";
    +import Q from "q";
    +import fs from "fs";
    +
    +describe("ImageComparerTest", function() {
    +    // this test results in a full comparison of given image buffers
    +    it("ImageComparer (no regions)", async function(done) {
    +        try {
    +            const image     = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/image.png"));
    +            const reference = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/reference.png"));
    +
    +            expect(image).to.be.image(reference);
    +            done();
    +        } catch(e) {
    +            done(e);
    +        }
    +    });
    +
    +    // this test results in a comparison of given image buffers with suppressed regions
    +    it("ImageComparer (with regions)", async function(done) {
    +        try {
    +            const image     = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/image.png"));
    +            const reference = await Q.nfcall(fs.readFile, path.join(__dirname, "./images/reference.png"));
    +            const regions   = [{
    +                absolute: {
    +                    x:      10,
    +                    y:      10,
    +                    height: 5,
    +                    width:  5
    +                },
    +                relative: {
    +                    x:      10,
    +                    y:      10,
    +                    height: 5,
    +                    width:  5
    +                },
    +                precision: 100
    +            }];
    +
    +            expect(image).to.be.part(regions).of.image(reference);
    +
    +            done();
    +        } catch(e) {
    +            done(e);
    +        }
    +    });
    +});
    +
    +

    Testing

    +

    CoreAssert is tested with mocha by executing make test in the root directory of the project.

    +

    Contributing

    +

    If you want to contribute to this repository, please ensure ...

    +
      +
    • to use make for development (it validates the source code and transpiles it to /lib).
    • +
    • to follow the existing coding style.
    • +
    • to use the linting tools that are listed in the package.json (which you get for free when using make).
    • +
    • to add and/or customize unit tests for any changed code.
    • +
    • to reference the corresponding issue in your pull request with a small description of your changes.
    • +
    +

    All contributors are listed in the AUTHORS file, sorted by the time of their first contribution.

    +
    +
    + + + + + + + + + + + + diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..a169c5f --- /dev/null +++ b/docs/package.json @@ -0,0 +1,642 @@ +{ + "name": "expect-stream", + "version": "0.1.0", + "description": "chai extension for mocha stream tests", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "keywords": [], + "repository": "https://github.com/CircleOfNice/CoreAssert.git", + "author": "TeeAge-Beatz UG", + "license": "GPL-3.0", + "peerDependencies": { + "chai": "3.x" + }, + "dependencies": { + "lodash.isequal": "^4.4.0", + "lodash.isfunction": "^3.0.8", + "lodash.ismatch": "^4.4.0", + "lodash.isnil": "^4.0.0", + "set-default-value": "0.0.8" + }, + "devDependencies": { + "babel-cli": "^6.18.0", + "babel-eslint": "^7.1.1", + "babel-plugin-transform-class-properties": "^6.19.0", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", + "chai": "^3.5.0", + "esdoc": "^0.4.8", + "esdoc-es7-plugin": "0.0.3", + "eslint": "^3.10.2", + "istanbul": "^0.4.5", + "mocha": "^3.1.2", + "remap-istanbul": "^0.7.0", + "sinon": "^1.17.6" + }, + "eslintConfig": { + "parser": "babel-eslint", + "env": { + "browser": true, + "node": true, + "es6": true, + "mocha": true + }, + "rules": { + "strict": [ + 2 + ], + "curly": [ + 2, + "multi" + ], + "default-case": [ + 2 + ], + "comma-dangle": [ + 2 + ], + "no-cond-assign": [ + 2 + ], + "no-constant-condition": [ + 2 + ], + "no-empty-character-class": [ + 2 + ], + "no-empty": [ + 2 + ], + "no-ex-assign": [ + 2 + ], + "no-extra-boolean-cast": [ + 2 + ], + "no-extra-semi": [ + 2 + ], + "no-func-assign": [ + 2 + ], + "no-inner-declarations": [ + 2 + ], + "no-invalid-regexp": [ + 2 + ], + "no-irregular-whitespace": [ + 2 + ], + "valid-typeof": [ + 2 + ], + "no-unexpected-multiline": [ + 2 + ], + "no-negated-in-lhs": [ + 2 + ], + "no-obj-calls": [ + 2 + ], + "no-regex-spaces": [ + 2 + ], + "no-sparse-arrays": [ + 2 + ], + "no-unreachable": [ + 2 + ], + "use-isnan": [ + 2 + ], + "no-control-regex": [ + 2 + ], + "no-debugger": [ + 2 + ], + "no-dupe-keys": [ + 2 + ], + "no-dupe-args": [ + 2 + ], + "no-duplicate-case": [ + 2 + ], + "accessor-pairs": [ + 2 + ], + "block-scoped-var": [ + 2 + ], + "no-multi-spaces": [ + 2, + { + "exceptions": { + "VariableDeclarator": true, + "AssignmentExpression": true, + "IfStatement": true + } + } + ], + "key-spacing": [ + 2, + { + "align": "value" + } + ], + "new-cap": [ + 0, + { + "capIsNewExceptions": [] + } + ], + "valid-jsdoc": [ + 2, + { + "requireReturn": false, + "requireReturnDescription": false + } + ], + "complexity": [ + 2, + 5 + ], + "consistent-return": [ + 2 + ], + "dot-notation": [ + 2 + ], + "dot-location": [ + 2, + "property" + ], + "eqeqeq": [ + 2 + ], + "guard-for-in": [ + 2 + ], + "no-alert": [ + 2 + ], + "no-caller": [ + 2 + ], + "no-div-regex": [ + 2 + ], + "no-else-return": [ + 2 + ], + "no-labels": [ + 2 + ], + "no-eval": [ + 2 + ], + "no-extra-bind": [ + 2 + ], + "no-eq-null": [ + 2 + ], + "no-extend-native": [ + 2 + ], + "no-fallthrough": [ + 2 + ], + "no-floating-decimal": [ + 2 + ], + "no-implicit-coercion": [ + 2 + ], + "no-implied-eval": [ + 2 + ], + "no-invalid-this": [ + 0 + ], + "no-iterator": [ + 2 + ], + "no-lone-blocks": [ + 2 + ], + "no-loop-func": [ + 2 + ], + "no-multi-str": [ + 2 + ], + "no-native-reassign": [ + 2 + ], + "no-new-func": [ + 2 + ], + "no-new-wrappers": [ + 2 + ], + "no-new": [ + 2 + ], + "keyword-spacing": [ + 2, + { + "overrides": { + "if": { + "after": false + }, + "for": { + "after": false + }, + "while": { + "after": false + }, + "catch": { + "after": false + } + } + } + ], + "no-octal": [ + 2 + ], + "no-octal-escape": [ + 2 + ], + "no-param-reassign": [ + 2 + ], + "no-process-env": [ + 2 + ], + "no-proto": [ + 2 + ], + "no-redeclare": [ + 2 + ], + "no-return-assign": [ + 2 + ], + "no-script-url": [ + 2 + ], + "no-self-compare": [ + 2 + ], + "no-sequences": [ + 2 + ], + "no-throw-literal": [ + 2 + ], + "no-unused-expressions": [ + 2 + ], + "no-useless-call": [ + 2 + ], + "no-void": [ + 2 + ], + "no-warning-comments": [ + 2 + ], + "no-with": [ + 2 + ], + "radix": [ + 2 + ], + "vars-on-top": [ + 2 + ], + "wrap-iife": [ + 2 + ], + "yoda": [ + 2 + ], + "no-undef": [ + 2 + ], + "no-undefined": [ + 2 + ], + "init-declarations": [ + 2, + "always" + ], + "no-catch-shadow": [ + 2 + ], + "no-delete-var": [ + 2 + ], + "no-label-var": [ + 2 + ], + "no-shadow-restricted-names": [ + 2 + ], + "no-shadow": [ + 2 + ], + "no-undef-init": [ + 2 + ], + "no-unused-vars": [ + 2 + ], + "no-use-before-define": [ + 2 + ], + "callback-return": [ + 2 + ], + "handle-callback-err": [ + 2 + ], + "no-mixed-requires": [ + 2 + ], + "no-new-require": [ + 2 + ], + "no-path-concat": [ + 2 + ], + "no-process-exit": [ + 2 + ], + "no-sync": [ + 2 + ], + "func-style": [ + 2, + "expression" + ], + "no-inline-comments": [ + 2 + ], + "no-array-constructor": [ + 2 + ], + "no-multiple-empty-lines": [ + 2 + ], + "array-bracket-spacing": [ + 2, + "never" + ], + "block-spacing": [ + 2, + "always" + ], + "brace-style": [ + 2, + "1tbs" + ], + "camelcase": [ + 2 + ], + "comma-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "computed-property-spacing": [ + 2, + "always" + ], + "consistent-this": [ + 2, + "self" + ], + "eol-last": [ + 2 + ], + "id-length": [ + 2, + { + "min": 2, + "max": 20, + "exceptions": [ + "x", + "e", + "T", + "Q", + "$", + "y", + "a", + "b", + "t", + "c", + "_" + ] + } + ], + "indent": [ + 2 + ], + "lines-around-comment": [ + 2, + { + "beforeBlockComment": true, + "beforeLineComment": false + } + ], + "linebreak-style": [ + 2 + ], + "max-nested-callbacks": [ + 2, + 3 + ], + "new-parens": [ + 2 + ], + "newline-after-var": [ + 2 + ], + "no-continue": [ + 2 + ], + "no-mixed-spaces-and-tabs": [ + 2 + ], + "no-nested-ternary": [ + 2 + ], + "no-new-object": [ + 2 + ], + "no-spaced-func": [ + 2 + ], + "no-trailing-spaces": [ + 2 + ], + "no-underscore-dangle": [ + 2 + ], + "no-unneeded-ternary": [ + 2 + ], + "object-curly-spacing": [ + 2, + "always" + ], + "one-var": [ + 2, + "never" + ], + "operator-assignment": [ + 2, + "never" + ], + "operator-linebreak": [ + 2, + "after" + ], + "padded-blocks": [ + 2, + "never" + ], + "quote-props": [ + 2, + "consistent-as-needed" + ], + "quotes": [ + 2, + "double" + ], + "semi-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "semi": [ + 2, + "always" + ], + "space-before-blocks": [ + 2, + "always" + ], + "space-before-function-paren": [ + 2, + "never" + ], + "space-in-parens": [ + 2, + "never" + ], + "space-infix-ops": [ + 2 + ], + "space-unary-ops": [ + 2, + { + "words": true, + "nonwords": false + } + ], + "spaced-comment": [ + 2, + "always" + ], + "arrow-parens": [ + 2, + "as-needed" + ], + "arrow-spacing": [ + 2, + { + "before": true, + "after": true + } + ], + "constructor-super": [ + 2 + ], + "generator-star-spacing": [ + 0, + { + "before": false, + "after": true + } + ], + "no-class-assign": [ + 2 + ], + "no-const-assign": [ + 2 + ], + "no-dupe-class-members": [ + 2 + ], + "no-this-before-super": [ + 2 + ], + "no-var": [ + 2 + ], + "object-shorthand": [ + 0, + "never" + ], + "prefer-const": [ + 2 + ], + "prefer-spread": [ + 2 + ], + "prefer-reflect": [ + 0 + ], + "prefer-template": [ + 2 + ], + "require-yield": [ + 2 + ], + "max-depth": [ + 2, + 5 + ], + "max-statements": [ + 2, + 10 + ] + }, + "ecmaFeatures": { + "blockBindings": true, + "forOf": true, + "jsx": true, + "arrowFunctions": true, + "spread": true, + "modules": true, + "asyncFunctions": true, + "functionBind": true + } + } +} diff --git a/docs/script/inherited-summary.js b/docs/script/inherited-summary.js new file mode 100644 index 0000000..0a35b6d --- /dev/null +++ b/docs/script/inherited-summary.js @@ -0,0 +1,28 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TABLE' && parent.classList.contains('summary')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var tbody = parent.querySelector('tbody'); + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + tbody.style.display = 'none'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + tbody.style.display = 'block'; + } + } + + var buttons = document.querySelectorAll('.inherited-summary thead .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } +})(); diff --git a/docs/script/inner-link.js b/docs/script/inner-link.js new file mode 100644 index 0000000..69a7477 --- /dev/null +++ b/docs/script/inner-link.js @@ -0,0 +1,31 @@ +// inner link(#foo) can not correctly scroll, because page has fixed header, +// so, I manually scroll. +(function(){ + var matched = location.hash.match(/errorLines=([\d,]+)/); + if (matched) return; + + function adjust() { + window.scrollBy(0, -55); + var el = document.querySelector('.inner-link-active'); + if (el) el.classList.remove('inner-link-active'); + + // ``[ ] . ' " @`` are not valid in DOM id. so must escape these. + var id = location.hash.replace(/([\[\].'"@$])/g, '\\$1'); + var el = document.querySelector(id); + if (el) el.classList.add('inner-link-active'); + } + + window.addEventListener('hashchange', adjust); + + if (location.hash) { + setTimeout(adjust, 0); + } +})(); + +(function(){ + var els = document.querySelectorAll('[href^="#"]'); + for (var i = 0; i < els.length; i++) { + var el = els[i]; + el.href = location.href + el.getAttribute('href'); // because el.href is absolute path + } +})(); diff --git a/docs/script/manual.js b/docs/script/manual.js new file mode 100644 index 0000000..125049d --- /dev/null +++ b/docs/script/manual.js @@ -0,0 +1,13 @@ +(function(){ + var matched = location.pathname.match(/([^/]*)\.html$/); + if (!matched) return; + + var currentName = matched[1]; + var cssClass = '.navigation [data-toc-name="' + currentName + '"]'; + var styleText = cssClass + ' .manual-toc { display: block; }\n'; + styleText += cssClass + ' .manual-toc-title { background-color: #039BE5; }\n'; + styleText += cssClass + ' .manual-toc-title a { color: white; }\n'; + var style = document.createElement('style'); + style.textContent = styleText; + document.querySelector('head').appendChild(style); +})(); diff --git a/docs/script/patch-for-local.js b/docs/script/patch-for-local.js new file mode 100644 index 0000000..5756d13 --- /dev/null +++ b/docs/script/patch-for-local.js @@ -0,0 +1,8 @@ +(function(){ + if (location.protocol === 'file:') { + var elms = document.querySelectorAll('a[href="./"]'); + for (var i = 0; i < elms.length; i++) { + elms[i].href = './index.html'; + } + } +})(); diff --git a/docs/script/prettify/Apache-License-2.0.txt b/docs/script/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/script/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/script/prettify/prettify.js b/docs/script/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/docs/script/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p' + pair[2] + ''); + } + } + + var innerHTML = ''; + for (kind in html) { + var list = html[kind]; + if (!list.length) continue; + innerHTML += '
  • ' + kind + '
  • \n' + list.join('\n'); + } + result.innerHTML = innerHTML; + if (innerHTML) result.style.display = 'block'; + selectedIndex = -1; + }); + + // down, up and enter key are pressed, select search result. + input.addEventListener('keydown', function(ev){ + if (ev.keyCode === 40) { + // arrow down + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex + 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex + 2]; + selectedIndex++; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex++; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 38) { + // arrow up + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex - 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex - 2]; + selectedIndex--; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex--; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 13) { + // enter + var current = result.children[selectedIndex]; + if (current) { + var link = current.querySelector('a'); + if (link) location.href = link.href; + } + } else { + return; + } + + ev.preventDefault(); + }); + + // select search result when search result is mouse over. + result.addEventListener('mousemove', function(ev){ + var current = result.children[selectedIndex]; + if (current) current.classList.remove('selected'); + + var li = ev.target; + while (li) { + if (li.nodeName === 'LI') break; + li = li.parentElement; + } + + if (li) { + selectedIndex = Array.prototype.indexOf.call(result.children, li); + li.classList.add('selected'); + } + }); + + // clear search result when body is clicked. + document.body.addEventListener('click', function(ev){ + selectedIndex = -1; + result.style.display = 'none'; + result.innerHTML = ''; + }); + +})(); diff --git a/docs/script/search_index.js b/docs/script/search_index.js new file mode 100644 index 0000000..2007487 --- /dev/null +++ b/docs/script/search_index.js @@ -0,0 +1,488 @@ +window.esdocSearchIndex = [ + [ + "expect-stream/src/assertstream.js~assertstream", + "class/src/AssertStream.js~AssertStream.html", + "AssertStream expect-stream/src/AssertStream.js", + "class" + ], + [ + "expect-stream/src/expected.js~expected", + "class/src/Expected.js~Expected.html", + "Expected expect-stream/src/Expected.js", + "class" + ], + [ + "expect-stream/src/streamhelper.js~streamhelper", + "function/index.html#static-function-StreamHelper", + "StreamHelper expect-stream/src/StreamHelper.js", + "function" + ], + [ + "builtinexternal/ecmascriptexternal.js~array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~arraybuffer", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~dataview", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~DataView", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~date", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Date", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~error", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Error", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~evalerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float64array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generator", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Generator", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generatorfunction", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~infinity", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int16array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int8array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~internalerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~json", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~JSON", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~map", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Map", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~nan", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~NaN", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~promise", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Promise", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~proxy", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~rangeerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~referenceerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~reflect", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~regexp", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~set", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Set", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~String", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~symbol", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~syntaxerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~typeerror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~urierror", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~URIError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint16array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint32array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8array", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8clampedarray", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakmap", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakset", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~null", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~null", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~string", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~undefined", + "external/index.html", + "BuiltinExternal/ECMAScriptExternal.js~undefined", + "external" + ], + [ + "builtinexternal/webapiexternal.js~audiocontext", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~AudioContext", + "external" + ], + [ + "builtinexternal/webapiexternal.js~canvasrenderingcontext2d", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "external" + ], + [ + "builtinexternal/webapiexternal.js~documentfragment", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "external" + ], + [ + "builtinexternal/webapiexternal.js~element", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Element", + "external" + ], + [ + "builtinexternal/webapiexternal.js~event", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Event", + "external" + ], + [ + "builtinexternal/webapiexternal.js~node", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~Node", + "external" + ], + [ + "builtinexternal/webapiexternal.js~nodelist", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~NodeList", + "external" + ], + [ + "builtinexternal/webapiexternal.js~xmlhttprequest", + "external/index.html", + "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "external" + ], + [ + "src/assertstream.js", + "file/src/AssertStream.js.html", + "src/AssertStream.js", + "file" + ], + [ + "src/assertstream.js~assertstream#_write", + "class/src/AssertStream.js~AssertStream.html#instance-method-_write", + "src/AssertStream.js~AssertStream#_write", + "method" + ], + [ + "src/assertstream.js~assertstream#constructor", + "class/src/AssertStream.js~AssertStream.html#instance-constructor-constructor", + "src/AssertStream.js~AssertStream#constructor", + "method" + ], + [ + "src/assertstream.js~assertstream#expected", + "class/src/AssertStream.js~AssertStream.html#instance-member-expected", + "src/AssertStream.js~AssertStream#expected", + "member" + ], + [ + "src/assertstream.js~assertstream#tapper", + "class/src/AssertStream.js~AssertStream.html#instance-member-tapper", + "src/AssertStream.js~AssertStream#tapper", + "member" + ], + [ + "src/expected.js", + "file/src/Expected.js.html", + "src/Expected.js", + "file" + ], + [ + "src/expected.js~expected#constructor", + "class/src/Expected.js~Expected.html#instance-constructor-constructor", + "src/Expected.js~Expected#constructor", + "method" + ], + [ + "src/expected.js~expected#expected", + "class/src/Expected.js~Expected.html#instance-member-expected", + "src/Expected.js~Expected#expected", + "member" + ], + [ + "src/expected.js~expected#expection", + "class/src/Expected.js~Expected.html#instance-member-expection", + "src/Expected.js~Expected#expection", + "member" + ], + [ + "src/expected.js~expected#filter", + "class/src/Expected.js~Expected.html#instance-member-filter", + "src/Expected.js~Expected#filter", + "member" + ], + [ + "src/expected.js~expected#geterror", + "class/src/Expected.js~Expected.html#instance-method-getError", + "src/Expected.js~Expected#getError", + "method" + ], + [ + "src/expected.js~expected#includes", + "class/src/Expected.js~Expected.html#instance-method-includes", + "src/Expected.js~Expected#includes", + "method" + ], + [ + "src/expected.js~expected#match", + "class/src/Expected.js~Expected.html#instance-method-match", + "src/Expected.js~Expected#match", + "method" + ], + [ + "src/expected.js~expected#matcher", + "class/src/Expected.js~Expected.html#instance-member-matcher", + "src/Expected.js~Expected#matcher", + "member" + ], + [ + "src/expected.js~expected#messages", + "class/src/Expected.js~Expected.html#instance-member-messages", + "src/Expected.js~Expected#messages", + "member" + ], + [ + "src/expected.js~expected#onmismatch", + "class/src/Expected.js~Expected.html#instance-member-onMisMatch", + "src/Expected.js~Expected#onMisMatch", + "member" + ], + [ + "src/expected.js~expected.of", + "class/src/Expected.js~Expected.html#static-method-of", + "src/Expected.js~Expected.of", + "method" + ], + [ + "src/streamhelper.js", + "file/src/StreamHelper.js.html", + "src/StreamHelper.js", + "file" + ], + [ + "src/__tests__/assertstreamtest.js", + "file/src/__tests__/AssertStreamTest.js.html", + "src/__tests__/AssertStreamTest.js", + "file" + ], + [ + "src/__tests__/expectstreamtest.js", + "file/src/__tests__/ExpectStreamTest.js.html", + "src/__tests__/ExpectStreamTest.js", + "file" + ], + [ + "src/__tests__/expectedtest.js", + "file/src/__tests__/ExpectedTest.js.html", + "src/__tests__/ExpectedTest.js", + "file" + ], + [ + "src/examples/test.js", + "file/src/examples/test.js.html", + "src/examples/test.js", + "file" + ], + [ + "src/index.js", + "file/src/index.js.html", + "src/index.js", + "file" + ] +] \ No newline at end of file diff --git a/docs/script/test-summary.js b/docs/script/test-summary.js new file mode 100644 index 0000000..2f32cb0 --- /dev/null +++ b/docs/script/test-summary.js @@ -0,0 +1,54 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TR' && parent.classList.contains('test-describe')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var direction; + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + direction = 'closed'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + direction = 'opened'; + } + + var targetDepth = parseInt(parent.dataset.testDepth, 10) + 1; + var nextElement = parent.nextElementSibling; + while (nextElement) { + var depth = parseInt(nextElement.dataset.testDepth, 10); + if (depth >= targetDepth) { + if (direction === 'opened') { + if (depth === targetDepth) nextElement.style.display = ''; + } else if (direction === 'closed') { + nextElement.style.display = 'none'; + var innerButton = nextElement.querySelector('.toggle'); + if (innerButton && innerButton.classList.contains('opened')) { + innerButton.classList.remove('opened'); + innerButton.classList.add('closed'); + } + } + } else { + break; + } + nextElement = nextElement.nextElementSibling; + } + } + + var buttons = document.querySelectorAll('.test-summary tr.test-describe .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } + + var topDescribes = document.querySelectorAll('.test-summary tr[data-test-depth="0"]'); + for (var i = 0; i < topDescribes.length; i++) { + topDescribes[i].style.display = ''; + } +})(); diff --git a/docs/source.html b/docs/source.html new file mode 100644 index 0000000..8452ac9 --- /dev/null +++ b/docs/source.html @@ -0,0 +1,137 @@ + + + + + + Source | API Document + + + + + + + + + +
    + Home + + Reference + Source + + Repository + +
    + + + +

    Source 9/18

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileIdentifierDocumentSizeLinesUpdated
    src/AssertStream.jsAssertStream60 %3/51405 byte472016-11-05 13:05:00 (UTC)
    src/Expected.jsExpected41 %5/122512 byte862016-11-05 13:05:00 (UTC)
    src/StreamHelper.jsStreamHelper100 %1/12113 byte712016-11-05 13:05:00 (UTC)
    src/__tests__/AssertStreamTest.js--4025 byte1142016-11-05 13:05:00 (UTC)
    src/__tests__/ExpectStreamTest.js--8142 byte2492016-11-05 13:05:00 (UTC)
    src/__tests__/ExpectedTest.js--2442 byte692016-11-05 13:05:00 (UTC)
    src/examples/test.js--0 byte2016-11-05 13:05:00 (UTC)
    src/index.js--123 byte72016-11-05 13:05:00 (UTC)
    +
    + + + + + + + + + + + + diff --git a/esdoc.json b/esdoc.json new file mode 100644 index 0000000..2e814b4 --- /dev/null +++ b/esdoc.json @@ -0,0 +1,8 @@ +{ + "source": "./src", + "destination": "./docs", + "plugins": [ + {"name": "esdoc-es7-plugin"} + ], + "autoPrivate": false +} diff --git a/examples/test b/examples/test new file mode 100755 index 0000000..b7d5729 --- /dev/null +++ b/examples/test @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict"; + +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..5304ad0 --- /dev/null +++ b/index.js @@ -0,0 +1 @@ +module.exports = require("./lib/index"); diff --git a/lib/AssertStream.js b/lib/AssertStream.js new file mode 100644 index 0000000..89b8bf3 --- /dev/null +++ b/lib/AssertStream.js @@ -0,0 +1,100 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = require("babel-runtime/helpers/inherits"); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _stream = require("stream"); + +var _Expected = require("./Expected"); + +var _Expected2 = _interopRequireDefault(_Expected); + +var _setDefaultValue = require("set-default-value"); + +var _setDefaultValue2 = _interopRequireDefault(_setDefaultValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * this stream is used to be piped into. + * it ends if the expected value was received. + * + * @author Marco Sliwa + */ +var AssertStream = function (_Writable) { + (0, _inherits3.default)(AssertStream, _Writable); + + /** + * constructor for this stream + * + * @constructor + * @param {*} expected value + * @param {object} options configuring the behaviour of AssertSream + */ + function AssertStream(expected, options) { + (0, _classCallCheck3.default)(this, AssertStream); + + var _this = (0, _possibleConstructorReturn3.default)(this, (AssertStream.__proto__ || (0, _getPrototypeOf2.default)(AssertStream)).call(this, { + objectMode: true + })); + + _this.expected = _Expected2.default.of(expected, options); + _this.tapper = (0, _setDefaultValue2.default)(options.tapper).to(function () {}); + return _this; + } + + /** + * implementation of the write function. transforms data, + * so that it can be compared, emits end on match, otherwise + * continues. + * + * @param {string|object} chunk of data + * @param {string} enc of data + * @param {function} cb when operation finished + * @return {*} + */ + + + (0, _createClass3.default)(AssertStream, [{ + key: "_write", + value: function _write(chunk, enc, cb) { + var _this2 = this; + + var data = Buffer.isBuffer(chunk) ? chunk.toString() : chunk; + var result = this.expected.match(data); + + this.tapper(data, result); + + return result === -1 ? this.emit("error", this.expected.getError()) : setTimeout(function () { + return result === 1 ? _this2.emit("done") : cb(); + }, 1); + } + }]); + return AssertStream; +}(_stream.Writable); + +exports.default = AssertStream; + +//# sourceMappingURL=AssertStream.js.map \ No newline at end of file diff --git a/lib/Expected.js b/lib/Expected.js new file mode 100644 index 0000000..0fee218 --- /dev/null +++ b/lib/Expected.js @@ -0,0 +1,156 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _stringify = require("babel-runtime/core-js/json/stringify"); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _lodash = require("lodash.isarray"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _lodash3 = require("lodash.isequal"); + +var _lodash4 = _interopRequireDefault(_lodash3); + +var _lodash5 = require("lodash.isfunction"); + +var _lodash6 = _interopRequireDefault(_lodash5); + +var _lodash7 = require("lodash.isnil"); + +var _lodash8 = _interopRequireDefault(_lodash7); + +var _lodash9 = require("lodash.ismatch"); + +var _lodash10 = _interopRequireDefault(_lodash9); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Expected = function () { + (0, _createClass3.default)(Expected, null, [{ + key: "of", + + + /** + * Creates an ExpectationClass, that checks, + * whether an incoming value matches the + * expectations + * + * @param {*} args needed for creation + * @return {Expected} + */ + value: function of() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return new (Function.prototype.bind.apply(Expected, [null].concat(args)))(); + } + + /** + * Constructor of Expected + * + * @constructor + * @param {*} expected compared with input + * @param {object} options for custom matcning behaviour + */ + + }]); + + function Expected(expected, _ref) { + var filter = _ref.filter, + eventually = _ref.eventually, + strict = _ref.strict; + (0, _classCallCheck3.default)(this, Expected); + + this.messages = []; + this.expection = (0, _lodash2.default)(expected) ? expected.slice(0) : expected; + this.expected = expected; + this.matcher = (0, _lodash8.default)(strict) ? _lodash10.default : _lodash4.default; + this.onMisMatch = (0, _lodash8.default)(eventually) ? -1 : 0; + this.filter = (0, _lodash8.default)(filter) ? function () { + return true; + } : filter; + } + + /** + * Checks if next value in list matches the input + * + * @param {*} value to be compared + * @return {Number} + */ + + + (0, _createClass3.default)(Expected, [{ + key: "includes", + value: function includes(value) { + var expected = this.expected.shift(); + var matches = this.matcher(value, expected); + var onMatch = this.expected.length === 0 ? 1 : 0; + + this.expected = matches ? this.expected : [expected].concat(this.expected); + + return matches ? onMatch : this.onMisMatch; + } + + /** + * Compares input with expectations + * + * @param {*} value to be compared + * @return {Number} + */ + + }, { + key: "match", + value: function match(value) { + // eslint-disable-line + this.messages.push(value); + + if (!this.filter(value)) return 0; + if ((0, _lodash6.default)(this.expected)) return this.expected(value); + if ((0, _lodash2.default)(this.expected)) return this.includes(value); + + return this.matcher(value, this.expected) ? 1 : this.onMisMatch; + } + + /** + * produces the error containing the expected vs actual results + * + * @return {Error} + */ + + }, { + key: "getError", + value: function getError() { + if ((0, _lodash6.default)(this.expection)) return new Error("the messages " + (0, _stringify2.default)(this.messages) + " do not match your expectations."); + + try { + (0, _chai.expect)(this.messages).to.eql(this.expection); + + return null; + } catch (e) { + return e; + } + } + }]); + return Expected; +}(); + +exports.default = Expected; + +//# sourceMappingURL=Expected.js.map \ No newline at end of file diff --git a/lib/StreamHelper.js b/lib/StreamHelper.js new file mode 100644 index 0000000..9b6a208 --- /dev/null +++ b/lib/StreamHelper.js @@ -0,0 +1,98 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require("lodash.isfunction"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _assert = require("assert"); + +var _assert2 = _interopRequireDefault(_assert); + +var _AssertStream = require("./AssertStream"); + +var _AssertStream2 = _interopRequireDefault(_AssertStream); + +var _setDefaultValue = require("set-default-value"); + +var _setDefaultValue2 = _interopRequireDefault(_setDefaultValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * this function adds the new methods to the Assertion + * chain, where they have the following responsibilities: + * + * produce: sets the expected value of the stream + * on: gives a set of input values, if testing + * a transformer + * notify: cb for error and done notifications + * + * @param {object} chai to be extended + */ +var StreamHelper = function StreamHelper(_ref) { + var Assertion = _ref.Assertion; + + Assertion.addChainableMethod("exactly", function (expected) { + this.expected = (0, _setDefaultValue2.default)(expected).to(this.expected); + this.strictEquality = true; + }, function () { + this.strictEquality = true; + }); + + Assertion.addChainableMethod("produce", function (expected) { + this.expected = expected; + this.args = []; + }, function () { + this.args = []; + }); + + Assertion.addProperty("eventually", function () { + this.checkAllResults = true; + }); + + Assertion.addMethod("filter", function (filter) { + this.filterMethod = filter; + }); + + Assertion.addMethod("notify", function (done) { + var _this = this; + + var sink = new _AssertStream2.default(this.expected, { + filter: this.filterMethod, + tapper: this.tapper, + eventually: this.checkAllResults, + strict: this.strictEquality + }); + + this._obj.pipe(sink) // eslint-disable-line + .on("done", done).on("error", done); + + this.args.forEach(function (arg) { + return _this._obj.write(arg); + }); // eslint-disable-line + }); + + Assertion.addMethod("tap", function (tapper) { + this.tapper = tapper; + }); + + Assertion.addMethod("on", function () { + var write = this._obj.write; // eslint-disable-line + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + (0, _assert2.default)(args.length > 0 && (0, _lodash2.default)(write) || args.length === 0 && !(0, _lodash2.default)(write), "You can only use arguments with a writable stream."); + + this.args = args; + }); +}; + +exports.default = StreamHelper; + +//# sourceMappingURL=StreamHelper.js.map \ No newline at end of file diff --git a/lib/__tests__/AssertStreamTest.js b/lib/__tests__/AssertStreamTest.js new file mode 100644 index 0000000..3a569e9 --- /dev/null +++ b/lib/__tests__/AssertStreamTest.js @@ -0,0 +1,132 @@ +"use strict"; + +var _AssertStream = require("../AssertStream"); + +var _AssertStream2 = _interopRequireDefault(_AssertStream); + +var _sinon = require("sinon"); + +var _sinon2 = _interopRequireDefault(_sinon); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +describe("AssertStreamTest", function () { + it("writes to an assert stream with a value expectation, until it ends with the expected value.", function (done) { + var tapSpy = _sinon2.default.spy(); + var onEnd = _sinon2.default.spy(); + var stream = new _AssertStream2.default({ + test: "test" + }, { + tapper: tapSpy, + eventually: true + }); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function () { + (0, _chai.expect)(onEnd.callCount).to.equal(1); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal("bla"); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal(0); + (0, _chai.expect)(tapSpy.secondCall.args.shift()).to.eql({}); + (0, _chai.expect)(tapSpy.secondCall.args.shift()).to.equal(0); + (0, _chai.expect)(tapSpy.thirdCall.args.shift()).to.eql({ + test: "test" + }); + (0, _chai.expect)(tapSpy.thirdCall.args.shift()).to.equal(1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function (done) { + var onEnd = _sinon2.default.spy(); + var stream = new _AssertStream2.default(function (x) { + return x.test === "test" ? 1 : 0; + }, {}); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function () { + (0, _chai.expect)(onEnd.callCount).to.equal(1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(function (x) { + return x.test === "test" ? 1 : -1; + }, { + tapper: tapSpy + }); + + stream.on("error", function (e) { + (0, _chai.expect)(e.message).to.equal("the messages [\"bla\"] do not match your expectations."); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal("bla"); + (0, _chai.expect)(tapSpy.firstCall.args.shift()).to.equal(-1); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }); + + stream.write("bla"); + }); + + it("writes to an assert stream, that expects multiple messages", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(["test1", "test2", "test3"], { + tapper: tapSpy + }); + var onEnd = function onEnd() { + (0, _chai.expect)(tapSpy.firstCall.calledWith("test1", 0)); + (0, _chai.expect)(tapSpy.secondCall.calledWith("test2", 0)); + (0, _chai.expect)(tapSpy.thirdCall.calledWith("test3", 1)); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test1"); + stream.write("test2"); + stream.write("test3"); + }); + + it("writes to an assert stream, filtering some messages", function (done) { + var tapSpy = _sinon2.default.spy(); + var stream = new _AssertStream2.default(["test1", "test2"], { + tapper: tapSpy, + filter: function filter(value) { + return value !== "test4"; + } + }); + + var onEnd = function onEnd() { + (0, _chai.expect)(tapSpy.firstCall.calledWith("test4", 0)); + (0, _chai.expect)(tapSpy.secondCall.calledWith("test1", 0)); + (0, _chai.expect)(tapSpy.thirdCall.calledWith("test2", 1)); + (0, _chai.expect)(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test4"); + stream.write("test1"); + stream.write("test2"); + }); +}); + +//# sourceMappingURL=AssertStreamTest.js.map \ No newline at end of file diff --git a/lib/__tests__/ExpectStreamTest.js b/lib/__tests__/ExpectStreamTest.js new file mode 100644 index 0000000..fefa22b --- /dev/null +++ b/lib/__tests__/ExpectStreamTest.js @@ -0,0 +1,309 @@ +"use strict"; + +var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of"); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = require("babel-runtime/helpers/createClass"); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn"); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = require("babel-runtime/helpers/inherits"); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _lodash = require("lodash.isarray"); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _index = require("../index"); + +var _stream = require("stream"); + +var _assert = require("assert"); + +var _assert2 = _interopRequireDefault(_assert); + +var _sinon = require("sinon"); + +var _sinon2 = _interopRequireDefault(_sinon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ReadStream = function (_Readable) { + (0, _inherits3.default)(ReadStream, _Readable); + + function ReadStream() { + var messages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "lala"; + (0, _classCallCheck3.default)(this, ReadStream); + + var _this = (0, _possibleConstructorReturn3.default)(this, (ReadStream.__proto__ || (0, _getPrototypeOf2.default)(ReadStream)).call(this, { objectMode: true })); + + _this.messages = messages; + return _this; + } + + (0, _createClass3.default)(ReadStream, [{ + key: "_read", + value: function _read() { + this.push((0, _lodash2.default)(this.messages) ? this.messages.shift() : this.messages); + } + }]); + return ReadStream; +}(_stream.Readable); + +var TransformStream = function (_Transform) { + (0, _inherits3.default)(TransformStream, _Transform); + + function TransformStream() { + (0, _classCallCheck3.default)(this, TransformStream); + return (0, _possibleConstructorReturn3.default)(this, (TransformStream.__proto__ || (0, _getPrototypeOf2.default)(TransformStream)).apply(this, arguments)); + } + + (0, _createClass3.default)(TransformStream, [{ + key: "_transform", + value: function _transform(chunk, enc, cb) { + this.push(chunk); + setTimeout(cb, 20); + } + }]); + return TransformStream; +}(_stream.Transform); + +var ReadObjectStream = function (_Readable2) { + (0, _inherits3.default)(ReadObjectStream, _Readable2); + + function ReadObjectStream() { + (0, _classCallCheck3.default)(this, ReadObjectStream); + return (0, _possibleConstructorReturn3.default)(this, (ReadObjectStream.__proto__ || (0, _getPrototypeOf2.default)(ReadObjectStream)).call(this, { + objectMode: true + })); + } + + (0, _createClass3.default)(ReadObjectStream, [{ + key: "_read", + value: function _read() { + this.push({ + test: { + test: [] + } + }); + } + }]); + return ReadObjectStream; +}(_stream.Readable); + +var TransformObjStream = function (_Transform2) { + (0, _inherits3.default)(TransformObjStream, _Transform2); + + function TransformObjStream() { + (0, _classCallCheck3.default)(this, TransformObjStream); + return (0, _possibleConstructorReturn3.default)(this, (TransformObjStream.__proto__ || (0, _getPrototypeOf2.default)(TransformObjStream)).call(this, { + objectMode: true + })); + } + + (0, _createClass3.default)(TransformObjStream, [{ + key: "_transform", + value: function _transform(obj, enc, cb) { + this.push(obj); + setTimeout(cb, 20); + } + }]); + return TransformObjStream; +}(_stream.Transform); + +describe("ExpectStreamTest", function () { + // eslint-disable-line + it("uses the produce assertion with a readstream, matching exactly", function (done) { + (0, _index.expect)(new ReadStream(["lala1", "lala2", "lala3"])).to.produce(["lala1", "lala2", "lala3"]).notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.exactly.produce({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality - part2", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.produce.exactly({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala", another: "lulu" })).to.produce({ test: "lala" }).notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function (done) { + (0, _index.expect)(new ReadStream({ test: "lala" })).to.produce({ test: "lala", another: "lulu" }).notify(function (e) { + return e ? done() : done(new Error("Shouldn't end up here.")); + }); + }); + + it("uses the produce assertion with a readstream, matching exactly and fails", function (done) { + var stream = new ReadStream(["lala1", "lala", "lala3"]); + + (0, _index.expect)(stream).to.produce(["lala1", "lala2", "lala3"]).notify(function (e) { + if (!e) return done(new Error("Should fail")); + + try { + (0, _index.expect)(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch (e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching not exactly", function (done) { + var stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]); + + (0, _index.expect)(stream).to.eventually.produce(["lala1", "lala2", "lala3"]).notify(function (e) { + if (e) return done(e); + + try { + (0, _index.expect)(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch (e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function (done) { + (0, _index.expect)(new ReadStream(["lala1", "lala", "lala2", "lala3"])).filter(function (value) { + return value !== "lala"; + }).to.produce(["lala1", "lala2", "lala3"]).notify(done); + }); + + it("uses the eventually produce assertion with a readstream, producing buffers.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce("lala").notify(done); + }); + + it("uses the produce assertion with a readstream, producing objects.", function (done) { + (0, _index.expect)(new ReadObjectStream()).to.eventually.produce({ + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion on the readstream with buffers.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce("lulu").notify(function () { + return done(new Error("should not finish")); + }); + setTimeout(function () { + return done(); + }, 20); + }); + + it("fails the produce assertion on the readstream with objects.", function (done) { + (0, _index.expect)(new ReadStream()).to.eventually.produce({ + test: "test2" + }).notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 20); + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").notify(done); + }); + + it("uses the produce assertion with a transformstream, producing objects.", function (done) { + (0, _index.expect)(new TransformObjStream()).to.eventually.produce({ + test: { + test: [] + } + }).on("lala", "test", "huhu", { + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test").notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 70); + }); + + it("fails the produce assertion with a transformstream, producing objects.", function (done) { + (0, _index.expect)(new TransformObjStream()).to.eventually.produce({ + test: { + test: [] + } + }).on("lala", "test", { + test: { + test: 1 + } + }).notify(function () { + return done(new Error("should not finish")); + }); + + setTimeout(function () { + return done(); + }, 70); + }); + + it("tries to test a readstream with input", function (done) { + try { + (0, _index.expect)(new ReadStream()).to.eventually.produce("test").on("bla").notify(done); + } catch (e) { + _assert2.default.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("tries to test a transformstream without input", function (done) { + try { + (0, _index.expect)(new TransformStream()).to.eventually.produce("test").on().notify(done); + } catch (e) { + _assert2.default.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function (done) { + (0, _index.expect)(new TransformStream()).to.produce(function (x) { + return x === "huhu" ? 1 : -1; + }).on("lala", "test", "huhu").notify(function (e) { + return e instanceof Error ? done() : done(new Error("should throw")); + }); + }); + + it("taps a stream under test.", function (done) { + var spy = _sinon2.default.spy(); + + (0, _index.expect)(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").tap(spy).notify(function () { + try { + (0, _index.expect)(spy.callCount).to.equal(3); + (0, _index.expect)(spy.firstCall.args.shift()).to.equal("lala"); + (0, _index.expect)(spy.firstCall.args.shift()).to.equal(0); + (0, _index.expect)(spy.secondCall.args.shift()).to.equal("test"); + (0, _index.expect)(spy.secondCall.args.shift()).to.equal(0); + (0, _index.expect)(spy.thirdCall.args.shift()).to.equal("huhu"); + (0, _index.expect)(spy.thirdCall.args.shift()).to.equal(1); + done(); + } catch (e) { + done(e); + } + }); + }); +}); + +//# sourceMappingURL=ExpectStreamTest.js.map \ No newline at end of file diff --git a/lib/__tests__/ExpectedTest.js b/lib/__tests__/ExpectedTest.js new file mode 100644 index 0000000..2740f0d --- /dev/null +++ b/lib/__tests__/ExpectedTest.js @@ -0,0 +1,86 @@ +"use strict"; + +var _Expected = require("../Expected"); + +var _Expected2 = _interopRequireDefault(_Expected); + +var _chai = require("chai"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +describe("Expected", function () { + it("compares a single value with the expected one", function () { + var expected = _Expected2.default.of("Test", {}); + + (0, _chai.expect)(expected.match("Test")).to.equal(1); + (0, _chai.expect)(expected.match("NotTest")).to.equal(-1); + }); + + it("compares a single value with the expected one, skipping all not matching ones", function () { + var expected = _Expected2.default.of("Test", { + eventually: true + }); + + (0, _chai.expect)(expected.match("Test")).to.equal(1); + (0, _chai.expect)(expected.match("NotTest")).to.equal(0); + }); + + it("compares a list of values with another list of values", function () { + var expected = _Expected2.default.of(["Test1", "Test2", "Test3"], {}); + + (0, _chai.expect)(expected.match("Test1")).to.equal(0); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); + + it("compares a list of values with another list, skipping all non-matches", function () { + var expected = _Expected2.default.of(["Test3", "Test4", "Test5"], { + eventually: true + }); + + (0, _chai.expect)(expected.match("Test3")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test5")).to.equal(1); + }); + + it("compares a list of values with a filter", function () { + var expected = _Expected2.default.of(["Test3", "Test4", "Test5"], { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test3")).to.equal(0); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test4")).to.equal(0); + (0, _chai.expect)(expected.match("Test5")).to.equal(1); + }); + + it("compares a single of values with a filter", function () { + var expected = _Expected2.default.of("Test3", { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); + + it("compares with a function", function () { + var expected = _Expected2.default.of(function (value) { + return value === "Test3" ? 1 : -1; + }, { + filter: function filter(value) { + return value !== "Test2"; + } + }); + + (0, _chai.expect)(expected.match("Test1")).to.equal(-1); + (0, _chai.expect)(expected.match("Test2")).to.equal(0); + (0, _chai.expect)(expected.match("Test3")).to.equal(1); + }); +}); + +//# sourceMappingURL=ExpectedTest.js.map \ No newline at end of file diff --git a/lib/examples/test.js b/lib/examples/test.js new file mode 100644 index 0000000..647fe1f --- /dev/null +++ b/lib/examples/test.js @@ -0,0 +1,3 @@ +"use strict"; + +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..61a3553 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,15 @@ +"use strict"; + +var _StreamHelper = require("./StreamHelper"); + +var _StreamHelper2 = _interopRequireDefault(_StreamHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chai = require("chai"); + +chai.use(_StreamHelper2.default); + +module.exports = chai; + +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..a169c5f --- /dev/null +++ b/package.json @@ -0,0 +1,642 @@ +{ + "name": "expect-stream", + "version": "0.1.0", + "description": "chai extension for mocha stream tests", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "keywords": [], + "repository": "https://github.com/CircleOfNice/CoreAssert.git", + "author": "TeeAge-Beatz UG", + "license": "GPL-3.0", + "peerDependencies": { + "chai": "3.x" + }, + "dependencies": { + "lodash.isequal": "^4.4.0", + "lodash.isfunction": "^3.0.8", + "lodash.ismatch": "^4.4.0", + "lodash.isnil": "^4.0.0", + "set-default-value": "0.0.8" + }, + "devDependencies": { + "babel-cli": "^6.18.0", + "babel-eslint": "^7.1.1", + "babel-plugin-transform-class-properties": "^6.19.0", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", + "chai": "^3.5.0", + "esdoc": "^0.4.8", + "esdoc-es7-plugin": "0.0.3", + "eslint": "^3.10.2", + "istanbul": "^0.4.5", + "mocha": "^3.1.2", + "remap-istanbul": "^0.7.0", + "sinon": "^1.17.6" + }, + "eslintConfig": { + "parser": "babel-eslint", + "env": { + "browser": true, + "node": true, + "es6": true, + "mocha": true + }, + "rules": { + "strict": [ + 2 + ], + "curly": [ + 2, + "multi" + ], + "default-case": [ + 2 + ], + "comma-dangle": [ + 2 + ], + "no-cond-assign": [ + 2 + ], + "no-constant-condition": [ + 2 + ], + "no-empty-character-class": [ + 2 + ], + "no-empty": [ + 2 + ], + "no-ex-assign": [ + 2 + ], + "no-extra-boolean-cast": [ + 2 + ], + "no-extra-semi": [ + 2 + ], + "no-func-assign": [ + 2 + ], + "no-inner-declarations": [ + 2 + ], + "no-invalid-regexp": [ + 2 + ], + "no-irregular-whitespace": [ + 2 + ], + "valid-typeof": [ + 2 + ], + "no-unexpected-multiline": [ + 2 + ], + "no-negated-in-lhs": [ + 2 + ], + "no-obj-calls": [ + 2 + ], + "no-regex-spaces": [ + 2 + ], + "no-sparse-arrays": [ + 2 + ], + "no-unreachable": [ + 2 + ], + "use-isnan": [ + 2 + ], + "no-control-regex": [ + 2 + ], + "no-debugger": [ + 2 + ], + "no-dupe-keys": [ + 2 + ], + "no-dupe-args": [ + 2 + ], + "no-duplicate-case": [ + 2 + ], + "accessor-pairs": [ + 2 + ], + "block-scoped-var": [ + 2 + ], + "no-multi-spaces": [ + 2, + { + "exceptions": { + "VariableDeclarator": true, + "AssignmentExpression": true, + "IfStatement": true + } + } + ], + "key-spacing": [ + 2, + { + "align": "value" + } + ], + "new-cap": [ + 0, + { + "capIsNewExceptions": [] + } + ], + "valid-jsdoc": [ + 2, + { + "requireReturn": false, + "requireReturnDescription": false + } + ], + "complexity": [ + 2, + 5 + ], + "consistent-return": [ + 2 + ], + "dot-notation": [ + 2 + ], + "dot-location": [ + 2, + "property" + ], + "eqeqeq": [ + 2 + ], + "guard-for-in": [ + 2 + ], + "no-alert": [ + 2 + ], + "no-caller": [ + 2 + ], + "no-div-regex": [ + 2 + ], + "no-else-return": [ + 2 + ], + "no-labels": [ + 2 + ], + "no-eval": [ + 2 + ], + "no-extra-bind": [ + 2 + ], + "no-eq-null": [ + 2 + ], + "no-extend-native": [ + 2 + ], + "no-fallthrough": [ + 2 + ], + "no-floating-decimal": [ + 2 + ], + "no-implicit-coercion": [ + 2 + ], + "no-implied-eval": [ + 2 + ], + "no-invalid-this": [ + 0 + ], + "no-iterator": [ + 2 + ], + "no-lone-blocks": [ + 2 + ], + "no-loop-func": [ + 2 + ], + "no-multi-str": [ + 2 + ], + "no-native-reassign": [ + 2 + ], + "no-new-func": [ + 2 + ], + "no-new-wrappers": [ + 2 + ], + "no-new": [ + 2 + ], + "keyword-spacing": [ + 2, + { + "overrides": { + "if": { + "after": false + }, + "for": { + "after": false + }, + "while": { + "after": false + }, + "catch": { + "after": false + } + } + } + ], + "no-octal": [ + 2 + ], + "no-octal-escape": [ + 2 + ], + "no-param-reassign": [ + 2 + ], + "no-process-env": [ + 2 + ], + "no-proto": [ + 2 + ], + "no-redeclare": [ + 2 + ], + "no-return-assign": [ + 2 + ], + "no-script-url": [ + 2 + ], + "no-self-compare": [ + 2 + ], + "no-sequences": [ + 2 + ], + "no-throw-literal": [ + 2 + ], + "no-unused-expressions": [ + 2 + ], + "no-useless-call": [ + 2 + ], + "no-void": [ + 2 + ], + "no-warning-comments": [ + 2 + ], + "no-with": [ + 2 + ], + "radix": [ + 2 + ], + "vars-on-top": [ + 2 + ], + "wrap-iife": [ + 2 + ], + "yoda": [ + 2 + ], + "no-undef": [ + 2 + ], + "no-undefined": [ + 2 + ], + "init-declarations": [ + 2, + "always" + ], + "no-catch-shadow": [ + 2 + ], + "no-delete-var": [ + 2 + ], + "no-label-var": [ + 2 + ], + "no-shadow-restricted-names": [ + 2 + ], + "no-shadow": [ + 2 + ], + "no-undef-init": [ + 2 + ], + "no-unused-vars": [ + 2 + ], + "no-use-before-define": [ + 2 + ], + "callback-return": [ + 2 + ], + "handle-callback-err": [ + 2 + ], + "no-mixed-requires": [ + 2 + ], + "no-new-require": [ + 2 + ], + "no-path-concat": [ + 2 + ], + "no-process-exit": [ + 2 + ], + "no-sync": [ + 2 + ], + "func-style": [ + 2, + "expression" + ], + "no-inline-comments": [ + 2 + ], + "no-array-constructor": [ + 2 + ], + "no-multiple-empty-lines": [ + 2 + ], + "array-bracket-spacing": [ + 2, + "never" + ], + "block-spacing": [ + 2, + "always" + ], + "brace-style": [ + 2, + "1tbs" + ], + "camelcase": [ + 2 + ], + "comma-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "computed-property-spacing": [ + 2, + "always" + ], + "consistent-this": [ + 2, + "self" + ], + "eol-last": [ + 2 + ], + "id-length": [ + 2, + { + "min": 2, + "max": 20, + "exceptions": [ + "x", + "e", + "T", + "Q", + "$", + "y", + "a", + "b", + "t", + "c", + "_" + ] + } + ], + "indent": [ + 2 + ], + "lines-around-comment": [ + 2, + { + "beforeBlockComment": true, + "beforeLineComment": false + } + ], + "linebreak-style": [ + 2 + ], + "max-nested-callbacks": [ + 2, + 3 + ], + "new-parens": [ + 2 + ], + "newline-after-var": [ + 2 + ], + "no-continue": [ + 2 + ], + "no-mixed-spaces-and-tabs": [ + 2 + ], + "no-nested-ternary": [ + 2 + ], + "no-new-object": [ + 2 + ], + "no-spaced-func": [ + 2 + ], + "no-trailing-spaces": [ + 2 + ], + "no-underscore-dangle": [ + 2 + ], + "no-unneeded-ternary": [ + 2 + ], + "object-curly-spacing": [ + 2, + "always" + ], + "one-var": [ + 2, + "never" + ], + "operator-assignment": [ + 2, + "never" + ], + "operator-linebreak": [ + 2, + "after" + ], + "padded-blocks": [ + 2, + "never" + ], + "quote-props": [ + 2, + "consistent-as-needed" + ], + "quotes": [ + 2, + "double" + ], + "semi-spacing": [ + 2, + { + "before": false, + "after": true + } + ], + "semi": [ + 2, + "always" + ], + "space-before-blocks": [ + 2, + "always" + ], + "space-before-function-paren": [ + 2, + "never" + ], + "space-in-parens": [ + 2, + "never" + ], + "space-infix-ops": [ + 2 + ], + "space-unary-ops": [ + 2, + { + "words": true, + "nonwords": false + } + ], + "spaced-comment": [ + 2, + "always" + ], + "arrow-parens": [ + 2, + "as-needed" + ], + "arrow-spacing": [ + 2, + { + "before": true, + "after": true + } + ], + "constructor-super": [ + 2 + ], + "generator-star-spacing": [ + 0, + { + "before": false, + "after": true + } + ], + "no-class-assign": [ + 2 + ], + "no-const-assign": [ + 2 + ], + "no-dupe-class-members": [ + 2 + ], + "no-this-before-super": [ + 2 + ], + "no-var": [ + 2 + ], + "object-shorthand": [ + 0, + "never" + ], + "prefer-const": [ + 2 + ], + "prefer-spread": [ + 2 + ], + "prefer-reflect": [ + 0 + ], + "prefer-template": [ + 2 + ], + "require-yield": [ + 2 + ], + "max-depth": [ + 2, + 5 + ], + "max-statements": [ + 2, + 10 + ] + }, + "ecmaFeatures": { + "blockBindings": true, + "forOf": true, + "jsx": true, + "arrowFunctions": true, + "spread": true, + "modules": true, + "asyncFunctions": true, + "functionBind": true + } + } +} diff --git a/setupfile b/setupfile new file mode 100644 index 0000000..27e1f54 --- /dev/null +++ b/setupfile @@ -0,0 +1 @@ +setup done diff --git a/src/AssertStream.js b/src/AssertStream.js new file mode 100644 index 0000000..a1bd296 --- /dev/null +++ b/src/AssertStream.js @@ -0,0 +1,47 @@ +import { Writable } from "stream"; +import Expected from "./Expected"; +import defaults from "set-default-value"; + +/** + * this stream is used to be piped into. + * it ends if the expected value was received. + * + * @author Marco Sliwa + */ +export default class AssertStream extends Writable { + + /** + * constructor for this stream + * + * @constructor + * @param {*} expected value + * @param {object} options configuring the behaviour of AssertSream + */ + constructor(expected, options) { + super({ + objectMode: true + }); + + this.expected = Expected.of(expected, options); + this.tapper = defaults(options.tapper).to(() => {}); + } + + /** + * implementation of the write function. transforms data, + * so that it can be compared, emits end on match, otherwise + * continues. + * + * @param {string|object} chunk of data + * @param {string} enc of data + * @param {function} cb when operation finished + * @return {*} + */ + _write(chunk, enc, cb) { + const data = Buffer.isBuffer(chunk) ? chunk.toString() : chunk; + const result = this.expected.match(data); + + this.tapper(data, result); + + return result === -1 ? this.emit("error", this.expected.getError()) : setTimeout(() => result === 1 ? this.emit("done") : cb(), 1); + } +} diff --git a/src/Expected.js b/src/Expected.js new file mode 100644 index 0000000..1e1afec --- /dev/null +++ b/src/Expected.js @@ -0,0 +1,86 @@ +import isArray from "lodash.isarray"; +import isEqual from "lodash.isequal"; +import isFunction from "lodash.isfunction"; +import isNil from "lodash.isnil"; +import isMatch from "lodash.ismatch"; +import { expect } from "chai"; + +export default class Expected { + + /** + * Creates an ExpectationClass, that checks, + * whether an incoming value matches the + * expectations + * + * @param {*} args needed for creation + * @return {Expected} + */ + static of(...args) { + return new Expected(...args); + } + + /** + * Constructor of Expected + * + * @constructor + * @param {*} expected compared with input + * @param {object} options for custom matcning behaviour + */ + constructor(expected, { filter, eventually, strict }) { + this.messages = []; + this.expection = isArray(expected) ? expected.slice(0) : expected; + this.expected = expected; + this.matcher = isNil(strict) ? isMatch : isEqual; + this.onMisMatch = isNil(eventually) ? -1 : 0; + this.filter = isNil(filter) ? () => true : filter; + } + + /** + * Checks if next value in list matches the input + * + * @param {*} value to be compared + * @return {Number} + */ + includes(value) { + const expected = this.expected.shift(); + const matches = this.matcher(value, expected); + const onMatch = this.expected.length === 0 ? 1 : 0; + + this.expected = matches ? this.expected : [expected].concat(this.expected); + + return matches ? onMatch : this.onMisMatch; + } + + /** + * Compares input with expectations + * + * @param {*} value to be compared + * @return {Number} + */ + match(value) { // eslint-disable-line + this.messages.push(value); + + if(!this.filter(value)) return 0; + if(isFunction(this.expected)) return this.expected(value); + if(isArray(this.expected)) return this.includes(value); + + return this.matcher(value, this.expected) ? 1 : this.onMisMatch; + } + + /** + * produces the error containing the expected vs actual results + * + * @return {Error} + */ + getError() { + if(isFunction(this.expection)) return new Error(`the messages ${JSON.stringify(this.messages)} do not match your expectations.`); + + try { + expect(this.messages).to.eql(this.expection); + + return null; + } catch(e) { + return e; + } + } +} diff --git a/src/StreamHelper.js b/src/StreamHelper.js new file mode 100644 index 0000000..558ba89 --- /dev/null +++ b/src/StreamHelper.js @@ -0,0 +1,71 @@ +import isFunction from "lodash.isfunction"; +import assert from "assert"; +import AssertStream from "./AssertStream"; +import defaults from "set-default-value"; + +/** + * this function adds the new methods to the Assertion + * chain, where they have the following responsibilities: + * + * produce: sets the expected value of the stream + * on: gives a set of input values, if testing + * a transformer + * notify: cb for error and done notifications + * + * @param {object} chai to be extended + */ +const StreamHelper = function({ Assertion }) { + Assertion.addChainableMethod("exactly", function(expected) { + this.expected = defaults(expected).to(this.expected); + this.strictEquality = true; + }, function() { + this.strictEquality = true; + }); + + Assertion.addChainableMethod("produce", function(expected) { + this.expected = expected; + this.args = []; + }, function() { + this.args = []; + }); + + Assertion.addProperty("eventually", function() { + this.checkAllResults = true; + }); + + Assertion.addMethod("filter", function(filter) { + this.filterMethod = filter; + }); + + Assertion.addMethod("notify", function(done) { + const sink = new AssertStream(this.expected, { + filter: this.filterMethod, + tapper: this.tapper, + eventually: this.checkAllResults, + strict: this.strictEquality + }); + + this._obj.pipe(sink) // eslint-disable-line + .on("done", done) + .on("error", done); + + this.args.forEach(arg => this._obj.write(arg)); // eslint-disable-line + }); + + Assertion.addMethod("tap", function(tapper) { + this.tapper = tapper; + }); + + Assertion.addMethod("on", function(...args) { + const { write } = this._obj; // eslint-disable-line + + assert( + (args.length > 0 && isFunction(write)) || + (args.length === 0 && !isFunction(write) + ), "You can only use arguments with a writable stream."); + + this.args = args; + }); +}; + +export default StreamHelper; diff --git a/src/__tests__/AssertStreamTest.js b/src/__tests__/AssertStreamTest.js new file mode 100644 index 0000000..0577ddd --- /dev/null +++ b/src/__tests__/AssertStreamTest.js @@ -0,0 +1,114 @@ +import AssertStream from "../AssertStream"; +import sinon from "sinon"; +import { expect } from "chai"; + +describe("AssertStreamTest", function() { + it("writes to an assert stream with a value expectation, until it ends with the expected value.", function(done) { + const tapSpy = sinon.spy(); + const onEnd = sinon.spy(); + const stream = new AssertStream({ + test: "test" + }, { + tapper: tapSpy, + eventually: true + }); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function() { + expect(onEnd.callCount).to.equal(1); + expect(tapSpy.firstCall.args.shift()).to.equal("bla"); + expect(tapSpy.firstCall.args.shift()).to.equal(0); + expect(tapSpy.secondCall.args.shift()).to.eql({}); + expect(tapSpy.secondCall.args.shift()).to.equal(0); + expect(tapSpy.thirdCall.args.shift()).to.eql({ + test: "test" + }); + expect(tapSpy.thirdCall.args.shift()).to.equal(1); + expect(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) { + const onEnd = sinon.spy(); + const stream = new AssertStream(x => x.test === "test" ? 1 : 0, {}); + + stream.on("done", onEnd); + + stream.write("bla"); + stream.write({}); + stream.write({ + test: "test" + }); + + setTimeout(function() { + expect(onEnd.callCount).to.equal(1); + expect(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }, 20); + }); + + it("writes to an assert stream with a function expectation, until it ends with the expected value.", function(done) { + const tapSpy = sinon.spy(); + const stream = new AssertStream(x => x.test === "test" ? 1 : -1, { + tapper: tapSpy + }); + + stream.on("error", e => { + expect(e.message).to.equal("the messages [\"bla\"] do not match your expectations."); + expect(tapSpy.firstCall.args.shift()).to.equal("bla"); + expect(tapSpy.firstCall.args.shift()).to.equal(-1); + expect(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }); + + stream.write("bla"); + }); + + it("writes to an assert stream, that expects multiple messages", function(done) { + const tapSpy = sinon.spy(); + const stream = new AssertStream(["test1", "test2", "test3"], { + tapper: tapSpy + }); + const onEnd = function() { + expect(tapSpy.firstCall.calledWith("test1", 0)); + expect(tapSpy.secondCall.calledWith("test2", 0)); + expect(tapSpy.thirdCall.calledWith("test3", 1)); + expect(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test1"); + stream.write("test2"); + stream.write("test3"); + }); + + it("writes to an assert stream, filtering some messages", function(done) { + const tapSpy = sinon.spy(); + const stream = new AssertStream(["test1", "test2"], { + tapper: tapSpy, + filter: value => value !== "test4" + }); + + const onEnd = function() { + expect(tapSpy.firstCall.calledWith("test4", 0)); + expect(tapSpy.secondCall.calledWith("test1", 0)); + expect(tapSpy.thirdCall.calledWith("test2", 1)); + expect(stream._writableState.ended).to.equal(false); // eslint-disable-line + done(); + }; + + stream.on("done", onEnd); + stream.write("test4"); + stream.write("test1"); + stream.write("test2"); + }); +}); diff --git a/src/__tests__/ExpectStreamTest.js b/src/__tests__/ExpectStreamTest.js new file mode 100644 index 0000000..23829c5 --- /dev/null +++ b/src/__tests__/ExpectStreamTest.js @@ -0,0 +1,249 @@ +import isArray from "lodash.isarray"; +import { expect } from "../index"; +import { Readable, Transform } from "stream"; +import assert from "assert"; +import sinon from "sinon"; + +class ReadStream extends Readable { + constructor(messages = "lala") { + super({ objectMode: true }); + + this.messages = messages; + } + + _read() { + this.push( + isArray(this.messages) ? + this.messages.shift() : + this.messages + ); + } +} + +class TransformStream extends Transform { + _transform(chunk, enc, cb) { + this.push(chunk); + setTimeout(cb, 20); + } +} + + +class ReadObjectStream extends Readable { + constructor() { + super({ + objectMode: true + }); + } + + _read() { + this.push({ + test: { + test: [] + } + }); + } +} + +class TransformObjStream extends Transform { + constructor() { + super({ + objectMode: true + }); + } + + _transform(obj, enc, cb) { + this.push(obj); + setTimeout(cb, 20); + } +} + + +describe("ExpectStreamTest", function() { // eslint-disable-line + it("uses the produce assertion with a readstream, matching exactly", function(done) { + expect(new ReadStream(["lala1", "lala2", "lala3"])) + .to.produce(["lala1", "lala2", "lala3"]) + .notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality", function(done) { + expect(new ReadStream({ test: "lala" })) + .to.exactly.produce({ test: "lala" }) + .notify(done); + }); + + it("uses the produce assertion with a readstream, matching on strict equality - part2", function(done) { + expect(new ReadStream({ test: "lala" })) + .to.produce.exactly({ test: "lala" }) + .notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function(done) { + expect(new ReadStream({ test: "lala", another: "lulu" })) + .to.produce({ test: "lala" }) + .notify(done); + }); + + it("uses the produce assertion with a readstream, containing at least key test", function(done) { + expect(new ReadStream({ test: "lala" })) + .to.produce({ test: "lala", another: "lulu" }) + .notify(e => e ? done() : done(new Error("Shouldn't end up here."))); + }); + + it("uses the produce assertion with a readstream, matching exactly and fails", function(done) { + const stream = new ReadStream(["lala1", "lala", "lala3"]); + + expect(stream) + .to.produce(["lala1", "lala2", "lala3"]) + .notify(e => { + if(!e) return done(new Error("Should fail")); + + try { + expect(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch(e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching not exactly", function(done) { + const stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]); + + expect(stream) + .to.eventually.produce(["lala1", "lala2", "lala3"]) + .notify(e => { + if(e) return done(e); + + try { + expect(stream._readableState.ended).to.equal(false); // eslint-disable-line + + return done(); + } catch(e2) { + return done(e2); + } + }); + }); + + it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function(done) { + expect(new ReadStream(["lala1", "lala", "lala2", "lala3"])) + .filter(value => value !== "lala") + .to.produce(["lala1", "lala2", "lala3"]) + .notify(done); + }); + + it("uses the eventually produce assertion with a readstream, producing buffers.", function(done) { + expect(new ReadStream()).to.eventually.produce("lala").notify(done); + }); + + it("uses the produce assertion with a readstream, producing objects.", function(done) { + expect(new ReadObjectStream()).to.eventually.produce({ + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion on the readstream with buffers.", function(done) { + expect(new ReadStream()).to.eventually.produce("lulu").notify(() => done(new Error("should not finish"))); + setTimeout(() => done(), 20); + }); + + it("fails the produce assertion on the readstream with objects.", function(done) { + expect(new ReadStream()).to.eventually.produce({ + test: "test2" + }).notify(() => done(new Error("should not finish"))); + + setTimeout(() => done(), 20); + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function(done) { + expect(new TransformStream()).to.eventually.produce("huhu").on("lala", "test", "huhu").notify(done); + }); + + it("uses the produce assertion with a transformstream, producing objects.", function(done) { + expect(new TransformObjStream()).to.eventually.produce({ + test: { + test: [] + } + }).on("lala", "test", "huhu", { + test: { + test: [] + } + }).notify(done); + }); + + it("fails the produce assertion with a transformstream, producing buffers.", function(done) { + expect(new TransformStream()) + .to.eventually.produce("huhu") + .on("lala", "test") + .notify(() => done(new Error("should not finish"))); + + setTimeout(() => done(), 70); + }); + + it("fails the produce assertion with a transformstream, producing objects.", function(done) { + expect(new TransformObjStream()) + .to.eventually.produce({ + test: { + test: [] + } + }) + .on("lala", "test", { + test: { + test: 1 + } + }) + .notify(() => done(new Error("should not finish"))); + + setTimeout(() => done(), 70); + }); + + it("tries to test a readstream with input", function(done) { + try { + expect(new ReadStream()).to.eventually.produce("test").on("bla").notify(done); + } catch(e) { + assert.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("tries to test a transformstream without input", function(done) { + try { + expect(new TransformStream()).to.eventually.produce("test").on().notify(done); + } catch(e) { + assert.equal(e.message, "You can only use arguments with a writable stream."); + done(); + } + }); + + it("uses the produce assertion with a transformstream, producing buffers.", function(done) { + expect(new TransformStream()) + .to.produce(x => x === "huhu" ? 1 : -1) + .on("lala", "test", "huhu") + .notify(e => e instanceof Error ? done() : done(new Error("should throw"))); + }); + + it("taps a stream under test.", function(done) { + const spy = sinon.spy(); + + expect(new TransformStream()) + .to.eventually.produce("huhu") + .on("lala", "test", "huhu") + .tap(spy) + .notify(() => { + try { + expect(spy.callCount).to.equal(3); + expect(spy.firstCall.args.shift()).to.equal("lala"); + expect(spy.firstCall.args.shift()).to.equal(0); + expect(spy.secondCall.args.shift()).to.equal("test"); + expect(spy.secondCall.args.shift()).to.equal(0); + expect(spy.thirdCall.args.shift()).to.equal("huhu"); + expect(spy.thirdCall.args.shift()).to.equal(1); + done(); + } catch(e) { + done(e); + } + }); + }); +}); diff --git a/src/__tests__/ExpectedTest.js b/src/__tests__/ExpectedTest.js new file mode 100644 index 0000000..d7e1dcc --- /dev/null +++ b/src/__tests__/ExpectedTest.js @@ -0,0 +1,69 @@ +import Expected from "../Expected"; +import { expect } from "chai"; + +describe("Expected", function() { + it("compares a single value with the expected one", function() { + const expected = Expected.of("Test", {}); + + expect(expected.match("Test")).to.equal(1); + expect(expected.match("NotTest")).to.equal(-1); + }); + + it("compares a single value with the expected one, skipping all not matching ones", function() { + const expected = Expected.of("Test", { + eventually: true + }); + + expect(expected.match("Test")).to.equal(1); + expect(expected.match("NotTest")).to.equal(0); + }); + + it("compares a list of values with another list of values", function() { + const expected = Expected.of(["Test1", "Test2", "Test3"], {}); + + expect(expected.match("Test1")).to.equal(0); + expect(expected.match("Test2")).to.equal(0); + expect(expected.match("Test3")).to.equal(1); + }); + + it("compares a list of values with another list, skipping all non-matches", function() { + const expected = Expected.of(["Test3", "Test4", "Test5"], { + eventually: true + }); + + expect(expected.match("Test3")).to.equal(0); + expect(expected.match("Test4")).to.equal(0); + expect(expected.match("Test4")).to.equal(0); + expect(expected.match("Test5")).to.equal(1); + }); + + it("compares a list of values with a filter", function() { + const expected = Expected.of(["Test3", "Test4", "Test5"], { + filter: value => value !== "Test2" + }); + + expect(expected.match("Test3")).to.equal(0); + expect(expected.match("Test2")).to.equal(0); + expect(expected.match("Test4")).to.equal(0); + expect(expected.match("Test5")).to.equal(1); + }); + + it("compares a single of values with a filter", function() { + const expected = Expected.of("Test3", { + filter: value => value !== "Test2" + }); + + expect(expected.match("Test2")).to.equal(0); + expect(expected.match("Test3")).to.equal(1); + }); + + it("compares with a function", function() { + const expected = Expected.of(value => value === "Test3" ? 1 : -1, { + filter: value => value !== "Test2" + }); + + expect(expected.match("Test1")).to.equal(-1); + expect(expected.match("Test2")).to.equal(0); + expect(expected.match("Test3")).to.equal(1); + }); +}); diff --git a/src/examples/test.js b/src/examples/test.js new file mode 100644 index 0000000..e69de29 diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..5d38680 --- /dev/null +++ b/src/index.js @@ -0,0 +1,7 @@ +import StreamHelper from "./StreamHelper"; + +const chai = require("chai"); + +chai.use(StreamHelper); + +module.exports = chai;