mirror of
https://github.com/actions/stale.git
synced 2026-08-22 16:43:25 +01:00
refactor: update imports to use ES module syntax and improve test structure (#1350)
- 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.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import {IUserAssignee} from '../interfaces/assignee';
|
||||
import {IIssue} from '../interfaces/issue';
|
||||
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
|
||||
import {ILabel} from '../interfaces/label';
|
||||
import {IMilestone} from '../interfaces/milestone';
|
||||
import {Issue} from './issue';
|
||||
import {beforeEach, describe, expect, it} from '@jest/globals';
|
||||
import {IUserAssignee} from '../interfaces/assignee.js';
|
||||
import {IIssue} from '../interfaces/issue.js';
|
||||
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
|
||||
import {ILabel} from '../interfaces/label.js';
|
||||
import {IMilestone} from '../interfaces/milestone.js';
|
||||
import {Issue} from './issue.js';
|
||||
|
||||
describe('Issue', (): void => {
|
||||
let issue: Issue;
|
||||
|
||||
Reference in New Issue
Block a user