This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html><metacharset="UTF-8"><metahttp-equiv="Content-Language"content="en"/><title>goog.labs.testing.Matcher</title><linkhref="dossier.css"rel="stylesheet"type="text/css"><divid="main-wrapper"><inputtype="checkbox"id="sidenav-toggle"/><main><header><h1>Interface goog.labs.testing.Matcher</h1><aclass="source"href="source/lib/goog/labs/testing/matcher.js.src.html#l29">code »</a></header><section><p>A matcher object to be used in assertThat statements.</section><divid="visibility-controls"><b>Show:</b><labelfor="show-public"><span><inputtype="checkbox"id="show-public"checked/></span>Public</label><labelfor="show-protected"><span><inputtype="checkbox"id="show-protected"/></span>Protected</label><labelfor="show-private"><span><inputtype="checkbox"id="show-private"/></span>Private</label></div><sectionid="instance-methods"><h2>Instance Methods</h2><divclass="wrap-details public"><div><detailsclass="function"><summary><div><aclass="source"href="source/lib/goog/labs/testing/matcher.js.src.html#l50">code »</a><spanclass="member"><aname="describe">describe</a><spanclass="args">( value, opt_description )</span>⇒<codeclass="type"><ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></span></div><p>Describes why the matcher failed.</summary><divclass="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <codeclass="type">*</code><dd>The value that didn't match.<dt>opt_description: <codeclass="type"><ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>A partial description to which the reason
will be appended.</dl><tr><th>Returns<tr><td><dl>Description of why the matcher failed.</dl></table></div></details></div></div><divclass="wrap-details public"><div><detailsclass="function"><summary><div><aclass="source"href="source/lib/goog/labs/testing/matcher.js.src.html#l38">code »</a><spanclass="member"><aname="matches">matches</a><spanclass="args">( value )</span>⇒<codeclass="type"><ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Determines whether a value matches the constraints of the match.</summary><divclass="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>value: <codeclass="type">*</code><dd>The object to match.</dl><tr><th>Returns<tr><td><dl>Whether the input value matches this matcher.</dl></table></div></details></div></div></section><sectionid="static-functions"><h2>Global Functions</h2><divclass="wrap-details public"><div><detailsclass="function"><summary><div><aclass="source"href="source/lib/goog/labs/testing/matcher.js.src.html#l61">code »</a><spanclass="member"><aname="goog.labs.testing.Matcher.makeMatcher">goog.labs.testing.Matcher.makeMatcher</a><spanclass="args">( matchesFunction, opt_describeFunction )</span>⇒<codeclass="type">!<ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code></span></div><p>Generates a Matcher from the ‘matches’ and ‘describe’ functions passed in.</summary><divclass="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>matchesFunction: <codeclass="type">!<ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a></code><dd>The ‘matches’ function.<dt>opt_describeFunction: <codeclass="type"><ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function">Function</a>=</code><dd>The ‘describe’ function.</dl><tr><th>Returns<tr><td><dl>The custom matcher.</dl></table></div></details></div></div></section></main><navid="topnav"><div><divid="menubutton"><labelfor="sidenav-toggle">Menu</label></div><formid="searchbox"><div><inputtype="search"placeholder="Search"tabindex="1"></div></form></div></nav><navid="sidenav"><inputtype="checkbox"id="sidenav-types-ctrl"/><inputtype="checkbox"id="sidenav-files-ctrl"/><inputtype="checkbox"id="sidenav-modules-ctrl"/><aid="sidenav-overview"><div><h4>Overview</h4></div></a><divid="sidenav-types"><labelfor="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><divid="sidenav-modules"><labelfor="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><divid="sidenav-files"><labelfor="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><ahref="license.html"><div><h4>License</h4></div></a></nav><divid="push-footer"></div></div><footer><ahref="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><scriptsrc="types.js"></script><scriptsrc="dossier.js"></script>