siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
1 lines • 25.7 kB
JavaScript
Ext.data.JsonP.Siesta_Test_BDD_Expectation({"tagname":"class","name":"Siesta.Test.BDD.Expectation","autodetected":{},"files":[{"filename":"Expectation.js","href":"Expectation.html#Siesta-Test-BDD-Expectation"}],"members":[{"name":"not","tagname":"property","owner":"Siesta.Test.BDD.Expectation","id":"property-not","meta":{}},{"name":"toBe","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBe","meta":{}},{"name":"toBeCloseTo","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeCloseTo","meta":{}},{"name":"toBeDefined","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeDefined","meta":{}},{"name":"toBeFalsy","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeFalsy","meta":{}},{"name":"toBeGreaterThan","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeGreaterThan","meta":{}},{"name":"toBeLessThan","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeLessThan","meta":{}},{"name":"toBeNaN","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeNaN","meta":{}},{"name":"toBeNull","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeNull","meta":{}},{"name":"toBeTruthy","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeTruthy","meta":{}},{"name":"toBeUndefined","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toBeUndefined","meta":{}},{"name":"toContain","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toContain","meta":{}},{"name":"toEqual","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toEqual","meta":{}},{"name":"toHaveBeenCalled","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toHaveBeenCalled","meta":{}},{"name":"toHaveBeenCalledWith","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toHaveBeenCalledWith","meta":{}},{"name":"toMatch","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toMatch","meta":{}},{"name":"toThrow","tagname":"method","owner":"Siesta.Test.BDD.Expectation","id":"method-toThrow","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-Siesta.Test.BDD.Expectation","short_doc":"This class is the central point for writing assertions in BDD style. ...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Expectation.html#Siesta-Test-BDD-Expectation' target='_blank'>Expectation.js</a></div></pre><div class='doc-contents'><p>This class is the central point for writing assertions in BDD style. Instances of this class can be generated with the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a>\nmethod. Then, calling some method on the instance will create a new assertion in the test.</p>\n\n<p><strong>Note</strong>, that to negate any assertion, you can use a special property <a href=\"#!/api/Siesta.Test.BDD.Expectation-property-not\" rel=\"Siesta.Test.BDD.Expectation-property-not\" class=\"docClass\">not</a>, that contains an expectation instance with the opposite meaning.</p>\n\n<p>For example:</p>\n\n<pre><code>t.expect(1).toBe(1)\nt.expect(1).not.toBe(2)\n\nt.expect('Foo').toContain('oo')\nt.expect('Foo').not.toContain('bar')\n</code></pre>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-not' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-property-not' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-property-not' class='name expandable'>not</a> : <a href=\"#!/api/Siesta.Test.BDD.Expectation\" rel=\"Siesta.Test.BDD.Expectation\" class=\"docClass\">Siesta.Test.BDD.Expectation</a><span class=\"signature\"></span></div><div class='description'><div class='short'><p>Another expectation instance with the negated meaning.</p>\n</div><div class='long'><p>Another expectation instance with the negated meaning.</p>\n</div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-toBe' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBe' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBe' class='name expandable'>toBe</a>( <span class='pre'>expectedValue</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion compares the value provided to the expect method with the expectedValue argument. ...</div><div class='long'><p>This assertion compares the value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method with the <code>expectedValue</code> argument.\nComparison is done with <code>===</code> operator, so it should be used <strong>only with the primitivies</strong> - numbers, strings, booleans etc.</p>\n\n<p>To deeply compare Date, Arrays and JSON objects in general, use <a href=\"#!/api/Siesta.Test.BDD.Expectation-method-toEqual\" rel=\"Siesta.Test.BDD.Expectation-method-toEqual\" class=\"docClass\">toEqual</a> method.</p>\n\n<p>This method works correctly with the placeholders generated with <a href=\"#!/api/Siesta.Test-method-any\" rel=\"Siesta.Test-method-any\" class=\"docClass\">any</a> method</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedValue</span> : Primitive<div class='sub-desc'><p>An expected value</p>\n</div></li></ul></div></div></div><div id='method-toBeCloseTo' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeCloseTo' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeCloseTo' class='name expandable'>toBeCloseTo</a>( <span class='pre'>expectedValue, [precision]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when the number provided to the expect method is approximately equal\nthe given number. ...</div><div class='long'><p>This assertion passes, when the number provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is approximately equal\nthe given number. The proximity can be defined as the <code>precision</code> argument</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedValue</span> : Number<div class='sub-desc'><p>The number to compare with</p>\n</div></li><li><span class='pre'>precision</span> : Number (optional)<div class='sub-desc'><p>The number of digits after dot (comma) that should be same in both numbers.</p>\n<p>Defaults to: <code>2</code></p></div></li></ul></div></div></div><div id='method-toBeDefined' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeDefined' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeDefined' class='name expandable'>toBeDefined</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is not the undefined value. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is not the <code>undefined</code> value.</p>\n</div></div></div><div id='method-toBeFalsy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeFalsy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeFalsy' class='name expandable'>toBeFalsy</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is \"falsy\" - evaluates to false. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is \"falsy\" - evaluates to <code>false</code>.\nFor example - empty strings, number 0, <code>null</code>, <code>undefined</code>, etc.</p>\n</div></div></div><div id='method-toBeGreaterThan' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeGreaterThan' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeGreaterThan' class='name expandable'>toBeGreaterThan</a>( <span class='pre'>expectedValue</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when the number provided to the expect method is greater than the\nexpected number. ...</div><div class='long'><p>This assertion passes, when the number provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is greater than the\nexpected number.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedValue</span> : Number<div class='sub-desc'><p>The number to compare with</p>\n</div></li></ul></div></div></div><div id='method-toBeLessThan' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeLessThan' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeLessThan' class='name expandable'>toBeLessThan</a>( <span class='pre'>expectedValue</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when the number provided to the expect method is less than the\nexpected number. ...</div><div class='long'><p>This assertion passes, when the number provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is less than the\nexpected number.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedValue</span> : Number<div class='sub-desc'><p>The number to compare with</p>\n</div></li></ul></div></div></div><div id='method-toBeNaN' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeNaN' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeNaN' class='name expandable'>toBeNaN</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is NaN. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is <code>NaN</code>.</p>\n</div></div></div><div id='method-toBeNull' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeNull' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeNull' class='name expandable'>toBeNull</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is null. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is <code>null</code>.</p>\n</div></div></div><div id='method-toBeTruthy' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeTruthy' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeTruthy' class='name expandable'>toBeTruthy</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is \"truthy\" - evaluates to true. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is \"truthy\" - evaluates to <code>true</code>.\nFor example - non empty strings, numbers except the 0, objects, arrays etc.</p>\n</div></div></div><div id='method-toBeUndefined' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toBeUndefined' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toBeUndefined' class='name expandable'>toBeUndefined</a>( <span class='pre'>value</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when value provided to the expect method is the undefined value. ...</div><div class='long'><p>This assertion passes, when value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is the <code>undefined</code> value.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>value</span> : Object<div class='sub-desc'></div></li></ul></div></div></div><div id='method-toContain' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toContain' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toContain' class='name expandable'>toContain</a>( <span class='pre'>element</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes in 2 cases:\n\n1) When the value provided to the expect method is a string, and it contains a pas...</div><div class='long'><p>This assertion passes in 2 cases:</p>\n\n<p>1) When the value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is a string, and it contains a passed substring.\n2) When the value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method is an array (or array-like), and it contains a passed element.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>element</span> : String/Mixed<div class='sub-desc'><p>The element of the array or a sub-string</p>\n</div></li></ul></div></div></div><div id='method-toEqual' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toEqual' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toEqual' class='name expandable'>toEqual</a>( <span class='pre'>expectedValue</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion compares the value provided to the expect method with the expectedValue argument. ...</div><div class='long'><p>This assertion compares the value provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method with the <code>expectedValue</code> argument.</p>\n\n<p>Comparison works for Date, Array, and JSON objects in general. It is performed \"deeply\".\nRight now the values should not contain cyclic references.</p>\n\n<p>This method works correctly with the placeholders generated with <a href=\"#!/api/Siesta.Test-method-any\" rel=\"Siesta.Test-method-any\" class=\"docClass\">any</a> method</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedValue</span> : Mixed<div class='sub-desc'><p>An expected value</p>\n</div></li></ul></div></div></div><div id='method-toHaveBeenCalled' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toHaveBeenCalled' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toHaveBeenCalled' class='name expandable'>toHaveBeenCalled</a>( <span class='pre'>expectedNumber</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, if a spy, provided to the expect method have been\ncalled expected number of times. ...</div><div class='long'><p>This assertion passes, if a spy, provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method have been\ncalled expected number of times. The expected number of times can be provided as the 1st argument and by default\nis 1.</p>\n\n<p>One can also provide the function, spied on, to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method.</p>\n\n<p>Examples:</p>\n\n<pre><code>var spy = t.spyOn(obj, 'process')\n\n// call the method 2 times\nobj.process()\nobj.process()\n\n// following 2 calls are equivalent\nt.expect(spy).toHaveBeenCalled();\nt.expect(obj.process).toHaveBeenCalled();\n\n// one can also use exact number of calls or comparison operators\nt.expect(obj.process).toHaveBeenCalled(2);\nt.expect(obj.process).toHaveBeenCalled('>1');\nt.expect(obj.process).toHaveBeenCalled('<=3');\n</code></pre>\n\n<p>See also <a href=\"#!/api/Siesta.Test.BDD.Expectation-method-toHaveBeenCalledWith\" rel=\"Siesta.Test.BDD.Expectation-method-toHaveBeenCalledWith\" class=\"docClass\">toHaveBeenCalledWith</a></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>expectedNumber</span> : Number/String<div class='sub-desc'><p>Expected number of calls. Can be either a number, specifying the exact\nnumber of calls, or a string. In the latter case one can include a comparison operator in front of the number.</p>\n</div></li></ul></div></div></div><div id='method-toHaveBeenCalledWith' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toHaveBeenCalledWith' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toHaveBeenCalledWith' class='name expandable'>toHaveBeenCalledWith</a>( <span class='pre'>arg1, arg2, argN</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, if a spy, provided to the expect method have been\ncalled at least once with the specified argu...</div><div class='long'><p>This assertion passes, if a spy, provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method have been\ncalled at least once with the specified arguments.</p>\n\n<p>One can also provide the function, spied on, to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method.</p>\n\n<p>One can use placeholders, generated with the <a href=\"#!/api/Siesta.Test.BDD-method-any\" rel=\"Siesta.Test.BDD-method-any\" class=\"docClass\">any</a> method to verify the arguments.</p>\n\n<p>Example:</p>\n\n<pre><code>var spy = t.spyOn(obj, 'process')\n\n// call the method 2 times with different arguments\nobj.build('development', '1.0.0')\nobj.build('release', '1.0.1')\n\nt.expect(spy).toHaveBeenCalledWith('development', '1.0.0');\n// or\nt.expect(obj.process).toHaveBeenCalledWith('development', t.any(String));\n</code></pre>\n\n<p>See also <a href=\"#!/api/Siesta.Test.BDD.Expectation-method-toHaveBeenCalled\" rel=\"Siesta.Test.BDD.Expectation-method-toHaveBeenCalled\" class=\"docClass\">toHaveBeenCalled</a></p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>arg1</span> : Object<div class='sub-desc'><p>Argument to a call</p>\n</div></li><li><span class='pre'>arg2</span> : Object<div class='sub-desc'><p>Argument to a call</p>\n</div></li><li><span class='pre'>argN</span> : Object<div class='sub-desc'><p>Argument to a call</p>\n</div></li></ul></div></div></div><div id='method-toMatch' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toMatch' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toMatch' class='name expandable'>toMatch</a>( <span class='pre'>regexp</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes, when the string provided to the expect method matches the regular expression. ...</div><div class='long'><p>This assertion passes, when the string provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method matches the regular expression.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>regexp</span> : RegExp<div class='sub-desc'><p>The regular expression to match the string against</p>\n</div></li></ul></div></div></div><div id='method-toThrow' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.BDD.Expectation'>Siesta.Test.BDD.Expectation</span><br/><a href='source/Expectation.html#Siesta-Test-BDD-Expectation-method-toThrow' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.BDD.Expectation-method-toThrow' class='name expandable'>toThrow</a>( <span class='pre'></span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>This assertion passes when the function provided to the expect method, throws an exception\nduring its execution. ...</div><div class='long'><p>This assertion passes when the function provided to the <a href=\"#!/api/Siesta.Test-method-expect\" rel=\"Siesta.Test-method-expect\" class=\"docClass\">expect</a> method, throws an exception\nduring its execution.</p>\n\n<p>t.expect(function(){\n throw \"oopsie\";\n}).toThrow());</p>\n</div></div></div></div></div></div></div>","meta":{}});