Name Description Size
AppData.sys.mjs Installs a fake UAppData directory. This is needed by tests because a UAppData directory typically isn't present in the test environment. We create the new UAppData directory under the profile's directory because the profile directory is automatically cleaned as part of test shutdown. This returns a promise that will be resolved once the new directory is created and installed. 2221
AppInfo.sys.mjs Create new XULAppInfo instance with specified options. options is a object with following keys: ID: nsIXULAppInfo.ID name: nsIXULAppInfo.name version: nsIXULAppInfo.version platformVersion: nsIXULAppInfo.platformVersion OS: nsIXULRuntime.OS appBuildID: nsIXULRuntime.appBuildID lastAppBuildID: nsIXULRuntime.lastAppBuildID lastAppVersion: nsIXULRuntime.lastAppVersion crashReporter: nsICrashReporter interface is implemented if true 4007
Assert.sys.mjs This module is based on the `CommonJS spec <https://wiki.commonjs.org/wiki/Unit_Testing/1.0>`_ When you see a jsdoc comment that contains a number, it's a reference to a specific section of the CommonJS spec. 1. The assert module provides functions that throw AssertionError's when particular conditions are not met. To use the module you may instantiate it first. @param {reporterFunc} reporterFunc Allows consumers to override reporting for this instance. @param {boolean} isDefault Used by test suites to set ``reporterFunc`` as the default used by the global instance, which is called for example by other test-only modules. This is false when the reporter is set by content scripts, because they may still run in the parent process. @class 21985
CoverageUtils.sys.mjs Records coverage for each test by way of the js debugger. 5973
FileTestUtils.sys.mjs Provides testing functions dealing with local files and their contents. 5097
MockRegistrar.sys.mjs Register a mock to override target interfaces. The target interface may be accessed through _genuine property of the mock. If you register multiple mocks to the same contract ID, you have to call unregister in reverse order. Otherwise the previous factory will not be restored. @param contractID The contract ID of the interface which is overridden by the mock. e.g. "@mozilla.org/file/directory_service;1" @param mock An object which implements interfaces for the contract ID. @param args An array which is passed in the constructor of mock. @return The CID of the mock. 3497
MockRegistry.sys.mjs 9292
moz.build 1146
sinon-7.2.7.js 3725552
Sinon.sys.mjs 972
StructuredLog.sys.mjs TestLogger: Logger class generating messages compliant with the structured logging protocol for tests exposed by mozlog @param {string} name The name of the logger to instantiate. @param {function} [dumpFun] An underlying function to be used to log raw messages. This function will receive the complete serialized json string to log. @param {object} [scope] The scope that the dumpFun is loaded in, so that messages are cloned into that scope before passing them. 6787
tests
TestUtils.sys.mjs Contains a limited number of testing functions that are commonly used in a wide variety of situations, for example waiting for an event loop tick or an observer notification. More complex functions are likely to belong to a separate test-only module. Examples include Assert.sys.mjs for generic assertions, FileTestUtils.sys.mjs to work with local files and their contents, and BrowserTestUtils.sys.mjs to work with browser windows and tabs. Individual components also offer testing functions to other components, for example LoginTestUtils.sys.mjs. 12596
XPCShellContentUtils.sys.mjs -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- 14387