Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

2595 Changed runMocha to runMochaJSON in test/integration (#4077)

Soobin Bakf73e7c681699
diff --git a/test/integration/duplicate-arguments.spec.js b/test/integration/duplicate-arguments.spec.js
index 28fd225d..6dc9d397 100644
--- a/test/integration/duplicate-arguments.spec.js
+++ b/test/integration/duplicate-arguments.spec.js
@@ -1,11 +1,11 @@
'use strict';
-var runMocha = require('./helpers').runMocha;
+var runMochaJSON = require('./helpers').runMochaJSON;
describe('when non-array argument is provided multiple times', function() {
describe('when the same argument name is used', function() {
it('should prefer the last value', function(done) {
- runMocha(
+ runMochaJSON(
'passing-sync',
['--no-async-only', '--async-only', '--no-async-only'],
function(err, result) {
@@ -21,7 +21,7 @@ describe('when non-array argument is provided multiple times', function() {
describe('when a different argument name is used', function() {
it('should prefer the last value', function(done) {
- runMocha('passing-async', ['--timeout', '100', '-t', '10'], function(
+ runMochaJSON('passing-async', ['--timeout', '100', '-t', '10'], function(
err,
result
) {
diff --git a/test/integration/options/ui.spec.js b/test/integration/options/ui.spec.js
index 3d0aaf39..7e3b6363 100644
--- a/test/integration/options/ui.spec.js
+++ b/test/integration/options/ui.spec.js
@@ -1,13 +1,16 @@
'use strict';
var helpers = require('../helpers');
-var runMocha = helpers.runMocha;
+var runMochaJSON = helpers.runMochaJSON;
describe('--ui', function() {
var simpleUiPath = require.resolve('../fixtures/simple-ui.fixture');
it('should load interface and run it', function(done) {
- runMocha('test-for-simple-ui', ['--ui', simpleUiPath], function(err, res) {
+ runMochaJSON('test-for-simple-ui', ['--ui', simpleUiPath], function(
+ err,
+ res
+ ) {
if (err) {
done(err);
return;
@@ -18,7 +21,7 @@ describe('--ui', function() {
});
it("should work if required and name added to Mocha's `interfaces` prop", function(done) {
- runMocha(
+ runMochaJSON(
'test-for-simple-ui',
['--require', simpleUiPath, '--ui', 'simple-ui'],
function(err, res) {