Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
gentksb committed Mar 1, 2024
1 parent b272c17 commit ab445ec
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/splitExpense.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ test("always ok", () => {
expect(true).toBeTruthy();
});

// // 異常系テスト
// describe("異常系テスト", () => {
// test("グループIDが含まれていない場合、処理せずエラーログを出力して正常終了する", () => {
// const missingGroupIdData = {
// ...willBeSplittedData,
// group_id: null,
// };
// // ログ出力をJestで追跡する関数
// const logSpy = jest.spyOn(global.console, "error");
// 異常系テスト
describe("異常系テスト", () => {
test("グループIDが含まれていない場合、処理せずエラーログを出力して正常終了する", () => {
const missingGroupIdData = {
...basicExpense,
group_id: null,
};
// ログ出力をJestで追跡する関数
const logSpy = jest.spyOn(global.console, "error");

// // console.errorの出力をAssertする
// expect(isExpenseEligibleForSplitting(missingGroupIdData)).toBe(false);
// expect(logSpy).toHaveBeenCalled();
// console.errorの出力をAssertする
expect(isExpenseEligibleForSplitting(missingGroupIdData)).toBe(false);
expect(logSpy).toHaveBeenCalled();

// logSpy.mockRestore();
// });
// });
logSpy.mockRestore();
});
});

describe("補正対象判定処理テスト", () => {
test("典型例: 支払い前でデフォルト負担率(50:50)のデータを処理する", () => {
Expand Down

0 comments on commit ab445ec

Please sign in to comment.