Skip to content
Snippets Groups Projects
Unverified Commit 815413e4 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

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

This is not a full fix for the flakiness. One of the test cases will
still be flaky. But at least this fixes the other test cases thus
improving stability.
parent 4a3fe1d9
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,8 @@ function _generateTransaction(data) { ...@@ -55,9 +55,8 @@ function _generateTransaction(data) {
return { return {
id: id, id: id,
amount: data.amount || Math.floor(Math.random() * 10000 - 7000), amount: data.amount || Math.floor(Math.random() * 10000 - 7000),
payee: data.payee || (Math.random() < 0.9 ? 'payed-to' : 'guy'), payee: data.payee || 'payed-to',
notes: notes: 'Notes',
Math.random() < 0.1 ? 'A really long note that should overflow' : 'Notes',
account: data.account, account: data.account,
date: data.date || monthUtils.currentDay(), date: data.date || monthUtils.currentDay(),
category: data.category, category: data.category,
......
---
category: Maintenance
authors: [MatissJanis]
---
Reducing unit test flakiness by removing randomization
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment