linting
This commit is contained in:
@@ -7,7 +7,7 @@ describe('PageStateValidator', () => {
|
||||
describe('validateState', () => {
|
||||
it('should return valid when all required selectors are present', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
return ['#add-car-button', '#cars-list'].includes(selector);
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should return invalid when required selectors are missing', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
return selector === '#add-car-button'; // Only one of two selectors present
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should return invalid when forbidden selectors are present', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
return ['#add-car-button', '#set-track'].includes(selector);
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should handle empty forbidden selectors array', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
return selector === '#add-car-button';
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should handle undefined forbidden selectors', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
return selector === '#add-car-button';
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should return error result when actualState function throws', () => {
|
||||
// Arrange
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
throw new Error('Selector evaluation failed');
|
||||
};
|
||||
|
||||
@@ -144,7 +144,7 @@ describe('PageStateValidator', () => {
|
||||
|
||||
it('should validate complex state with both required and forbidden selectors', () => {
|
||||
// Arrange - Simulate being on Cars page but Track page elements leaked through
|
||||
const actualState = (selector: string) => {
|
||||
const actualState = (_selector: string) => {
|
||||
const presentSelectors = ['#add-car-button', '#cars-list', '#set-track'];
|
||||
return presentSelectors.includes(selector);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user