Skip to content

Commit

Permalink
Add test for no fasta
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords committed Jan 21, 2025
1 parent 53a1638 commit 4bb0af1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/nofasta.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
nextflow_pipeline {

name "Test pipeline by skipping trimming options"
script "../main.nf"

test("Params: no fasta") {

when {
params {
outdir = "$outputDir"
skip_alignment = true
fasta = null
additional_fasta = null
salmon_index = null
transcript_fasta = "https://raw.githubusercontent.com/nf-core/test-datasets/d1f59361a013a8820c824d606f5853db0d6c7999/reference/transcriptome_match_gtf.fa"
}
}

then {
// stable_name: All files + folders in ${params.outdir}/ with a stable name
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
// stable_path: All files in ${params.outdir}/ with stable content
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
assertAll(
{ assert workflow.success},
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnaseq_software_mqc_versions.yml"),
// All stable path name, with a relative path
stable_name,
// All files with stable contents
stable_path
).match() }
)
}
}
}

0 comments on commit 4bb0af1

Please sign in to comment.