simpletest.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @fileoverview Defines the environment for scripts that use the SimpleTest
  3. * mochitest harness. Imports the globals from the relevant files.
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. */
  9. "use strict";
  10. // -----------------------------------------------------------------------------
  11. // Rule Definition
  12. // -----------------------------------------------------------------------------
  13. var path = require("path");
  14. var { getScriptGlobals } = require("./utils");
  15. // When updating this list, be sure to also update the 'support-files' config
  16. // in `tools/lint/eslint.yml`.
  17. const simpleTestFiles = [
  18. "AccessibilityUtils.js",
  19. "ExtensionTestUtils.js",
  20. "EventUtils.js",
  21. "MockObjects.js",
  22. "SimpleTest.js",
  23. "WindowSnapshot.js",
  24. "paint_listener.js",
  25. ];
  26. const simpleTestPath = "testing/mochitest/tests/SimpleTest";
  27. module.exports = getScriptGlobals(
  28. "simpletest",
  29. simpleTestFiles.map(file => path.join(simpleTestPath, file))
  30. );