[PR #102] [MERGED] Fix test failure due to non-integer weight values #92918

Closed
opened 2026-05-26 05:01:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/102
Author: @TomAFrench
Created: 6/27/2022
Status: Merged
Merged: 8/23/2022
Merged by: @TomAFrench

Base: masterHead: fix-splitfreq-weights


📝 Commits (6)

  • c94749a test: make all frequency weights be integer values
  • 2846166 fix: revert changes to weights and pin fast-check version to 2.13.0
  • c6335b4 Merge branch 'master' into fix-splitfreq-weights
  • 91967ef fix: revert remaining changed weights
  • 57e0d71 Merge branch 'master' into fix-splitfreq-weights
  • 8f3e9d4 Merge branch 'master' into fix-splitfreq-weights

📊 Changes

2 files changed (+317 additions, -972 deletions)

View changed files

📝 packages/loot-core/package.json (+1 -1)
📝 yarn.lock (+316 -971)

📄 Description

When running the tests I get the below failure:

transaction executors › queries the correct transactions with a filter

  fc.frequency expects weights to be integer values

    128 |     {
    129 |       ...payeeField,
  > 130 |       subtransactions: fc.frequency(
        |                           ^
    131 |         { arbitrary: fc.constant([]), weight: 1 },
    132 |         { arbitrary: fc.array(subtrans), weight: splitFreq }
    133 |       )

The issue seems to be coming from this line.

To fix this I've simply bumped by all the weights by a factor of 100 to ensure they're all integers while maintaining the same ratios.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/102 **Author:** [@TomAFrench](https://github.com/TomAFrench) **Created:** 6/27/2022 **Status:** ✅ Merged **Merged:** 8/23/2022 **Merged by:** [@TomAFrench](https://github.com/TomAFrench) **Base:** `master` ← **Head:** `fix-splitfreq-weights` --- ### 📝 Commits (6) - [`c94749a`](https://github.com/actualbudget/actual/commit/c94749aace5a4c603f26862429893067db59157e) test: make all frequency weights be integer values - [`2846166`](https://github.com/actualbudget/actual/commit/2846166a8e6f85984fa743ff5693989f0ff2086c) fix: revert changes to weights and pin fast-check version to 2.13.0 - [`c6335b4`](https://github.com/actualbudget/actual/commit/c6335b4f57b8634005f2f43cd6011635a8278148) Merge branch 'master' into fix-splitfreq-weights - [`91967ef`](https://github.com/actualbudget/actual/commit/91967ef920632f31505e916bcd4e37c16307bd95) fix: revert remaining changed weights - [`57e0d71`](https://github.com/actualbudget/actual/commit/57e0d713da53452390488059da50a969b5794dfe) Merge branch 'master' into fix-splitfreq-weights - [`8f3e9d4`](https://github.com/actualbudget/actual/commit/8f3e9d4b37018c0371a4652352e2829dfa6b111c) Merge branch 'master' into fix-splitfreq-weights ### 📊 Changes **2 files changed** (+317 additions, -972 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/package.json` (+1 -1) 📝 `yarn.lock` (+316 -971) </details> ### 📄 Description When running the tests I get the below failure: ``` transaction executors › queries the correct transactions with a filter fc.frequency expects weights to be integer values 128 | { 129 | ...payeeField, > 130 | subtransactions: fc.frequency( | ^ 131 | { arbitrary: fc.constant([]), weight: 1 }, 132 | { arbitrary: fc.array(subtrans), weight: splitFreq } 133 | ) ``` The issue seems to be coming from [this line](https://github.com/actualbudget/actual/blob/master/packages/loot-core/src/server/aql/schema/executors.test.js#L322). To fix this I've simply bumped by all the weights by a factor of 100 to ensure they're all integers while maintaining the same ratios. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-26 05:01:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#92918