Skip to content

Commit

Permalink
Zone.js and Karma FAQs
Browse files Browse the repository at this point in the history
  • Loading branch information
sgravrock committed Sep 2, 2023
1 parent b14d69c commit fc34f2e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
8 changes: 8 additions & 0 deletions _faq/other-software/001-karma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
question: Can I use Jasmine 5.x with Karma?
---

Probably. Karma-jasmine 5.1 (the latest version as of this writing, and likely
the final version) appears to be compatible with jasmine-core 5.x. You should
be able to
[use an NPM override to override karma-jasmine's dependency specification](https://github.com/dfederm/karma-jasmine-html-reporter/issues/74#issuecomment-1576032674).
9 changes: 9 additions & 0 deletions _faq/other-software/002-zonejs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
question: I ran into a problem involving zone.js. Can you help?
---

Please report any zone.js related issues to the Angular project.

Zone.js monkey patches Jasmine extensively, replacing a number of key internals
with its own implementations. Most of the time this works fine. But any
problems that it causes are by definition bugs in zone.js rather than in Jasmine.
12 changes: 12 additions & 0 deletions _faq/other-software/webdriverio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
question: Why doesn't expect() work right in webdriver.io?
---

`@wdio/jasmine-framework` replaces Jasmine's `expect` with
a different one that is incompatible with Jasmine's. See
[the Webdriver.IO docs](https://webdriver.io/docs/api/expect-webdriverio/)
for information about its `expect` API.

In addition to replacing `expect`, Webdriver.IO monkey patches some Jasmine
internals. Bugs that only occur when Webdriver.IO is present should be reported
to Webdriver.IO, not to Jasmine.
8 changes: 0 additions & 8 deletions _faq/testing/webdriverio.md

This file was deleted.

20 changes: 20 additions & 0 deletions pages/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ <h1>Frequently Asked Questions</h1>
{% endfor %}
</ol>
</li>
<li>
<a href="#other">Other software that works with Jasmine</a>
<ol>
{% for faq in site.faq %}
{% if faq.path contains '_faq/other-software/' %}
<li><a href="#{{faq.slug}}">{{ faq.question }}</a></li>
{% endif %}
{% endfor %}
</ol>
</li>
<li>
<a href="#testing">Writing Specs</a>
<ol>
Expand Down Expand Up @@ -68,6 +78,16 @@ <h2 id={{faq.slug}} data-anchor-id="{{faq.slug}}">{{ faq.question }}</h2>
{% endif %}
{% endfor %}

<h2 id="other">Other software that works with Jasmine</h2>

{% for faq in site.faq %}
{% if faq.path contains '_faq/other-software/' %}
<h2 id={{faq.slug}} data-anchor-id="{{faq.slug}}">{{ faq.question }}</h2>
<div class="answer">{{ faq.content }}</div>
<a href="#toc">Back to FAQ index</a>
{% endif %}
{% endfor %}

<h2 id="testing">Writing Specs</h2>

{% for faq in site.faq %}
Expand Down

0 comments on commit fc34f2e

Please sign in to comment.