@datagrok/api-tests
v1.8.0
Published
Automated tests for the [Datagrok JS API](https://datagrok.ai/js-api)
Downloads
57
Keywords
Readme
ApiTests
ApiTests is a package for the Datagrok platform.
To add tests for Datagrok's JS API:
Create a folder under
src/
for your test files (each file typically includes tests for one category)Get the package dependencies (
npm install
)Import the required utilities (refer to other tests as an example):
import { category, expect, test } from '@datagrok-libraries/utils/src/test';
Write some tests
Import your test files in
src/package-test.ts
Publish the package
Open Datagrok and start the console (
~
orWindows | Console
)Launch tests for a category via
ApiTests:test(category="category-name")
, e.g.,ApiTests:test(category="Layouts")
, or a specific test viaApiTests:test(category="category-name", test="test-name")
, e.g.,ApiTests:test(category="Layouts", test="ViewLayout.toJson()")
, and wait for the results