本文へ移動
cccskills
無料GitHub で公開

create-tests-for-demo-model

Create tests for Diff Studio demo models

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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);

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

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).

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

Add unit tests to a Datagrok package

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

datagrok-ai/public742026年10月12日 更新

datagrok-ai のスキルをすべて見る

このスキルの問題を報告する