Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/local register #7

Merged
merged 30 commits into from
Jun 10, 2023
Merged

Feature/local register #7

merged 30 commits into from
Jun 10, 2023

Conversation

a20688392
Copy link
Collaborator

@a20688392 a20688392 commented Jun 4, 2023

本地使用者註冊和單元測試

  • 本地使用者註冊:
    • 初始化資料庫表、註冊API、驗證資料格式
    • 單元測試
      • auth controller
        • 驗證資料格式和回應訊息
      • auth service
        • 驗證資料衝突和回應訊息
      • user service
        • 驗證資料衝突和回應訊息
  • 新增 dataSourceJest 是因為單元測試吃的是 TS
  • package.json 修改 jest參數和新增 sqllite3
    • 測試時使用 sqlite在記憶體中使用
    • 會顯示全部詳細測試資訊
      • "test": "jest --verbose",
    • 為了讓他能在 jest 單元測試抓到路徑,原本只能抓相對路徑
    • 範例:src/users/entities/user.entity
"moduleNameMapper": {
      "src/(.*)$": "<rootDir>/$1"
}

@a20688392 a20688392 requested a review from moontai0724 June 4, 2023 15:11
@a20688392 a20688392 force-pushed the feature/local-register branch from 96b1801 to ffd8019 Compare June 4, 2023 16:26
Copy link
Member

@moontai0724 moontai0724 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments above.

@a20688392 a20688392 force-pushed the feature/local-register branch from 00bf9e6 to b9f0972 Compare June 8, 2023 14:25
@a20688392 a20688392 requested a review from moontai0724 June 8, 2023 14:44
@a20688392
Copy link
Collaborator Author

修復完了

Copy link
Member

@moontai0724 moontai0724 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests should not contain external tests that are not related to test target exposed interfaces

@a20688392 a20688392 requested a review from moontai0724 June 8, 2023 16:53
Copy link
Member

@moontai0724 moontai0724 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

@a20688392 a20688392 requested a review from moontai0724 June 10, 2023 07:52
Copy link
Member

@moontai0724 moontai0724 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

@a20688392 a20688392 merged commit 2f13ea2 into develop Jun 10, 2023
@a20688392 a20688392 deleted the feature/local-register branch June 10, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants