From fc34f2e989c5bc8161618312be80facdc9a6401c Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sat, 2 Sep 2023 08:15:51 -0700 Subject: [PATCH] Zone.js and Karma FAQs --- _faq/other-software/001-karma.md | 8 ++++++++ _faq/other-software/002-zonejs.md | 9 +++++++++ _faq/other-software/webdriverio.md | 12 ++++++++++++ _faq/testing/webdriverio.md | 8 -------- pages/faq.html | 20 ++++++++++++++++++++ 5 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 _faq/other-software/001-karma.md create mode 100644 _faq/other-software/002-zonejs.md create mode 100644 _faq/other-software/webdriverio.md delete mode 100644 _faq/testing/webdriverio.md diff --git a/_faq/other-software/001-karma.md b/_faq/other-software/001-karma.md new file mode 100644 index 00000000..7b9e0e66 --- /dev/null +++ b/_faq/other-software/001-karma.md @@ -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). \ No newline at end of file diff --git a/_faq/other-software/002-zonejs.md b/_faq/other-software/002-zonejs.md new file mode 100644 index 00000000..34d0ead7 --- /dev/null +++ b/_faq/other-software/002-zonejs.md @@ -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. \ No newline at end of file diff --git a/_faq/other-software/webdriverio.md b/_faq/other-software/webdriverio.md new file mode 100644 index 00000000..2950be41 --- /dev/null +++ b/_faq/other-software/webdriverio.md @@ -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. \ No newline at end of file diff --git a/_faq/testing/webdriverio.md b/_faq/testing/webdriverio.md deleted file mode 100644 index 4a391be9..00000000 --- a/_faq/testing/webdriverio.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -question: Why doesn't expect() work right in webdriver.io? ---- - -Webdriver.IO monkey patches Jasmine extensively. In particular, -`@wdio/jasmine-framework` replaces Jasmine's `expect` with -[a different one](https://webdriver.io/docs/api/expect-webdriverio/) that is -incompatible with Jasmine's. diff --git a/pages/faq.html b/pages/faq.html index 8be499b2..d4be8d1b 100644 --- a/pages/faq.html +++ b/pages/faq.html @@ -16,6 +16,16 @@

Frequently Asked Questions

{% endfor %} +
  • + Other software that works with Jasmine +
      + {% for faq in site.faq %} + {% if faq.path contains '_faq/other-software/' %} +
    1. {{ faq.question }}
    2. + {% endif %} + {% endfor %} +
    +
  • Writing Specs
      @@ -68,6 +78,16 @@

      {{ faq.question }}

      {% endif %} {% endfor %} +

      Other software that works with Jasmine

      + +{% for faq in site.faq %} + {% if faq.path contains '_faq/other-software/' %} +

      {{ faq.question }}

      +
      {{ faq.content }}
      + Back to FAQ index + {% endif %} +{% endfor %} +

      Writing Specs

      {% for faq in site.faq %}