Skip to content

Commit 4ad48c4

Browse files
edmundmillerclaude
andcommitted
test: Implement nft-utils for enhanced snapshot testing
- Update nft-utils plugin from v0.0.3 to v0.0.5 - Replace basic snapshot assertions with nft-utils functions: - Use removeNextflowVersion() to eliminate timestamp variations - Add getAllFilesFromDir() for comprehensive file structure snapshots - Exclude unstable execution files for consistent CI testing - Enhance all test files: bowtie2, chromap, star, skip_trimming, skip_consensus_peaks - Maintain correct test expectations (main tests fail, stub tests pass) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent efa9c51 commit 4ad48c4

6 files changed

Lines changed: 16 additions & 11 deletions

File tree

nf-test.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ config {
1919

2020
// load the necessary plugins
2121
plugins {
22-
load "nft-utils@0.0.3"
22+
load "nft-utils@0.0.5"
2323
}
2424
}

tests/bowtie2.nf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ nextflow_pipeline {
2020
{ assert workflow.failed },
2121
{ assert snapshot(
2222
workflow.trace.succeeded().size(),
23-
path("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml").readLines().first().contains("Workflow"),
24-
file("$outputDir/multiqc/multiqc_report.html").name
23+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
24+
file("$outputDir/multiqc/multiqc_report.html").name,
25+
getAllFilesFromDir("$outputDir", false, ['pipeline_info/execution_*.{html,txt}'], null, ['*.html', '*.txt', '*.yml'])
2526
).match() }
2627
)
2728
}

tests/chromap.nf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ nextflow_pipeline {
2020
{ assert workflow.failed },
2121
{ assert snapshot(
2222
workflow.trace.succeeded().size(),
23-
path("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml").readLines().first().contains("Workflow"),
24-
file("$outputDir/multiqc/multiqc_report.html").name
23+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
24+
file("$outputDir/multiqc/multiqc_report.html").name,
25+
getAllFilesFromDir("$outputDir", false, ['pipeline_info/execution_*.{html,txt}'], null, ['*.html', '*.txt', '*.yml'])
2526
).match() }
2627
)
2728
}

tests/skip_consensus_peaks.nf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ nextflow_pipeline {
2020
{ assert workflow.failed },
2121
{ assert snapshot(
2222
workflow.trace.succeeded().size(),
23-
path("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml").readLines().first().contains("Workflow"),
24-
file("$outputDir/multiqc/multiqc_report.html").name
23+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
24+
file("$outputDir/multiqc/multiqc_report.html").name,
25+
getAllFilesFromDir("$outputDir", false, ['pipeline_info/execution_*.{html,txt}'], null, ['*.html', '*.txt', '*.yml'])
2526
).match() }
2627
)
2728
}

tests/skip_trimming.nf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ nextflow_pipeline {
2020
{ assert workflow.failed },
2121
{ assert snapshot(
2222
workflow.trace.succeeded().size(),
23-
path("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml").readLines().first().contains("Workflow"),
24-
file("$outputDir/multiqc/multiqc_report.html").name
23+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
24+
file("$outputDir/multiqc/multiqc_report.html").name,
25+
getAllFilesFromDir("$outputDir", false, ['pipeline_info/execution_*.{html,txt}'], null, ['*.html', '*.txt', '*.yml'])
2526
).match() }
2627
)
2728
}

tests/star.nf.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ nextflow_pipeline {
2020
{ assert workflow.failed },
2121
{ assert snapshot(
2222
workflow.trace.succeeded().size(),
23-
path("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml").readLines().first().contains("Workflow"),
24-
file("$outputDir/multiqc/multiqc_report.html").name
23+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_chipseq_software_mqc_versions.yml"),
24+
file("$outputDir/multiqc/multiqc_report.html").name,
25+
getAllFilesFromDir("$outputDir", false, ['pipeline_info/execution_*.{html,txt}'], null, ['*.html', '*.txt', '*.yml'])
2526
).match() }
2627
)
2728
}

0 commit comments

Comments
 (0)