Package

Functions Testing Experimental

A local-first mocking package that suggests external function development is becoming a first-class workflow.

package @osdk/functions-testing.experimental
first seen 2026-02
inspected version 0.2.0-beta.3
latest stable -
status
experimental

Relevant code

Most revealing source snippet

published: build/esm/mock/createMockClient.js

packages/functions-testing.experimental/src/mock/createMockClient.ts

open source file ->
export function createMockClient() {
  const stubs = [];
  const queryStubs = [];

  mockClient.whenQuery = (query, params) => ({
    thenReturn: result => {
      queryStubs.push({ queryApiName: query.apiName, params, value: result });
    }
  });
}

Notes

Why it matters

This package matters because it changes the implied workflow.

Instead of assuming all interesting testing happens inside Foundry, it suggests Palantir expects developers to write and validate function logic locally.

That fits the broader discovery and SDK-generation story: ontology and function development are becoming more toolable outside the platform UI.

This package gained useful behavior quickly: object mocking, object-set mocking, then query stubbing and exported helpers. That is a substantive increase in local test ergonomics.