- Use .bind() for deleteIdTags method reference (line 89)
- Ensures proper 'this' context when method is restored and called
- Reduces lint errors from 41 to 40 (1 error fixed)
- All 291 tests still passing
await it('Should NOT call idTagsCache.deleteIdTags() on ClearCache request', async () => {
// Verify that IdTagsCache is not touched
let deleteIdTagsCalled = false
- const originalDeleteIdTags = mockChargingStation.idTagsCache.deleteIdTags
+ const originalDeleteIdTags = mockChargingStation.idTagsCache.deleteIdTags.bind(mockChargingStation.idTagsCache)
Object.assign(mockChargingStation.idTagsCache, {
deleteIdTags: () => {