---
id: TST-ACC-TRX-151
title: Snapshot run job views 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/snapshot-run-job-views.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/snapshot-run-job-views.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/unit/snapshot-run-job-views.spec.js
    assertion_titles:
      - the snapshot run job family in Accounting’s cross-job views
      - >-
        is a family of the views, with its three tables and the snapshot and its
        run’s month as its subject
      - >-
        is the kind the run job type registers, so the views list every job of
        it
      - >-
        is read by accounting.cross_job_query as its newest migration defines
        it, exactly as the registry builds it
      - >-
        is read by accounting.cross_job_steps as its newest migration defines
        it, exactly as the registry builds it
      - >-
        is read by accounting.cross_job_events as its newest migration defines
        it, exactly as the registry builds it
      - >-
        is read through security_invoker views, so the caller’s own privileges
        apply beneath them
    imports:
      - 'const { expect } = require(''chai'');'
      - 'const { readdirSync, readFileSync } = require(''node:fs'');'
      - 'const { join } = require(''node:path'');'
      - 'const { MIGRATIONS_DIR } = require(''../../../../db/config'');'
      - >-
        const { getJobTypeIfRegistered, resetJobTypeRegistryForTests } =
        require('@rhythmsoftware/macroservice-jobs/engine/job-type-registry');
      - '} = require(''../../../../db/cross-job-views'');'
      - >-
        const { SNAPSHOT_RUN_JOB_FAMILY_KIND } =
        require('../../db/snapshot-run-jobs.table');
      - >-
        const { ensureSnapshotRunJobTypeRegistered } =
        require('../../services/runs/snapshot-run-workflow');
    test_double_declarations:
      - >-
        const { getJobTypeIfRegistered, resetJobTypeRegistryForTests } =
        require('@rhythmsoftware/macroservice-jobs/engine/job-type-registry');
      - "\tafterEach(resetJobTypeRegistryForTests);"
      - "\t\tresetJobTypeRegistryForTests();"
---

# Snapshot run job views 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.
