---
id: TST-ACC-TRX-137
title: Receivables aging datasets suite
kind: unit
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/transactions/tests/unit/ar-aging-datasets.spec.js
implements: []
implements_parts: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: In-memory fixtures and test-controlled collaborators.
provenance: test
source: 'services-accounting:modules/transactions/tests/unit/ar-aging-datasets.spec.js'
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/unit/ar-aging-datasets.spec.js
    assertion_titles:
      - Accounting’s query datasets
      - >-
        register the two A/R aging objects for application accounting, after the
        transactions’ objects and their targets
      - >-
        register a dataset over each A/R aging object, after the transactions’
        datasets and their targets
      - >-
        read each object from its published view, which joins the ledger on its
        current version
      - govern each dataset by its own accounting.<dataset>.query key
      - 'start every new query filtered on the period end, asked for when it runs'
      - 'name each record by the view’s id, the period end and the row’s key'
      - >-
        grant the query reader SELECT on named columns of the two views and the
        two tables beneath them, in migration 0040
    imports:
      - 'const { expect } = require(''chai'');'
      - 'const { readFileSync } = require(''node:fs'');'
      - 'const { join } = require(''node:path'');'
      - 'const { getViewConfig } = require(''drizzle-orm/pg-core'');'
      - 'const { MIGRATIONS_DIR } = require(''../../../../db/config'');'
      - >-
        const { accountingMetadataManifest } =
        require('../../../../aws/accounting.metadata');
      - >-
        const { accountingQueriesManifest } =
        require('../../../../aws/accounting.queries');
      - >-
        const { arSnapshotItemsPublished } =
        require('../../db/ar-snapshot-items-published.view');
      - >-
        const { arSnapshotTotalsPublished } =
        require('../../db/ar-snapshot-totals-published.view');
    test_double_declarations: []
---

# Receivables aging datasets suite

## Verification Boundary

The suite exercises financial calculations and input contracts in an isolated test process. Registration records the existing executable file; it does not report a run or establish product approval.

## What This Suite Proves

The executable assertions exercise this module, but no capability or feature scenario binding is established for this file. Its individual assertion titles remain in the evidence register for subsequent mapping.

## What It Does Not Prove

Pure calculations and doubled collaborators do not establish database persistence, route authorization or deployed behavior. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The imported calculation or contract runs with the fixtures and collaborators declared by the test. The evidence register retains those declarations so the boundaries can be inspected.

## Must Not Be Doubled

The calculation or contract being asserted must remain real; replacing it with a predetermined result removes this suite’s evidence.
