Skip to content
cccskills
FreePublished on GitHub

create-tests-for-demo-model

Create tests for Diff Studio demo models

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Create Tests for Diff Studio Demo Model

Create tests for a Diff Studio model defined in the TS file at the path specified in the argument.

Instructions

  1. Parse input: extract the path to the TS file from the argument. Verify the file exists and has a .ts extension.

  2. Read the TS file: open it and locate the single exported object of type ModelInfo. Note:

    • The export name (e.g., export const myModel: ModelInfo = { ... }).
    • The equations field of the exported object.
  3. Extract the file name: derive the base file name (without directory path and without the .ts extension) from the given path. This will be used as the test case name.

  4. Update the test file src/tests/demo-models-tests.ts:

    a. Add import: at the top of the file (with other imports), add:

      import { <exportName> } from '<relative-path-to-ts-file>';
  Use the correct relative path from `src/tests/` to the target file (without the `.ts` extension in the import path).

b. Add test case: inside the 'Demo models' category block, add a call to testTemplate (imported from ./test-utils):

      testTemplate('<file-name>', <exportName>.equations);
  - First argument: string with the TS file name (e.g., `'my-model'`).
  - Second argument: the `equations` field of the imported `ModelInfo` object.

c. Placement: add the new test case in alphabetical order relative to existing test cases, or at the end of the 'Demo models' category if ordering is not established.

Example

Given argument: src/demos/acid-base.ts

If the file exports:

export const acidBase: ModelInfo = { equations: `...`, ... };

Then in src/tests/demo-models-tests.ts:

import { acidBase } from '../demos/acid-base';
// ...
testTemplate('acid-base', acidBase.equations);

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Add support for a new curve data format in the Curves package converter system

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Create info panels that appear in the context panel based on semantic types

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Add unit tests to a Datagrok package

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test; the same scenarios, filmed in help mode, are the GIFs of the help pages

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

See all skills by datagrok-ai

Report a problem with this skill