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

Code before:
                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' 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' 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\/' 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\/' 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: {

Review comment (suggestion):
With this update, the reported glob patterns match what is passed on the command line instead of the interpolated patterns we used. This matches the behavior of `eslintrc` and seems preferable to me.

Code after:
                    overrideConfigFile: true,
                    overrideConfig: {
                        rules: {
                            quotes: [2, "single"]
                        }
                    }
                });
                const results = await eslint.lintFiles(["hidden/.hiddenfolder/*.js"]);

                assert.strictEqual(results.length, 1);
                assert.strictEqual(results[0].errorCount, 1);
                assert.strictEqual(results[0].warningCount, 0);
                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' 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' 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\/' are ignored\./u);
            });

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