eaf9131fae
- Changed import statements across multiple files to use the .js extension for ES module compatibility. - Refactored test files to utilize jest's unstable_mockModule for mocking core actions. - Removed unnecessary spy instances in tests, replacing them with direct mocked function calls. - Updated TypeScript configuration to target ES2022 and use NodeNext module resolution. - Removed the tsconfig.spec.json file and adjusted the main tsconfig.json to exclude test files.
20 lines
571 B
TypeScript
20 lines
571 B
TypeScript
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
|
|
import {Operations} from './operations.js';
|
|
|
|
export class StaleOperations extends Operations {
|
|
private readonly _options: IIssuesProcessorOptions;
|
|
|
|
constructor(options: Readonly<IIssuesProcessorOptions>) {
|
|
super();
|
|
this._options = options;
|
|
}
|
|
|
|
hasRemainingOperations(): boolean {
|
|
return this._operationsConsumed < this._options.operationsPerRun;
|
|
}
|
|
|
|
getRemainingOperationsCount(): number {
|
|
return this._options.operationsPerRun - this._operationsConsumed;
|
|
}
|
|
}
|