{"_id":"@zoroaster/assert","_rev":"300329","name":"@zoroaster/assert","description":"The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:08:04.000Z","created":"2019-05-01T22:39:34.018Z","1.1.1":"2020-04-07T12:26:02.900Z","1.0.2":"2019-05-03T00:13:29.193Z","1.0.1":"2019-05-01T22:44:25.178Z","1.0.0":"2019-05-01T22:39:34.018Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"https://gitlab.com/contexttesting/assert.git"},"versions":{"1.1.1":{"name":"@zoroaster/assert","version":"1.1.1","description":"The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.","main":"compile/index.js","scripts":{"scripts":"scripts"},"repository":{"type":"git","url":"https://gitlab.com/contexttesting/assert.git"},"typedefs":"typedefs.json","keywords":["assert","zoroaster","context","testing","deep equal","color","throw","throws","catch"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"AGPL-3.0","bugs":{"url":"https://gitlab.com/artdeco/issues/-/issues","email":"incoming+artdeco-issues-17934443-issue-@incoming.gitlab.com"},"homepage":"https://www.contexttesting.com/","devDependencies":{"@artdeco/scripts.json":"^1.0.1","@zoroaster/assert-throws":"^3.4.0","@zoroaster/deep-equal":"^1.1.1","alamode":"^3.7.1","documentary":"^1.38.1","eslint-config-artdeco":"^1.0.1","yarn-s":"^1.2.3","zoroaster":"^4.3.0"},"publishConfig":{"registry":"https://registry.npmjs.com"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@zoroaster/assert@1.1.1","dist":{"shasum":"bfdf5cfdf31ad4c529d28278f05558cee8a7eaff","size":16042,"noattachment":false,"key":"/@zoroaster/assert/-/@zoroaster/assert-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/@zoroaster/assert/download/@zoroaster/assert-1.1.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assert_1.1.1_1586262362735_0.8078519171862031"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:16.706Z","publish_time":1586262362900,"_cnpm_publish_time":1586262362900},"1.0.2":{"name":"@zoroaster/assert","version":"1.0.2","description":"The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.","main":"depack/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","depack":"GOOGLE_CLOSURE_COMPILER=/Volumes/backup/closure-compiler/target/closure-compiler-1.0-SNAPSHOT.jar depack src/depack.js -l -a -p -o depack -s -O 2017","doc":"NODE_DEBUG=doc doc -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"typal depack/index.js -c","build":"yarn-s d b doc","e":"alanode"},"repository":{"type":"git","url":"git://github.com/contexttesting/assert.git"},"keywords":["assert","zoroaster","context","testing","deep equal","color","throw","throws","catch"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/contexttesting/assert/issues"},"homepage":"https://github.com/contexttesting/assert#readme","devDependencies":{"@zoroaster/deep-equal":"^1.0.1","alamode":"^2.1.0","assert-throws":"^3.3.0","documentary":"^1.26.5","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.13.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@zoroaster/assert@1.0.2","dist":{"shasum":"8ffe2ebb10c81d570d4965080f942af688321a1f","size":6560,"noattachment":false,"key":"/@zoroaster/assert/-/@zoroaster/assert-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/@zoroaster/assert/download/@zoroaster/assert-1.0.2.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assert_1.0.2_1556842409035_0.34186038535885266"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:15.069Z","publish_time":1556842409193,"_cnpm_publish_time":1556842409193},"1.0.1":{"name":"@zoroaster/assert","version":"1.0.1","description":"The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.","main":"depack/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","depack":"GOOGLE_CLOSURE_COMPILER=/Volumes/backup/closure-compiler/target/closure-compiler-1.0-SNAPSHOT.jar depack src/depack.js -l -a -p -o depack -s -O 2017","doc":"NODE_DEBUG=doc doc -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"typal depack/index.js -c","build":"yarn-s d b doc","e":"alanode"},"repository":{"type":"git","url":"git://github.com/contexttesting/assert.git"},"keywords":["assert","zoroaster","context","testing","deep equal","color","throw","throws","catch"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/contexttesting/assert/issues"},"homepage":"https://github.com/contexttesting/assert#readme","devDependencies":{"@zoroaster/deep-equal":"^1.0.1","alamode":"^2.1.0","assert-throws":"^3.3.0","documentary":"^1.26.5","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.13.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@zoroaster/assert@1.0.1","dist":{"shasum":"e34ec5d7814ea4adc338f9b495875cc49e197719","size":14162,"noattachment":false,"key":"/@zoroaster/assert/-/@zoroaster/assert-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/@zoroaster/assert/download/@zoroaster/assert-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assert_1.0.1_1556750664986_0.4779277738888825"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:13.432Z","publish_time":1556750665178,"_cnpm_publish_time":1556750665178},"1.0.0":{"name":"@zoroaster/assert","version":"1.0.0","description":"The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.","main":"depack/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","spec":"yarn t test/spec","mask":"yarn t test/mask","test-build":"ALAMODE_ENV=test-build yarn test","lint":"eslint .","depack":"GOOGLE_CLOSURE_COMPILER=/Volumes/backup/closure-compiler/target/closure-compiler-1.0-SNAPSHOT.jar depack src/depack.js -l -a -p -o depack -s -O 2017","doc":"NODE_DEBUG=doc doc -o README.md","b":"alamode src -o build -s","d":"yarn-s d1","d1":"typal depack/index.js -c","build":"yarn-s d b doc","e":"alanode"},"repository":{"type":"git","url":"git://github.com/contexttesting/assert.git"},"keywords":["assert","zoroaster","context","testing","deep equal","color","throw","throws","catch"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/contexttesting/assert/issues"},"homepage":"https://github.com/contexttesting/assert#readme","devDependencies":{"@zoroaster/deep-equal":"^1.0.1","alamode":"^2.1.0","assert-throws":"^3.3.0","documentary":"^1.26.5","eslint-config-artdeco":"1.0.1","yarn-s":"1.1.0","zoroaster":"^3.13.0"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@zoroaster/assert@1.0.0","dist":{"shasum":"e764c4ab093451286ca47a3ac34f83c14bafd64b","size":14136,"noattachment":false,"key":"/@zoroaster/assert/-/@zoroaster/assert-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@zoroaster/assert/download/@zoroaster/assert-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/assert_1.0.0_1556750373824_0.9140489720943428"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:11.813Z","publish_time":1556750374018,"_cnpm_publish_time":1556750374018}},"readme":"<div align=\"center\">\n\n# @zoroaster/assert\n\n[![npm version](https://badge.fury.io/js/%40zoroaster%2Fassert.svg)](https://www.npmjs.com/package/@zoroaster/assert)\n<a href=\"https://gitlab.com/artdeco/contexttesting/assert/-/commits/master\">\n  <img src=\"https://gitlab.com/artdeco/contexttesting/assert/badges/master/pipeline.svg\"\n    alt=\"Pipeline Badge\">\n</a>\n</div>\n\n`@zoroaster/assert` is An Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.\n\n```sh\nyarn add -D @zoroaster/assert\n```\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`deepEqual(actual: ?, expected: ?, message=: string): void`](#deepequalactual-expected-message-string-void)\n- [`async assertThrows(config: _assertThrows.Config): void`](#async-assertthrowsconfig-_assertthrowsconfig-void)\n  * [`_assertThrows.Assertion`](#type-_assertthrowsassertion)\n  * [`_assertThrows.Config`](#type-_assertthrowsconfig)\n- [Copyright & License](#copyright--license)\n\n<div align=\"center\"><a href=\"#table-of-contents\">\n  <img src=\"/.documentary/section-breaks/0.svg?sanitize=true\">\n</a></div>\n\n## API\n\nThe package is available by importing its named functions:\n\n```js\nimport deepEqual,\n  throws,\n  assert,\n  equal,\n  ok,\n} from '@zoroaster/assert'\n```\n\n<div align=\"center\"><a href=\"#table-of-contents\">\n  <img src=\"/.documentary/section-breaks/1.svg?sanitize=true\">\n</a></div>\n\n## <code><ins>deepEqual</ins>(</code><sub><br/>&nbsp;&nbsp;`actual: ?,`<br/>&nbsp;&nbsp;`expected: ?,`<br/>&nbsp;&nbsp;`message=: string,`<br/></sub><code>): <i>void</i></code>\nCalls `assert.deepStrictEqual` and then creates a visual representation of the difference between objects if it throws.\n\n - <kbd><strong>actual*</strong></kbd> <em><code>?undefined</code></em>: The actual value.\n - <kbd><strong>expected*</strong></kbd> <em><code>?undefined</code></em>: The expected value.\n - <kbd>message</kbd> <em>`string`</em> (optional): The message with which to fail if the assertion didn't succeed.\n\n<div align=\"center\"><a href=\"#table-of-contents\">\n  <img src=\"/.documentary/section-breaks/2.svg?sanitize=true\">\n</a></div>\n\n## <code>async <ins>assertThrows</ins>(</code><sub><br/>&nbsp;&nbsp;`config: _assertThrows.Config,`<br/></sub><code>): <i>void</i></code>\nAssert that a function throws and check the thrown error properties.\n  ```js\n  await throws({\n    fn: method,\n    args: ['test', true],\n    message: /An error occurred:/, // regex\n    code: 'ENOTEST',               // string\n    stack(stack) {                 // function\n      equal(stack.length, 2)\n    }\n  })\n  ```\n\n\n - <kbd><strong>config*</strong></kbd> <em><code><a href=\"#type-_assertthrowsconfig\" title=\"Parameters to the `assert-throws` method.\">_assertThrows.Config</a></code></em>: Parameters to the `assert-throws` method.\n\n<code>!(string \\| RegExp \\| !Function)</code> <strong><a name=\"type-_assertthrowsassertion\">`_assertThrows.Assertion`</a></strong>: An assertion to perform.\n\n\n<strong><a name=\"type-_assertthrowsconfig\">`_assertThrows.Config`</a></strong>: Parameters to the `assert-throws` method.\n\n\n|  Name   |                                                     Type                                                     |                                     Description                                      |\n| ------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |\n| __fn*__ | <em>!Function</em>                                                                                           | The function to test, either sync or async.                                          |\n| args    | <em>(* \\| !Array&lt;*&gt;)</em>                                                                              | The arguments or single argument to pass to the function.                            |\n| context | <em>*</em>                                                                                                   | The context in which to execute the function. Global context will be set by default. |\n| message | <em><a href=\"#type-_assertthrowsassertion\" title=\"An assertion to perform.\">_assertThrows.Assertion</a></em> | A string, regex, or function to test the message.                                    |\n| code    | <em><a href=\"#type-_assertthrowsassertion\" title=\"An assertion to perform.\">_assertThrows.Assertion</a></em> | A string, regex, or function to test the code.                                       |\n| stack   | <em><a href=\"#type-_assertthrowsassertion\" title=\"An assertion to perform.\">_assertThrows.Assertion</a></em> | A string, regex, or function to test the stack.                                      |\n| prop    | <em><a href=\"#type-_assertthrowsassertion\" title=\"An assertion to perform.\">_assertThrows.Assertion</a></em> | A string, regex, or function to test any other property of the error.                |\n| error   | <em>Error</em>                                                                                               | An error to perform strict comparison against.                                       |\n\n<div align=\"center\"><a href=\"#table-of-contents\">\n  <img src=\"/.documentary/section-breaks/3.svg?sanitize=true\">\n</a></div>\n\n## Copyright & License\n\nGNU Affero General Public License v3.0\n\n<table>\n  <tr>\n    <th>\n      <a href=\"https://www.artd.eco\">\n        <img width=\"100\" src=\"https://gitlab.com/uploads/-/system/group/avatar/7454762/artdeco.png\"\n          alt=\"Art Deco\">\n      </a>\n    </th>\n    <th>© <a href=\"https://www.artd.eco\">Art Deco™</a> for <a href=\"https://www.contexttesting.com\">ContextTesting</a> 2020</th>\n    <th>\n      <a href=\"https://www.contexttesting.com\">\n        <img src=\"https://avatars1.githubusercontent.com/u/44418436?s=100\" width=\"100\" alt=\"ContextTesting\">\n      </a>\n    </th>\n    <th><a href=\"LICENSE\"><img src=\".documentary/agpl-3.0.svg\" alt=\"AGPL-3.0\"></a></th>\n  </tr>\n</table>\n\n<div align=\"center\"><a href=\"#table-of-contents\">\n  <img src=\"/.documentary/section-breaks/-1.svg?sanitize=true\">\n</a></div>","_attachments":{},"homepage":"https://www.contexttesting.com/","bugs":{"url":"https://gitlab.com/artdeco/issues/-/issues","email":"incoming+artdeco-issues-17934443-issue-@incoming.gitlab.com"},"license":"AGPL-3.0"}