Skip to content

Commit

Permalink
deploy: 2cd3ae5
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Nov 20, 2024
1 parent eeed0ef commit 65b1b87
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion functions/testPeggy.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">starts</span>: <a href="../interfaces/PeggyTestOptions.html" class="tsd-signature-type tsd-kind-interface">PeggyTestOptions</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="testPeggy.html#testPeggy.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>List of tests. Ensure you have at
least one validInput and at least one invalidInput.</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">opts</span>: <a href="../interfaces/TestPeggyOptions.html" class="tsd-signature-type tsd-kind-interface">TestPeggyOptions</a></span><div class="tsd-comment tsd-typography"><p>Options for processing.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/TestCounts.html" class="tsd-signature-type tsd-kind-interface">TestCounts</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/peggyjs/coverage/blob/b2d78ac868b8b8496d5daba7fe23849ca1b212eb/lib/index.js#L249">lib/index.js:249</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/peggyjs/coverage">GitHub</a><a href="http://peggyjs.github.io/coverage/">Documentation</a></nav><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@peggyjs/coverage - v1.3.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/TestCounts.html" class="tsd-signature-type tsd-kind-interface">TestCounts</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/peggyjs/coverage/blob/2cd3ae55fef7938194af0bf992ac5dab3da85a95/lib/index.js#L249">lib/index.js:249</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/peggyjs/coverage">GitHub</a><a href="http://peggyjs.github.io/coverage/">Documentation</a></nav><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@peggyjs/coverage - v1.3.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<a id="md:installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#md:installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="sh"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-3">--dev</span><span class="hl-1"> </span><span class="hl-2">@peggyjs/coverage</span>
</code><button type="button">Copy</button></pre>

<a id="md:api" class="tsd-anchor"></a><h2 class="tsd-anchor-link">API<a href="#md:api" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Pass in the <code>file:</code> URL for the JavaScript output from Peggy:</p>
<a id="md:api" class="tsd-anchor"></a><h2 class="tsd-anchor-link">API<a href="#md:api" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Full <a href="https://peggyjs.github.io/coverage/" target="_blank" class="external">documentation</a> is available.</p>
<p>Pass in the <code>file:</code> URL for the JavaScript output from Peggy:</p>
<pre><code class="js"><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-0">testPeggy</span><span class="hl-1">(</span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">URL</span><span class="hl-1">(</span><span class="hl-2">&quot;../lib/parser.js&quot;</span><span class="hl-1">, </span><span class="hl-4">import</span><span class="hl-1">.</span><span class="hl-5">meta</span><span class="hl-1">.</span><span class="hl-5">url</span><span class="hl-1">), [</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">validInput:</span><span class="hl-1"> </span><span class="hl-2">&quot;foo&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">validResult:</span><span class="hl-1"> [</span><span class="hl-2">&quot;f&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;o&quot;</span><span class="hl-1">, </span><span class="hl-2">&quot;o&quot;</span><span class="hl-1">],</span><br/><span class="hl-1"> </span><span class="hl-5">invalidInput:</span><span class="hl-1"> </span><span class="hl-2">&quot;bar&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">]);</span>
</code><button type="button">Copy</button></pre>

Expand All @@ -19,7 +20,7 @@
<pre><code class="ts"><span class="hl-4">export</span><span class="hl-1"> </span><span class="hl-3">type</span><span class="hl-1"> </span><span class="hl-6">PeggyTestOptions</span><span class="hl-1">&lt;</span><span class="hl-6">T</span><span class="hl-1">&gt; = {</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * Which valid start rule to use? Default: grammar default start rule.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">startRule</span><span class="hl-1">?: </span><span class="hl-6">string</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * If specified, check this against the startRule.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">validInput</span><span class="hl-1">?: </span><span class="hl-6">string</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * What result should startRule return for validInput? Default:</span><br/><span class="hl-7"> * validInput.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">validResult</span><span class="hl-1">?: </span><span class="hl-6">T</span><span class="hl-1"> | ((</span><span class="hl-5">res</span><span class="hl-1">: </span><span class="hl-6">T</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-6">any</span><span class="hl-1">) | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * If specified, ensure that the grammar fails on this input.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">invalidInput</span><span class="hl-1">?: </span><span class="hl-6">string</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * Expected peg$maxFailPos.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">peg$maxFailPos</span><span class="hl-1">?: </span><span class="hl-6">number</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * What to append to validInput to make it invalid, so that library mode</span><br/><span class="hl-7"> * will return a prefix match.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">invalid</span><span class="hl-1">?: </span><span class="hl-6">string</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * If any test has this set to true, only run the tests with this set to</span><br/><span class="hl-7"> * true.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">only</span><span class="hl-1">?: </span><span class="hl-6">boolean</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * If true, skip this test.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">skip</span><span class="hl-1">?: </span><span class="hl-6">boolean</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * Extra options to pass to parse(), overriding whatever else this library</span><br/><span class="hl-7"> * would have otherwise used.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">options</span><span class="hl-1">?: (</span><span class="hl-3">import</span><span class="hl-1">(</span><span class="hl-2">&quot;peggy&quot;</span><span class="hl-1">).</span><span class="hl-6">ParserOptions</span><span class="hl-1"> &amp; </span><span class="hl-6">ExtraParserOptions</span><span class="hl-1">) | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-4">export</span><span class="hl-1"> </span><span class="hl-3">type</span><span class="hl-1"> </span><span class="hl-6">ExtraParserOptions</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * In the augmented code only, use this function as the start rule rather</span><br/><span class="hl-7"> * than the default. This gives access to functions that are NOT valid</span><br/><span class="hl-7"> * start rules for internal testing.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">peg$startRuleFunction</span><span class="hl-1">?: </span><span class="hl-6">string</span><span class="hl-1"> | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">/**</span><br/><span class="hl-7"> * Number of times for each of the given rules to succeed before they</span><br/><span class="hl-7"> * fail. Only applies in the augmented code.</span><br/><span class="hl-7"> */</span><br/><span class="hl-1"> </span><span class="hl-5">peg$failAfter</span><span class="hl-1">?: {</span><br/><span class="hl-1"> [</span><span class="hl-5">ruleName</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">]: </span><span class="hl-6">number</span><span class="hl-1">;</span><br/><span class="hl-1"> } | </span><span class="hl-6">undefined</span><span class="hl-1">;</span><br/><span class="hl-1">};</span>
</code><button type="button">Copy</button></pre>

<a id="md:runtime-support" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Runtime support<a href="#md:runtime-support" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Only tested on nodejs 18, 20, and 21. Only tested in es6 mode for now.</p>
<a id="md:runtime-support" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Runtime support<a href="#md:runtime-support" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Only tested on nodejs 18, 20, 22, and 23. Only tested in es6 mode.</p>
<hr>
<p><a href="https://github.com/peggyjs/coverage/actions/workflows/node.js.yml" target="_blank" class="external"><img src="https://github.com/peggyjs/coverage/actions/workflows/node.js.yml/badge.svg" alt="Tests"></a>
<a href="https://codecov.io/gh/peggyjs/coverage" target="_blank" class="external"><img src="https://codecov.io/gh/peggyjs/coverage/graph/badge.svg?token=KIIAM551FQ" alt="codecov"></a></p>
Expand Down
Loading

0 comments on commit 65b1b87

Please sign in to comment.