-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from GuoXiCheng/dev-c
Dev c
- Loading branch information
Showing
9 changed files
with
158 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
testTimeout: 120000, | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", // 包括 src 目录下所有的 TypeScript 文件 | ||
"!src/**/*.d.ts", // 排除 TypeScript 声明文件 | ||
"!src/__tests__/**/*.ts" | ||
], | ||
testMatch: ["<rootDir>/src/__tests__/**/*.test.ts"], | ||
testPathIgnorePatterns: [ | ||
"src/__tests__/authenticate-gitee.test.ts", | ||
"src/__tests__/authenticate-github.test.ts", | ||
"src/__tests__/authenticate-gitlab.test.ts", | ||
"src/__tests__/book-repository.test.ts", | ||
"src/__tests__/chat-repository.test.ts", | ||
"src/__tests__/user-repository.test.ts", | ||
"src/__tests__/wx-request.test.ts" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
module.exports = { | ||
testTimeout: 120000, | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", // 包括 src 目录下所有的 TypeScript 文件 | ||
"!src/**/*.d.ts", // 排除 TypeScript 声明文件 | ||
"!src/__tests__/**/*.ts" | ||
], | ||
testMatch: ["<rootDir>/src/__tests__/**/*.test.ts"] | ||
}; | ||
module.exports = { | ||
testTimeout: 120000, | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", // 包括 src 目录下所有的 TypeScript 文件 | ||
"!src/**/*.d.ts", // 排除 TypeScript 声明文件 | ||
"!src/__tests__/**/*.ts" | ||
], | ||
testMatch: ["<rootDir>/src/__tests__/**/*.test.ts"], | ||
testPathIgnorePatterns: [ | ||
"src/__tests__/fake-authenticate-gitee.test.ts", | ||
"src/__tests__/wx-request.test.ts" | ||
] | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { giteeRequest } from './helper/helper'; | ||
describe('Test Use Fake Authenticate Gitee', () => { | ||
test('Test Authenticate Gitee', async () => { | ||
const res = await giteeRequest.authenticate(); | ||
expect(res).toEqual({ | ||
id: 1000001, | ||
login: '***', | ||
name: '***', | ||
avatar_url: 'https://foruda.gitee.com/avatar/***/***.png', | ||
url: 'https://gitee.com/api/v5/users/***', | ||
html_url: 'https://gitee.com/***', | ||
remark: '', | ||
followers_url: 'https://gitee.com/api/v5/users/***/followers', | ||
following_url: 'https://gitee.com/api/v5/users/***/following_url{/other_user}', | ||
gists_url: 'https://gitee.com/api/v5/users/***/gists{/gist_id}', | ||
starred_url: 'https://gitee.com/api/v5/users/***/starred{/owner}{/repo}', | ||
subscriptions_url: 'https://gitee.com/api/v5/users/***/subscriptions', | ||
organizations_url: 'https://gitee.com/api/v5/users/***/orgs', | ||
repos_url: 'https://gitee.com/api/v5/users/***/repos', | ||
events_url: 'https://gitee.com/api/v5/users/***/events{/privacy}', | ||
received_events_url: 'https://gitee.com/api/v5/users/***/received_events', | ||
type: 'User', | ||
blog: null, | ||
weibo: null, | ||
bio: '', | ||
public_repos: 0, | ||
public_gists: 0, | ||
followers: 0, | ||
following: 0, | ||
stared: 0, | ||
watched: 0, | ||
created_at: '2020-02-26T13:20:27+08:00', | ||
updated_at: '2024-01-10T22:27:59+08:00', | ||
email: null | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters