Skip to content

Commit

Permalink
2595 Changed runMocha to runMochaJSON in test/integration (#4077)
Browse files Browse the repository at this point in the history
* duplicate-arguments

* suit.spec.js

* ui.spec.js

* lint error fixed
  • Loading branch information
soobing authored and craigtaub committed Oct 19, 2019
1 parent 8a0b38b commit f73e7c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/integration/duplicate-arguments.spec.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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
) {
Expand Down
9 changes: 6 additions & 3 deletions test/integration/options/ui.spec.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit f73e7c6

Please sign in to comment.