Repository: eslint/eslint
File: tests/lib/eslint/flat-eslint.js (JavaScript)

Code before:
                assert.strictEqual(results[0].fatalErrorCount, 0);
                assert.strictEqual(results[0].fixableErrorCount, 1);
                assert.strictEqual(results[0].fixableWarningCount, 0);
            });

            it("should ignore node_modules files when using ignore file", async () => {
                eslint = new FlatESLint({
                    cwd: getFixturePath("cli-engine"),
                    overrideConfigFile: true
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["node_modules"]);
                }, /All files matched by 'node_modules\/\*\*\/\*.js' are ignored\./u);
            });

            // https://github.com/eslint/eslint/issues/5547
            it("should ignore node_modules files even with ignore: false", async () => {
                eslint = new FlatESLint({
                    cwd: getFixturePath("cli-engine"),
                    ignore: false
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["node_modules"]);
                }, /All files matched by 'node_modules\/\*\*\/\*\.js' are ignored\./u);
            });

            it("should throw an error when given a directory with all eslint excluded files in the directory", async () => {
                eslint = new FlatESLint({
                    cwd: getFixturePath(),
                    ignorePath: getFixturePath(".eslintignore")
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles([getFixturePath("./cli-engine/")]);
                }, /All files matched by '.*?cli-engine[\\/]\*\*[\\/]\*\.js' are ignored/u);
            });

            it("should throw an error when all given files are ignored", async () => {
                eslint = new FlatESLint({
                    ignorePath: getFixturePath(".eslintignore")
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["tests/fixtures/cli-engine/"]);
                }, /All files matched by 'tests\/fixtures\/cli-engine\/\*\*\/\*\.js' are ignored\./u);
            });

            it("should throw an error when all given files are ignored even with a `./` prefix", async () => {
                eslint = new FlatESLint({

Review comment (suggestion):
Since we are removing `ignorePath`, not a big deal to fix this test up to make sure it works correctly.

Code after:
            it("should ignore node_modules files when using ignore file", async () => {
                eslint = new FlatESLint({
                    cwd: getFixturePath("cli-engine"),
                    overrideConfigFile: true
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["node_modules"]);
                }, /All files matched by 'node_modules\/\*\*\/\*.js' are ignored\./u);
            });

            // https://github.com/eslint/eslint/issues/5547
            it("should ignore node_modules files even with ignore: false", async () => {
                eslint = new FlatESLint({
                    cwd: getFixturePath("cli-engine"),
                    ignore: false
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["node_modules"]);
                }, /All files matched by 'node_modules\/\*\*\/\*\.js' are ignored\./u);
            });

            it("should throw an error when all given files are ignored", async () => {
                eslint = new FlatESLint({
                    overrideConfigFile: getFixturePath("eslint.config_with_ignores.js")
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["tests/fixtures/cli-engine/"]);
                }, /All files matched by 'tests\/fixtures\/cli-engine\/\*\*\/\*\.js' are ignored\./u);
            });

            it("should throw an error when all given files are ignored even with a `./` prefix", async () => {
                eslint = new FlatESLint({
                    overrideConfigFile: getFixturePath("eslint.config_with_ignores.js")
                });

                await assert.rejects(async () => {
                    await eslint.lintFiles(["./tests/fixtures/cli-engine/"]);
                }, /All files matched by 'tests\/fixtures\/cli-engine\/\*\*\/\*\.js' are ignored\./u);
            });

            // https://github.com/eslint/eslint/issues/3788
            it("should ignore one-level down node_modules by default", async () => {
                eslint = new FlatESLint({
                    overrideConfigFile: true,
                    overrideConfig: {
                        rules: {
                            quotes: [2, "double"]
                        }