Skip to content

Commit

Permalink
docs(test): drop tape-catch and link to tape
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Jan 23, 2024
1 parent 51b61f4 commit 81031e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Documentation/content/docs/develop_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This guide illustrates how to add tests to the vtk.js repository and how to run

First each VTK class can have several tests spread among several files but we also have infrastructure for global tests which live inside __Sources/Testing/test*.js__.

vtk.js uses [tape](https://github.com/ljharb/tape) for running tests. Please refer to tape's documentation for more information about the test harness API.

## Class tests

In order to add test to vtk.js you will need to create a __test__ directory underneath your class directory.
Expand All @@ -16,7 +18,7 @@ That __test__ directory should contain as many test file as you like with their
Some vtkClass'es don't necessarily involve rendering and can be tested without a WebGL environment. In which case a plain JavaScript test could be written as follows and an additional test() function could be added within the same file:

```js ClassName/test/testExample.js
import test from 'tape-catch';
import test from 'tape';

import vtkMyClass from '..';

Expand All @@ -41,7 +43,7 @@ test('Validate vtkMyClass properties', (t) => {
## Testing rendering with image comparison

```js ClassName/test/testRendering.js
import test from 'tape-catch';
import test from 'tape';

import vtkOpenGLRenderWindow from '../../../../Rendering/OpenGL/RenderWindow';
import vtkRenderWindow from '../../../../Rendering/Core/RenderWindow';
Expand Down

0 comments on commit 81031e3

Please sign in to comment.