-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* testディレクトリをincludeする tsconfigのincludeはrolllupには影響しないことを確認済みです * mswをインストール * .prettierrcでダブルクォーテーションが抜けているのを修正 * jest関連をインストール * テストファイル用のeslint設定を追加 * mswののセットアップ * テスト環境のセットアップを修正 * coverageディレクトリをgitignoreに追加 * coverageを測定できるように調整 * isCheckValueファイルのテストを追加 * parseQueryファイルのテストを追加 * createClientについてのテストを追加 * getメソッドに関してのテストを追加 * releaseのGitHubActionsにテストスクリプトを追加 * typescriptのeslint設定の優先度を上げる 型定義のところにもun-defルールとかが適用されてしまうのを修正 * 不要なコメントを削除
- Loading branch information
Showing
17 changed files
with
6,747 additions
and
1,262 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
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,2 +1,3 @@ | ||
node_modules | ||
dist | ||
coverage |
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,4 +1,4 @@ | ||
{ | ||
semi: true, | ||
singleQuote: true | ||
"semi": true, | ||
"singleQuote": true | ||
} |
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,8 @@ | ||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
setupFilesAfterEnv: ['./jest.setup.ts'], | ||
collectCoverageFrom: ['src/**/*.ts', '!src/index.ts', '!src/types.ts'], | ||
coverageProvider: 'v8', | ||
}; |
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,9 @@ | ||
import { server } from './tests/mocks/server'; | ||
|
||
// Establish API mocking before all tests. | ||
beforeAll(() => server.listen()); | ||
// Reset any request handlers that we may add during the tests, | ||
// so they don't affect other tests. | ||
afterEach(() => server.resetHandlers()); | ||
// Clean up after the tests are finished. | ||
afterAll(() => server.close()); |
Oops, something went wrong.