Skip to content

assertrust v0.1.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 11:45
v0.1.0
fc6ac2b

The first release of assertrust: it catches changes that quietly make a test suite weaker, like an assertion removed, a matcher loosened, a test skipped or a CI gate relaxed. It reads TypeScript and JavaScript tests written with vitest, jest or Playwright, names the commit that weakened a test, and needs no API key.

test/api/forwarding.test.ts:27  HIGH  expectation-loosened
  toMatchObject no longer checks domainIds, status · 10d8742

Use it on GitHub

name: assertrust
on:
  pull_request:
  push:
    branches: [main]
permissions:
  contents: read
  pull-requests: write # for the summary comment
jobs:
  assertrust:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
      - uses: BeyondFolder/assertrust@v0

Findings show up as annotations on the diff and in one PR comment. The README has every input, command and setting.

Status: early. On the history of 10 public repos and one private one, half of what it shows is right, and 70% at high confidence. So it only warns unless you set fail-on. Linux and macOS only for now; Windows, npm and crates.io come later.

Release Notes

The first release: a CLI and a GitHub Action that flag changes weakening a TypeScript or JavaScript test suite (vitest, jest, Playwright).

  • assertrust check finds removed checks, looser matchers, checks that accept more, disabled tests, checks that can no longer fail, and CI or test config that lets failures through. Checks in helper functions, hooks and helper class methods count for the tests that use them.
  • PR-style checks name the commit behind each finding and hide weakening undone later in the PR, or done to tests the PR itself added.
  • Output as text, JSON ("schema": 1) or GitHub annotations with a job summary; fail-on decides the exit code, warn-only by default.
  • Allow comments and Assertrust-Allow commit trailers acknowledge a deliberate change, with a reason.
  • assertrust.toml sets fail-on, which files are tests, helpers and gates, and which rules run. A change can't loosen its own check.
  • assertrust backtest replays a branch's history PR by PR, and measures precision against labels.
  • assertrust changes, tests and pairs show what a check sees.
  • The GitHub Action (BeyondFolder/assertrust@v0) checks pull requests and pushes, annotates the diff, and keeps one PR comment once there are findings.
  • Builds for Linux and macOS (x64 and arm64), with a shell installer.

Install assertrust 0.1.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/BeyondFolder/assertrust/releases/download/v0.1.0/assertrust-installer.sh | sh

Download assertrust 0.1.0

File Platform Checksum
assertrust-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
assertrust-x86_64-apple-darwin.tar.xz Intel macOS checksum
assertrust-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
assertrust-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum