diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..7f09281 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,4 @@ +{ + "ui": "tdd", + "require": ["chai/register-assert"] +} diff --git a/test/basic-usage.js b/test/basic-usage.js index 982095e..5ad9897 100644 --- a/test/basic-usage.js +++ b/test/basic-usage.js @@ -1,7 +1,6 @@ "use strict"; const getOpts = require("../index.js"); -const {assert} = require("chai"); suite("Basic usage", () => { diff --git a/test/duplicate-options.js b/test/duplicate-options.js index c49075a..82d35cb 100644 --- a/test/duplicate-options.js +++ b/test/duplicate-options.js @@ -1,7 +1,6 @@ "use strict"; const getOpts = require("../index.js"); -const {assert} = require("chai"); suite("Duplicate option handling", () => { diff --git a/test/empty-input.js b/test/empty-input.js index 30518f5..3faa928 100644 --- a/test/empty-input.js +++ b/test/empty-input.js @@ -1,7 +1,6 @@ "use strict"; const getOpts = require("../index.js"); -const {assert} = require("chai"); suite("Empty input", () => { diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index 5efaf24..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui tdd diff --git a/test/string-input.js b/test/string-input.js index d7afbcc..03ed6db 100644 --- a/test/string-input.js +++ b/test/string-input.js @@ -1,7 +1,6 @@ "use strict"; const getOpts = require("../index.js"); -const {assert} = require("chai"); suite("String input", () => { @@ -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: {}});