|
1 | | -import test from 'tape'; |
| 1 | +import { it, expect } from 'vitest'; |
2 | 2 | import vtkDataArray from 'vtk.js/Sources/Common/Core/DataArray'; |
3 | 3 | import vtkPoints from 'vtk.js/Sources/Common/Core/Points'; |
4 | 4 | import vtkCellArray from 'vtk.js/Sources/Common/Core/CellArray'; |
@@ -280,13 +280,12 @@ it('vtkTriangleStrip - intersectWithLine', () => { |
280 | 280 | const p3 = [-2, 0, 0]; |
281 | 281 | const p4 = [-1, 0, 0]; |
282 | 282 | const result2 = triangleStrip.intersectWithLine(p3, p4, tol, x, pcoords); |
283 | | - |
284 | | - tc.notOk(result2.intersect, 'Should not intersect with line outside strip'); |
285 | | - |
286 | | - tc.end(); |
| 283 | + expect(result2.intersect, 'Should not intersect with line outside strip').toBe( |
| 284 | + false |
| 285 | + ); |
287 | 286 | }); |
288 | 287 |
|
289 | | -test('vtkTriangleStrip - clip', (t) => { |
| 288 | +it('vtkTriangleStrip - clip', () => { |
290 | 289 | const triangleStrip = vtkTriangleStrip.newInstance(); |
291 | 290 | const points = vtkPoints.newInstance(); |
292 | 291 | points.setData(Float32Array.from([-1, 0, 0, 1, 0, 0, -1, 1, 0, 1, 1, 0]), 3); |
@@ -320,14 +319,12 @@ test('vtkTriangleStrip - clip', (t) => { |
320 | 319 | false |
321 | 320 | ); |
322 | 321 |
|
323 | | - t.equal(tris.getNumberOfCells(), 3, 'Should clip strip into 3 triangles'); |
324 | | - t.equal( |
| 322 | + expect(tris.getNumberOfCells(), 'Should clip strip into 3 triangles').toBe(3); |
| 323 | + expect( |
325 | 324 | locatorPoints.getNumberOfPoints(), |
326 | 325 | 5, |
327 | 326 | 'Should create 5 unique kept points' |
328 | | - ); |
329 | | - |
330 | | - t.end(); |
| 327 | + ).toBe(5); |
331 | 328 | }); |
332 | 329 |
|
333 | 330 | it('vtkTriangleStrip - getParametricCenter', () => { |
|
0 commit comments