-
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.
WIP: test(transform-io): add node tests
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
|
||
export const testInputPath = path.resolve('..', 'test', 'data', 'input') | ||
export const testBaselinePath = path.resolve('..', 'test', 'data', 'baseline') | ||
export const testOutputPath = path.resolve('..', 'test', 'output', 'typescript') | ||
fs.mkdirSync(testOutputPath, { recursive: true }) |
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,14 @@ | ||
import test from 'ava' | ||
import path from 'path' | ||
|
||
import { hdf5ReadTransformNode } from '../../dist/index-node.js' | ||
|
||
import { testInputPath } from './common.js' | ||
|
||
const testInputFilePath = path.join(testInputPath, 'LinearTransform.h5') | ||
|
||
test('Test reading a HDF5 file', async t => { | ||
const { couldRead, transform } = await hdf5ReadTransformNode(testInputFilePath) | ||
t.true(couldRead) | ||
console.log(transform) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.