npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fabricorg/databricks-testkit

v0.6.0

Published

Testing toolkit for Databricks artifacts — DuckDB/local + live workspace execution contexts, fixtures, golden results, and cross-engine parity suites.

Readme

@fabricorg/databricks-testkit

Testing toolkit for Databricks artifacts (ADR-0006). One ExecutionContext, two profiles:

  • local — DuckDB in-process (@duckdb/node-api, optional peer). No workspace, no credentials, sub-second. The default.
  • live — a real Databricks SQL warehouse via the SQL Statement Execution API, built on @fabric-harness/databricks. Always gated by DBX_TEST_LIVE=1.

Positional ? params work in both profiles — the live context transparently rewrites them to the named markers the Statement Execution API requires.

import { createExecutionContext, expectTable } from '@fabricorg/databricks-testkit';

const ctx = await createExecutionContext(); // DBX_TEST_PROFILE=local|live
await ctx.loadFixture({
  table: 'conversions',
  schema: 'subject_id STRING, value DOUBLE, "at" TIMESTAMP',
  rows: [['s1', 49, '2026-07-01T12:00:00Z']],
});
await expectTable(ctx, 'conversions').toHaveRowCount(1);
await ctx.close();

Cross-engine parity suites

// vitest file — import from the /parity subpath
import { defineParitySuite } from '@fabricorg/databricks-testkit/parity';

defineParitySuite({
  name: 'aggregate-attribution',
  sql: aggregateSql,
  params,
  fixtures: [...],
  golden: 'golden/aggregate-attribution.json',
});

DuckDB must reproduce the committed golden rows on every run; with DBX_TEST_LIVE=1 the same statement also runs on Databricks and both engines must agree. Create/refresh goldens with DBX_TEST_UPDATE_GOLDEN=1 and commit the diff. See src/parity.dogfood.test.ts for the canonical example (it locks the product's own aggregate SQL).

Unit-testing orchestration logic

createMockDatabricksClient() is a framework-free fake of the REST client surface — queue responses per (method, path-prefix) to drive submit → poll → terminal state machines without a workspace.

Live environment

DBX_TEST_LIVE=1
DATABRICKS_HOST=https://<workspace>.cloud.databricks.com
DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/<id>   # or DATABRICKS_WAREHOUSE_ID
DBX_TEST_CATALOG=fx_test
DBX_TEST_SCHEMA=scenarios
# Seeded live tables are replaced on load and dropped on close. For debugging only:
# DBX_TEST_KEEP_FIXTURES=1
# auth precedence: DATABRICKS_BEARER → DATABRICKS_CLIENT_ID/SECRET (OAuth M2M) → DATABRICKS_TOKEN (PAT)

Databricks workload checks

The live suite includes SQL, Delta contracts, Unity Catalog access, Jobs, Lakeflow pipelines, Lakebase credential exchange and provider refresh, Unity Catalog Volume I/O, Databricks Apps/resource health, secret metadata, isolated Auto Loader ingestion, notebook submit, and dbt build. Checks are independently configured and report pass | fail | not-configured; only IDs listed in DBX_TEST_REQUIRED_CHECKS gate a run.

Auto Loader full refreshes require a distinct DBX_TEST_AUTOLOADER_PIPELINE_ID. The check refuses to use DBX_TEST_PIPELINE_ID, protecting production telemetry.

Typed target packs

Target packs bind a workload adapter, offline unit tests, live checks, documentation, certification scope, and Quality Center metadata into one versioned contract. Built-in packs cover SQL/Delta, Lakeflow ingestion, Jobs/code, Unity Catalog storage, Apps operations, Lakeflow Jobs orchestration, advanced streaming/CDC, AI/BI and Genie, MLflow, feature engineering, Model Serving and AI Gateway, Vector Search/RAG/agents, federation/sharing/Clean Rooms, and security/cost/DR.

import {
  builtinTargetPacks,
  createTargetPackRegistry,
  doctorTargetPack,
  runTargetPack,
} from '@fabricorg/databricks-testkit';

const pack = createTargetPackRegistry(builtinTargetPacks).get('lakeflow-jobs');
if (!pack) throw new Error('lakeflow-jobs target pack is not installed');
const diagnosis = doctorTargetPack(pack, process.env);
if (!diagnosis.ready) throw new Error(diagnosis.missing.join(', '));

const evidence = await runTargetPack(pack, {
  env: process.env,
  live: true,
});

The Lakeflow Jobs adapter models notebook, wheel, JAR, Spark Python, submit, pipeline, SQL, dbt, nested-job, condition, and for-each tasks, including graph validation, cancellation, repair, and task-level terminal-state assertions.

Advanced packs use DatabricksAdvancedWorkloadsAdapter, an injectable typed wrapper over the supported pipeline, Lakeview, Genie, MLflow, Unity Catalog, Online/Synced Table, Model Serving, Vector Search, federation, sharing, Clean Room, policy, and warehouse APIs. Pack-required request JSON and SQL assertions exercise the data plane; metadata-only probes are not enough to satisfy a certification-ready doctor result.

Docs: apps/docs/content/docs/testing/ · Plan: .weave/plans/databricks-testing.md · BDD layer: @fabricorg/databricks-bdd (Phase 2).