Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for execute parameter for selecting tests #46

Merged
merged 1 commit into from
Oct 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions 2.3/custom_boot.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ <h2>Adding a custom reporter</h2>
<div class="pilwrap">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>You can also customize how specs are filtered from the current run by changing the <code>env.specFilter</code> function</p>
<p>You can also customize how specs are filtered from the current run by changing the <code>env.specFilter</code> function.</p>

<p>Alternatley specs to be run may also be specified after the tests have been parsed by passing an array of suite
or spec IDs to the execute function. These IDs can be cleaned by traversing the tree of parsed tests accessible
via env.topSuite().</p>

</td>
<td class="code">
Expand All @@ -188,7 +192,7 @@ <h2>Adding a custom reporter</h2>
<span class="nx">currentWindowOnload</span><span class="p">();</span>
<span class="p">}</span>
<span class="nx">htmlReporter</span><span class="p">.</span><span class="nx">initialize</span><span class="p">();</span>
<span class="nx">env</span><span class="p">.</span><span class="nx">execute</span><span class="p">();</span>
<span class="nx">env</span><span class="p">.</span><span class="nx">execute</span><span class="p">(</span><span class="nx">env</span><span class="p">.</span><span class="nx">topSuite</span><span class="p">().</span><span class="nx">id</span><span class="p">);</span>
<span class="p">};</span>

<span class="kd">function</span> <span class="nx">extend</span><span class="p">(</span><span class="nx">destination</span><span class="p">,</span> <span class="nx">source</span><span class="p">)</span> <span class="p">{</span>
Expand Down
8 changes: 6 additions & 2 deletions 2.3/src/custom_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@


/**
* You can also customize how specs are filtered from the current run by changing the `env.specFilter` function
* You can also customize how specs are filtered from the current run by changing the `env.specFilter` function.
*
* Alternatley specs to be run may also be specified after the tests have been parsed by passing an array of suite
* or spec IDs to the execute function. These IDs can be gleaned by traversing the tree of parsed tests accessible
* via env.topSuite().
*/
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function() { return queryString.getParam("spec"); }
Expand All @@ -87,7 +91,7 @@
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
env.execute(env.topSuite().id);
};

function extend(destination, source) {
Expand Down
6 changes: 5 additions & 1 deletion edge/custom_boot.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ <h2>Adding a custom reporter</h2>
</div>
<p>You can also customize how specs are filtered from the current run by changing the <code>env.specFilter</code> function</p>

<p>Alternatley specs to be run may also be specified after the tests have been parsed by passing an array of suite
or spec IDs to the execute function. These IDs can be gleaned by traversing the tree of parsed tests accessible
via env.topSuite().</p>

</td>
<td class="code">
<div class="highlight">
Expand All @@ -188,7 +192,7 @@ <h2>Adding a custom reporter</h2>
<span class="nx">currentWindowOnload</span><span class="p">();</span>
<span class="p">}</span>
<span class="nx">htmlReporter</span><span class="p">.</span><span class="nx">initialize</span><span class="p">();</span>
<span class="nx">env</span><span class="p">.</span><span class="nx">execute</span><span class="p">();</span>
<span class="nx">env</span><span class="p">.</span><span class="nx">execute</span><span class="p">(</span><span class="nx">env</span><span class="p">.</span><span class="nx">topSuite</span><span class="p">().</span><span class="nx">id</span><span class="p">);</span>
<span class="p">};</span>

<span class="kd">function</span> <span class="nx">extend</span><span class="p">(</span><span class="nx">destination</span><span class="p">,</span> <span class="nx">source</span><span class="p">)</span> <span class="p">{</span>
Expand Down
6 changes: 5 additions & 1 deletion edge/src/custom_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@

/**
* You can also customize how specs are filtered from the current run by changing the `env.specFilter` function
*
* Alternatley specs to be run may also be specified after the tests have been parsed by passing an array of suite
* or spec IDs to the execute function. These IDs can be gleaned by traversing the tree of parsed tests accessible
* via env.topSuite().
*/
var specFilter = new jasmine.HtmlSpecFilter({
filterString: function() { return queryString.getParam("spec"); }
Expand All @@ -87,7 +91,7 @@
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
env.execute(env.topSuite().id);
};

function extend(destination, source) {
Expand Down