nf-test
nf-test copied to clipboard
Test file not created for workflow when workflow.onComplete is in main.nf
Hi,
I have been trying to generate a testing file for a subworkflow using nf-test generate workflow /path/to/main.nf. The specificity of my subworkflow is that I have a Completion handler workflow.onComplete at the end of my main.nf. When I try to generate the test file I get this error:
Load source file '/path/to/subworkflow/main.nf'
Skipped. More then one named workflow definition found. Please create one file per workflow.
SUCCESS: Generated 0 test files.
I commented the workflow.onComplete section and it worked.
Load source file '/path/to/subworkflow/main.nf
Wrote workflow test file '/path/to/tests/subworkflow/main.nf.test
SUCCESS: Generated 1 test files.
I was wondering if it was going to be a problem for the testing of my subworkflow. Is there something I should update?
Many thanks,
Pauline