Repository: eslint/eslint
File: tests/bin/eslint.js (JavaScript)

Code before:
					ARGS_WITH_PASS_ON_UNPRUNED_SUPPRESSIONS,
				);

				return assertExitCode(child, 0);
			});

			it("exits with code 1 if there are unsupressed lint errors, when there are unused suppressions and the --pass-on-unpruned-suppressions flag is used (1)", () => {
				const suppressions = structuredClone(
					SUPPRESSIONS_FILE_ALL_ERRORS,
				);

				suppressions[SOURCE_PATH].indent.count = 10;
				suppressions[SOURCE_PATH]["no-sparse-arrays"].count--;
				fs.writeFileSync(
					SUPPRESSIONS_PATH,
					JSON.stringify(suppressions, null, 2),
				);

				const child = runESLint(
					ARGS_WITH_PASS_ON_UNPRUNED_SUPPRESSIONS,
				);

				return assertExitCode(child, 1);
			});

			it("exits with code 1 if there are unsupressed lint errors, when there are unused suppressions and the --pass-on-unpruned-suppressions flag is used (2)", () => {
				const suppressions = structuredClone(
					SUPPRESSIONS_FILE_ALL_ERRORS,
				);

				suppressions[SOURCE_PATH].indent.count = 10;
				fs.writeFileSync(
					SUPPRESSIONS_PATH,
					JSON.stringify(suppressions, null, 2),
				);

				const child = runESLint(
					ARGS_WITH_PASS_ON_UNPRUNED_SUPPRESSIONS.concat(
						"--rule=no-restricted-syntax:[error, 'IfStatement']",
					),
				);

				return assertExitCode(child, 1);
			});

			it("prunes the suppressions file, when the --prune-suppressions flag is used", () => {
				const suppressions = structuredClone(
					SUPPRESSIONS_FILE_ALL_ERRORS,
				);

				suppressions[SOURCE_PATH].indent.count = 10;

Review comment (suggestion):
```suggestion
			it("exits with code 1 if there are unsuppressed lint errors, when there are unused suppressions and the --pass-on-unpruned-suppressions flag is used (2)", () => {
```

Code after:

				suppressions[SOURCE_PATH].indent.count = 10;
				fs.writeFileSync(
					SUPPRESSIONS_PATH,
					JSON.stringify(suppressions, null, 2),
				);

				const child = runESLint(
					ARGS_WITH_PASS_ON_UNPRUNED_SUPPRESSIONS,
				);

				const exitCodeAssertion = assertExitCode(child, 0);
				const outputAssertion = getOutput(child).then(output => {
					assert.notInclude(output.stderr, "suppressions left");
				});

				return Promise.all([exitCodeAssertion, outputAssertion]);
			});

			it("exits with code 1 if there are unsuppressed lint errors, when there are unused suppressions and the --pass-on-unpruned-suppressions flag is used (1)", () => {
				const suppressions = structuredClone(
					SUPPRESSIONS_FILE_ALL_ERRORS,
				);

				suppressions[SOURCE_PATH].indent.count = 10;
				suppressions[SOURCE_PATH]["no-sparse-arrays"].count--;
				fs.writeFileSync(
					SUPPRESSIONS_PATH,
					JSON.stringify(suppressions, null, 2),
				);

				const child = runESLint(
					ARGS_WITH_PASS_ON_UNPRUNED_SUPPRESSIONS,
				);

				const exitCodeAssertion = assertExitCode(child, 1);
				const outputAssertion = getOutput(child).then(output => {
					assert.notInclude(output.stderr, "suppressions left");
				});

				return Promise.all([exitCodeAssertion, outputAssertion]);
			});

			it("exits with code 1 if there are unsuppressed lint errors, when there are unused suppressions and the --pass-on-unpruned-suppressions flag is used (2)", () => {
				const suppressions = structuredClone(
					SUPPRESSIONS_FILE_ALL_ERRORS,
				);

				suppressions[SOURCE_PATH].indent.count = 10;
				fs.writeFileSync(
					SUPPRESSIONS_PATH,