Files
sousa-gecko/testing/docs/assert.md
T
Sylvestre Ledru 8f033c8241 Bug 2038819 - Convert testing/**/docs RST to Markdown r=jdescottes,firefox-source-docs-reviewers,ahal
Convert testing/{awsy,condprofile,docs,geckodriver,marionette,
mozbase,mozharness,perfdocs,performance,raptor,talos,web-platform}
RST documentation files to MyST-flavored Markdown.

Skips testing/perfdocs/generated/* (auto-generated by mach perfdocs)
and testing/web-platform/tests/* (third-party test trees).

- Move treeherder-try frontmatter substitutions under the new myst
  topmatter key.
- Allow the pre-existing autodoc Unknown target warning for
  mozprofile.permissions to keep the build clean.
- Refresh allowed-warnings glob for manifest-sandbox download from
  .rst to .md.

Differential Revision: https://phabricator.services.mozilla.com/D304228
2026-07-04 10:18:34 +00:00

743 B

(assert-module)=

Assert module

For XPCShell tests and mochitests, Assert is already present as an instantiated global to which you can refer - you don't need to construct it yourself. You can immediately start using Assert.ok and similar methods as test assertions.

The full class documentation follows, but it is perhaps worth noting that this API is largely identical to NodeJS' assert module, with some omissions/changes including strict mode and string matching.

:members: ok, equal, notEqual, strictEqual, notStrictEqual, deepEqual, notDeepEqual,
          greater, less, greaterOrEqual, lessOrEqual, stringContains, stringMatches,
          throws, rejects, *