refactor(testing): migrate from Jest to Vitest for testing framework

This commit is contained in:
Naoki Oketani
2025-05-02 14:03:34 +00:00
parent a898de739e
commit 2564984eab
11 changed files with 3190 additions and 467 deletions

View File

@@ -68,7 +68,7 @@ describe('getExistingIssueNumber', () => {
})
test('gets existing open issue', async () => {
const getIssues = jest.fn()
const getIssues = vi.fn()
getIssues.mockResolvedValue({
data: [
{
@@ -89,7 +89,7 @@ describe('getExistingIssueNumber', () => {
})
test('returns null when there is no open issue', async () => {
const getIssues = jest.fn()
const getIssues = vi.fn()
getIssues.mockResolvedValue({data: []})
const result = await issue.getExistingIssueNumber(getIssues, {repo, owner})
@@ -104,7 +104,7 @@ describe('getExistingIssueNumber', () => {
})
test('returns null when no issues match the issue title', async () => {
const getIssues = jest.fn()
const getIssues = vi.fn()
getIssues.mockResolvedValue({
data: [
{