-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
371 additions
and
369 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
// @ts-nocheck | ||
import { test, expect } from 'vitest' | ||
import { t3 as testFileList } from './lib/testFileList' | ||
import { testDataFile } from './lib/util' | ||
import { dumpWholeFile } from './lib/dumpFile' | ||
import { CramFile } from '../src/index' | ||
import { FetchableSmallFasta } from './lib/fasta' | ||
|
||
testFileList.forEach(filename => { | ||
test(`can dump the whole ${filename} without error`, async () => { | ||
let seqFetch | ||
if (filename.includes('#')) { | ||
const referenceFileName = filename.replace(/#.+$/, '.fa') | ||
const fasta = new FetchableSmallFasta(testDataFile(referenceFileName)) | ||
seqFetch = fasta.fetch.bind(fasta) | ||
} | ||
|
||
const filehandle = testDataFile(filename) | ||
const file = new CramFile({ | ||
filehandle, | ||
seqFetch, | ||
}) | ||
await dumpWholeFile(file) // just try to decode it, no snapshot test for now as it is large | ||
}, 10000) | ||
}) |
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