Skip to content

Commit

Permalink
Update Mocha configuration to use new "RC" format
Browse files Browse the repository at this point in the history
Here, "RC" refers explicitly to `.mocharc*` files, which were introduced
in Mocha v6.0.0 as a replacement for the more limited mocha.opts format.
See mochajs/mocha#3556.
  • Loading branch information
Alhadis committed Feb 24, 2019
1 parent 1ab5fe5 commit 0460b18
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .mocharc.json
@@ -0,0 +1,4 @@
{
"ui": "tdd",
"require": ["chai/register-assert"]
}
1 change: 0 additions & 1 deletion test/basic-usage.js
@@ -1,7 +1,6 @@
"use strict";

const getOpts = require("../index.js");
const {assert} = require("chai");


suite("Basic usage", () => {
Expand Down
1 change: 0 additions & 1 deletion test/duplicate-options.js
@@ -1,7 +1,6 @@
"use strict";

const getOpts = require("../index.js");
const {assert} = require("chai");


suite("Duplicate option handling", () => {
Expand Down
1 change: 0 additions & 1 deletion test/empty-input.js
@@ -1,7 +1,6 @@
"use strict";

const getOpts = require("../index.js");
const {assert} = require("chai");


suite("Empty input", () => {
Expand Down
1 change: 0 additions & 1 deletion test/mocha.opts

This file was deleted.

3 changes: 1 addition & 2 deletions test/string-input.js
@@ -1,7 +1,6 @@
"use strict";

const getOpts = require("../index.js");
const {assert} = require("chai");


suite("String input", () => {
Expand Down Expand Up @@ -153,7 +152,7 @@ suite("String input", () => {
expect('"\\--foo"', {"--foo": ""}, {argv: ["\\--foo"], options: {}});
expect('"\\\\--foo"', {"--foo": ""}, {argv: ["\\--foo"], options: {}});

// Assert that parsing esaped option-strings won't have affect arrays
// Assert that parsing escaped option-strings won't affect arrays
expect(["\\--foo"], {"--foo": ""}, {argv: ["\\--foo"], options: {}});
expect(["\\ --foo"], {"--foo": ""}, {argv: ["\\ --foo"], options: {}});
expect(['"\\--foo"'], {"--foo": ""}, {argv: ['"\\--foo"'], options: {}});
Expand Down

0 comments on commit 0460b18

Please sign in to comment.