Replies: 1 comment 2 replies
-
|
Using
See https://github.com/shellspec/shellspec/blob/master/docs/references.md#evaluation |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a problem getting code coverage to work with shellspec
I have a directory at
$HOME/work/helloIt's contents are as followed:
hello.shlooks like this:echo hellospec/hello_spec.shlooks like this:In
$HOME/work/helloI then executeshellspec --shell bash -f d --kcov --kcov-options="--include-pattern=$(pwd)/hello.sh"To my understanding, this launches shellspec with bash selected as my shell, and using a formatter aliased by
d.--kcovthen enables kcov integration (which I have installed), andkcov-optionsshould then pass--include-patternto point at my scripthello.shThe output shows that the test has executed and passed, yet kcov reports 0% coverage.
When I open
$HOME/work/hello/coverage/index.htmlI can see that kcov succesfully recognized myhello.shfile.It reads the line
echo hello, but it reports no coverage.What am I doing wrong?
I have tried the pattern without
$(PWD), and I have also triedWhen call $(PWD)/hello.shto ensure the paths exactly match.For reference, when I run
kcov coverage hello.shkcov reports 100% coverage just fine.Beta Was this translation helpful? Give feedback.
All reactions