Skip to content

A local-first personal finance app

:white_check_mark: reducing flakiness of tests by removing randomization (#771)

Matiss Janis Aboltins815413e48c86
diff --git a/packages/loot-core/src/mocks/index.js b/packages/loot-core/src/mocks/index.js
index 5be16f256c..fc3b126626 100644
--- a/packages/loot-core/src/mocks/index.js
+++ b/packages/loot-core/src/mocks/index.js
@@ -55,9 +55,8 @@ function _generateTransaction(data) {
return {
id: id,
amount: data.amount || Math.floor(Math.random() * 10000 - 7000),
- payee: data.payee || (Math.random() < 0.9 ? 'payed-to' : 'guy'),
- notes:
- Math.random() < 0.1 ? 'A really long note that should overflow' : 'Notes',
+ payee: data.payee || 'payed-to',
+ notes: 'Notes',
account: data.account,
date: data.date || monthUtils.currentDay(),
category: data.category,
diff --git a/upcoming-release-notes/771.md b/upcoming-release-notes/771.md
new file mode 100644
index 0000000000..522cc09f86
--- /dev/null
+++ b/upcoming-release-notes/771.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Reducing unit test flakiness by removing randomization