Skip to content

Commit 9a434ea

Browse files
Fix flaky IAP flow test: spurious async and mock delays (#32)
Agent-Logs-Url: https://github.com/damus-io/api/sessions/9ac7edf6-1445-487b-8ab5-4e8a3fac7d03 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: danieldaquino <24692108+danieldaquino@users.noreply.github.com>
1 parent b5704e8 commit 9a434ea

2 files changed

Lines changed: 11 additions & 21 deletions

File tree

src/iap_refresh_management.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function update_iap_history_with_apple_if_needed_and_return_updated_user(a
4343
}
4444
}
4545

46-
async function should_iap_transaction_history_be_refreshed(account) {
46+
function should_iap_transaction_history_be_refreshed(account) {
4747
const account_active = (account.expiry && current_time() < account.expiry) ? true : false;
4848
const last_transaction = account.transactions[account.transactions.length - 1];
4949
if (account_active || last_transaction == undefined || last_transaction.type != "iap") {

test/controllers/mock_iap_controller.js

Lines changed: 10 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)