UNPKG

@zoroaster/assert

Version:

The Assertion Library For Zoroaster Context Testing Framework Including Deep Equal & Assert Throws.

25 lines 1.41 kB
{ "_contexttesting.Config": { "link": "https://gitlab.com/artdeco/contexttesting/assert#type-config", "description": "Options for the program." }, "undefinedassert": { "link": "https://gitlab.com/artdeco/contexttesting/assert#assertarg1-stringarg2-boolean-void" }, "_assertThrows.assertThrows": { "link": "https://gitlab.com/artdeco/contexttesting/assert#async-assertthrowsconfig-_assertthrowsconfig-void", "description": "Assert 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 ```" }, "_assertThrows.Assertion": { "link": "https://gitlab.com/artdeco/contexttesting/assert#type-assertion", "description": "An assertion to perform." }, "_assertThrows.Config": { "link": "https://gitlab.com/artdeco/contexttesting/assert#type-config", "description": "Parameters to the `assert-throws` method." }, "_contexttesting.deepEqual": { "link": "https://gitlab.com/artdeco/contexttesting/assert#deepequalactual-expected-message-string-void", "description": "Calls `assert.deepStrictEqual` and then creates a visual representation of the difference between objects if it throws." } }