Skip to content

Commit

Permalink
Update fastaIndex nf-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emi80 committed Apr 18, 2024
1 parent 1ddc282 commit d0bb5a7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
23 changes: 18 additions & 5 deletions tests/modules/fastaIndex/samtools/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,38 @@ nextflow_process {

tag "module"

test("Should produce the fasta index") {
test("Should produce the fasta index (compressed genome)") {

when {
process {
"""
input[0] = "${baseDir}/data/genome.fa"
input[0] = "${baseDir}/data/genome.fa.gz"
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
with(process.out[0]) {
assert size() == 1
assert path(get(0)).md5 == "12d36d122df8dfe8fcfc96d78f785328"
}

}

test("Should produce the fasta index (uncompressed genome)") {

when {
process {
"""
input[0] = "${baseDir}/data/genome.fa"
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
}

}

}
18 changes: 16 additions & 2 deletions tests/modules/fastaIndex/samtools/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Should produce the fasta index": {
"Should produce the fasta index (compressed genome)": {
"content": [
{
"0": [
Expand All @@ -11,6 +11,20 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-16T11:50:45.127291"
"timestamp": "2024-04-18T18:59:06.37067"
},
"Should produce the fasta index (uncompressed genome)": {
"content": [
{
"0": [
"genome.fa.fai:md5,12d36d122df8dfe8fcfc96d78f785328"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-18T18:59:15.457162"
}
}

0 comments on commit d0bb5a7

Please sign in to comment.