test-unsupported-skip.js 725 B

123456789101112131415161718192021222324
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. 'use strict';
  5. const app = require('sdk/system/xul-app');
  6. /*
  7. * Include a module that is unsupported for the current system.
  8. * The `Unsupported Application` error should be caught by the test loader
  9. * and no errors should occur
  10. */
  11. if (!app.is('Firefox')) {
  12. require('./fixtures/loader/unsupported/firefox');
  13. } else {
  14. require('./fixtures/loader/unsupported/fennec');
  15. }
  16. exports.testRunning = function (assert) {
  17. assert.fail('Tests should not run in unsupported applications');
  18. };
  19. require('test').run(exports);