Skip to content

armgit / mocha

Public Imported from GitHub
0

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

589 B
Raw Blame
"use strict";

var runMocha = require("../helpers.cjs").runMocha;

describe("--invert", function () {
  describe("when used without --fgrep or --grep", function () {
    it("it should report an error", function (done) {
      runMocha(
        "options/grep.fixture.js",
        ["--invert"],
        function (err, res) {
          if (err) {
            return done(err);
          }
          expect(
            res,
            "to have failed with output",
            /--invert.*--grep <regexp>/,
          );
          done();
        },
        "pipe",
      );
    });
  });
});