added nf-tests for crisprcleanr/normalize module
Added nf-tests to modules/nf-core/crisprcleanr/normalize module
Added:
-
crisprcleanr/normalize/testssubfolder containingmain.nf.test,main.nf.test.snapandtags.yml
test runs successfully using nf-test test --tag crisprcleanr_normalize --profile dockerusing docker
Hi, i am new to this and have mostly been following the bytesize talk. How do i add stub tests? I have found https://nf-co.re/docs/tutorials/nf-core_components/components but I am still a bit clueless. Thank you for your help
To add a stub test, copy the test and add a line options "-stub" above the when.
But the module itself is missing a stub, so that'd need adding too.
A stub is some code that doesn't actually do anything in the module except produce the expected output files, but allows you to check that the modules are plugged together in the pipeline end-to-end. There isn't a stub here at the moment, so it'd be good to add one.
@LeonHornich , do you need a hand to finish this off?
@LeonHornich , do you need a hand to finish this off?
Hey, sorry for the inconvenience. I forgot about this PR and got busy with other work. I want to understand the implementation, so i'll give it a try soon. In case i need help i'll let you know @SPPearce
One snapshot per test should be enough - you can directly assert the whole output :)
I just pushed the changes, let's see. In https://github.com/nf-core/modules/pull/5740/commits/797104e150065f0cb01e72f37a986fefbb75d0b1 i changed the stub test and encountered failing checks on github. That's why i decided to change it in https://github.com/nf-core/modules/pull/5740/commits/96d5e11fc74c90d08f88f4d97858151c0a4039b6 . But maybe the originally failing checks where not because of the stub assertions but because of the assertions for the main module tests
If anyone wants to help or play around with it feel free to do so. Maybe there is something in the stub that i am not aware of that causes the tests to fail
I think the snap file has to be updated by running nf-core modules test crisprcleanr/normalize -u locally and pushed to this PR - then the tests should succeed :)
Let's get this in.