-
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.
Merge pull request #1267 from thewtex/test-transform-io-ts
test(transform-io): add node tests
- Loading branch information
Showing
132 changed files
with
723 additions
and
310 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const defaultImageTag = '20241030-6c93a1be' | ||
const defaultImageTag = '20241107-53b18ede' | ||
export default defaultImageTag |
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
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
5 changes: 5 additions & 0 deletions
5
packages/core/typescript/itk-wasm/src/interface-types/transform-list.ts
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,5 @@ | ||
import Transform from './transform.js' | ||
|
||
type TransformList = Transform[] | ||
|
||
export default TransformList |
6 changes: 4 additions & 2 deletions
6
packages/core/typescript/itk-wasm/src/interface-types/transform-type.ts
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
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
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
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
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
24 changes: 24 additions & 0 deletions
24
packages/core/typescript/itk-wasm/test/node/interface-types/transform-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,24 @@ | ||
import test from 'ava' | ||
|
||
import { Transform, TransformType } from '../../../dist/index-node.js' | ||
|
||
test('transformType should have the same transformType passed to the constructor', t => { | ||
const transform = new Transform() | ||
const defaultTransformType = new TransformType() | ||
t.deepEqual(transform.transformType, defaultTransformType) | ||
}) | ||
|
||
test('name should have the default value of "Transform"', t => { | ||
const transform = new Transform() | ||
t.deepEqual(transform.name, 'Transform') | ||
}) | ||
|
||
test('numberOfFixedParameters should have a default value of 0', t => { | ||
const transform = new Transform() | ||
t.is(transform.numberOfFixedParameters, 0) | ||
}) | ||
|
||
test('numberOfParameters should have a default value of 0', t => { | ||
const transform = new Transform() | ||
t.is(transform.numberOfParameters, 0) | ||
}) |
32 changes: 32 additions & 0 deletions
32
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,32 @@ | ||
import test from 'ava' | ||
|
||
import { | ||
TransformType, | ||
TransformParameterizations, | ||
FloatTypes | ||
} 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('outputDimension should have a default value of 3', (t) => { | ||
const transformType = new TransformType() | ||
t.is(transformType.outputDimension, 3) | ||
}) | ||
|
||
test('transformParameterization should have a default value of Identity', (t) => { | ||
const transformType = new TransformType() | ||
t.is( | ||
transformType.transformParameterization, | ||
TransformParameterizations.Identity | ||
) | ||
}) | ||
test('parametersValueType should have the same value passed to the constructor', (t) => { | ||
const transformType = new TransformType() | ||
t.is( | ||
transformType.parametersValueType, | ||
FloatTypes.Float64 | ||
) | ||
}) |
Oops, something went wrong.