mirror of
https://github.com/actions/stale.git
synced 2026-08-21 16:13:08 +01:00
- 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.
25 lines
601 B
TypeScript
25 lines
601 B
TypeScript
import {IState} from '../../src/interfaces/state/state.js';
|
|
import {IIssue} from '../../src/interfaces/issue.js';
|
|
|
|
export class StateMock implements IState {
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
addIssueToProcessed(issue: IIssue) {}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
isIssueProcessed(issue: IIssue) {
|
|
return false;
|
|
}
|
|
|
|
persist(): Promise<void> {
|
|
return Promise.resolve(undefined);
|
|
}
|
|
|
|
restore(): Promise<void> {
|
|
return Promise.resolve(undefined);
|
|
}
|
|
|
|
reset() {}
|
|
}
|
|
|
|
export const alwaysFalseStateMock = new StateMock();
|