-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(core): add transform-type-test.js
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
packages/core/typescript/itk-wasm/test/node/interface-types/transform-type-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import test from 'ava' | ||
|
||
import { | ||
TransformType, | ||
TransformParameterizations | ||
} from '../../../dist/index-node.js' | ||
|
||
test('inputDimension should have a default value of 3', (t) => { | ||
const transformType = new TransformType() | ||
t.is(transformType.inputDimension, 3) | ||
}) | ||
test('inputDimension should have the same value passed to the constructor', (t) => { | ||
const transformType = new TransformType(2) | ||
t.is(transformType.inputDimension, 2) | ||
}) | ||
|
||
test('outputDimension should have a default value of 3', (t) => { | ||
const transformType = new TransformType() | ||
t.is(transformType.outputDimension, 3) | ||
}) | ||
test('outputDimension should have the same value passed to the constructor', (t) => { | ||
const transformType = new TransformType(2, 2) | ||
t.is(transformType.outputDimension, 2) | ||
}) | ||
|
||
test('transformParameterization should have a default value of Identity', (t) => { | ||
const transformType = new TransformType() | ||
t.is( | ||
transformType.transformParameterization, | ||
TransformParameterizations.Identity | ||
) | ||
}) | ||
test('transformParameterization should have the same value passed to the constructor', (t) => { | ||
const transformType = new TransformType( | ||
2, | ||
2, | ||
TransformParameterizations.Affine | ||
) | ||
t.is( | ||
transformType.transformParameterization, | ||
TransformParameterizations.Affine | ||
) | ||
}) |