I want to test a newly written function, but I nee...
# nf-test
m
I want to test a newly written function, but I need the output of a process to test it. Anyone any ideas how to fix this?
setup
blocks don’t seem to be supported for
nextflow_function
nf-test issue: https://github.com/askimed/nf-test/issues/344 modules PR: https://github.com/nf-core/modules/pull/10057/changes
👀 1
m
Can you test a function in the same script as a process?
m
not sure how 🤔 Run the function in the assert block?
m
I meant having a separate script just for the function block
m
Ah, I don’t think there’s an issue with the actual location of the code 🤔
n
Sadly,
setup
is not supported in function testing, even though it is possible to use the same way. It just needs to be added. Please make an issue for this 😉
m
see original post 😉
n
ah man I'm blind 😅
🤣 1
Thanks!
a
Why exactly do you need the output of a process to test a function? The output of a process is just a channel no? And what stops you just manually setting up that channel?
m
because I need the process outputs 🤷🏻
I could add the required files to the test-data repo, but I thought using a setup block was cleaner and more “nf-core”