Skip to content

Commit 0a71426

Browse files
Improve test hack
1 parent c3da39c commit 0a71426

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

packages/firestore/src/local/simple_db.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,18 @@ export class SimpleDb {
273273
objectStores
274274
);
275275
try {
276-
// TODO(schmidt-sebastian): Remove this code/comment or find a way to
277-
// make this a test-only setting.
278-
// // Horrible hack to verify that idempotent functions can be run more
279-
// // than once.
280-
// const transactionFnResult = (idempotent && attemptNumber === 1
281-
// ? transactionFn(transaction)
282-
// : PersistencePromise.resolve({} as T)
283-
// ).next(() => transactionFn(transaction))
284276
const transactionFnResult = transactionFn(transaction)
277+
// TODO(schmidt-sebastian): Remove this code/comment or find a way to
278+
// make this a test-only setting.
279+
// // Horrible hack to verify that idempotent functions can be run more
280+
// // than once.
281+
// .next(result => {
282+
// if (idempotent && attemptNumber == 1) {
283+
// class DOMException {}
284+
// throw new DOMException();
285+
// }
286+
// return result;
287+
// })
285288
.catch(error => {
286289
// Abort the transaction if there was an error.
287290
transaction.abort(error);

0 commit comments

Comments
 (0)