Skip to content

Commit a211611

Browse files
Improve test hack
1 parent c3da39c commit a211611

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/firestore/src/local/simple_db.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,18 @@ export class SimpleDb {
277277
// make this a test-only setting.
278278
// // Horrible hack to verify that idempotent functions can be run more
279279
// // than once.
280-
// const transactionFnResult = (idempotent && attemptNumber === 1
281-
// ? transactionFn(transaction)
282-
// : PersistencePromise.resolve({} as T)
283-
// ).next(() => transactionFn(transaction))
284280
const transactionFnResult = transactionFn(transaction)
281+
// TODO(schmidt-sebastian): Remove this code/comment or find a way to
282+
// make this a test-only setting.
283+
// // Horrible hack to verify that idempotent functions can be run more
284+
// // than once.
285+
// .next(result => {
286+
// if (idempotent && attemptNumber == 1) {
287+
// class DOMException {}
288+
// throw new DOMException();
289+
// }
290+
// return result;
291+
// })
285292
.catch(error => {
286293
// Abort the transaction if there was an error.
287294
transaction.abort(error);

0 commit comments

Comments
 (0)