Repository: eslint/eslint
File: lib/rule-tester/rule-tester.js (JavaScript)

Code before:
						const expectedLocation = {};

						if (hasOwnProperty(error, "line")) {
							actualLocation.line = message.line;
							expectedLocation.line = error.line;
						}

						if (hasOwnProperty(error, "column")) {
							actualLocation.column = message.column;
							expectedLocation.column = error.column;
						}

						if (hasOwnProperty(error, "endLine")) {
							actualLocation.endLine = message.endLine;
							expectedLocation.endLine = error.endLine;
						}

						if (hasOwnProperty(error, "endColumn")) {
							actualLocation.endColumn = message.endColumn;
							expectedLocation.endColumn = error.endColumn;
						}

						if (Object.keys(expectedLocation).length > 0) {
							assert.deepStrictEqual(
								actualLocation,
								expectedLocation,
							);
						}

						assert.ok(
							!message.suggestions ||
								hasOwnProperty(error, "suggestions"),
							`Error at index ${i} has suggestions. Please specify 'suggestions' property on the test error object.`,
						);
						if (hasOwnProperty(error, "suggestions")) {
							// Support asserting there are no suggestions
							const expectsSuggestions = Array.isArray(
								error.suggestions,
							)
								? error.suggestions.length > 0
								: Boolean(error.suggestions);
							const hasSuggestions =
								message.suggestions !== void 0;

							if (!hasSuggestions && expectsSuggestions) {
								assert.ok(
									!error.suggestions,
									`Error should have suggestions on error with message: "${message.message}"`,
								);
							} else if (hasSuggestions) {
								assert.ok(

Review comment (suggestion):
The default message "Expected values to be strictly deep-equal:" might be confusing because a deep equal assert does not appear as such in the test case code. Maybe something like this:

```suggestion
								expectedLocation,
								"Actual error location does not match expected error location.",
```

Code after:
						const expectedLocation = {};

						if (hasOwnProperty(error, "line")) {
							actualLocation.line = message.line;
							expectedLocation.line = error.line;
						}

						if (hasOwnProperty(error, "column")) {
							actualLocation.column = message.column;
							expectedLocation.column = error.column;
						}

						if (hasOwnProperty(error, "endLine")) {
							actualLocation.endLine = message.endLine;
							expectedLocation.endLine = error.endLine;
						}

						if (hasOwnProperty(error, "endColumn")) {
							actualLocation.endColumn = message.endColumn;
							expectedLocation.endColumn = error.endColumn;
						}

						if (Object.keys(expectedLocation).length > 0) {
							assert.deepStrictEqual(
								actualLocation,
								expectedLocation,
								"Actual error location does not match expected error location.",
							);
						}

						assert.ok(
							!message.suggestions ||
								hasOwnProperty(error, "suggestions"),
							`Error at index ${i} has suggestions. Please specify 'suggestions' property on the test error object.`,
						);
						if (hasOwnProperty(error, "suggestions")) {
							// Support asserting there are no suggestions
							const expectsSuggestions = Array.isArray(
								error.suggestions,
							)
								? error.suggestions.length > 0
								: Boolean(error.suggestions);
							const hasSuggestions =
								message.suggestions !== void 0;

							if (!hasSuggestions && expectsSuggestions) {
								assert.ok(
									!error.suggestions,
									`Error should have suggestions on error with message: "${message.message}"`,
								);
							} else if (hasSuggestions) {