Skip to content

Commit

Permalink
Sort channels before creating the snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
AmstlerStephan committed Jun 20, 2024
1 parent 37ad152 commit 2204535
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tests/lib/processes/map_reads.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ nextflow_process {

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

}
Expand All @@ -45,7 +45,7 @@ nextflow_process {

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

}
Expand All @@ -68,7 +68,7 @@ nextflow_process {

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

}
Expand Down
26 changes: 26 additions & 0 deletions tests/lib/processes/map_reads.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"Maps raw reads and should run with success": {
"content": null,
"meta": {
"nf-test": "0.9.0-rc2",
"nextflow": "24.05.0"
},
"timestamp": "2024-06-20T15:14:00.481095"
},
"Maps consensus reads and should run with success": {
"content": null,
"meta": {
"nf-test": "0.9.0-rc2",
"nextflow": "24.05.0"
},
"timestamp": "2024-06-20T15:36:33.416682"
},
"Maps final consensus reads and should run with success": {
"content": null,
"meta": {
"nf-test": "0.9.0-rc2",
"nextflow": "24.05.0"
},
"timestamp": "2024-06-20T15:36:44.226869"
}
}
12 changes: 4 additions & 8 deletions tests/lib/processes/merge_input.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ nextflow_process {
}
process {
"""
input[0] = Channel.from("$baseDir/tests/input/merge_fastq/")
input[0] = Channel.from("$baseDir/tests/input/merge_fastq/").collect(sort: true)
"""
}
}

then {
def file = path(process.out.merged_fastq[0][2])
assert file.size() == 34240216
assert process.success
// assert snapshot(process.out).match()
assert snapshot(process.out).match()

}

Expand All @@ -37,16 +35,14 @@ nextflow_process {
}
process {
"""
input[0] = Channel.from("$baseDir/tests/input/merge_fastq/")
input[0] = Channel.from("$baseDir/tests/input/merge_fastq/").collect(sort: true)
"""
}
}

then {
def file = path(process.out.merged_fastq[0][2])
assert file.size() == 0
assert process.success
// assert snapshot(process.out).match()
assert snapshot(process.out).match()
}

}
Expand Down

0 comments on commit 2204535

Please sign in to comment.