Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing pipelined should assertions report wrong line number in error #40

Closed
mwrock opened this issue Feb 3, 2013 · 1 comment
Closed

Comments

@mwrock
Copy link
Member

mwrock commented Feb 3, 2013

Here is an example that will illustrate this:

Describe "A line number mis calculation" {
    $someValue = "value"

    it "should be 'wrong'" {
        $someValue | should be 'wrong'
    }
}

The resulting pester failure is:

[-]   should be 'value' 101ms
   Expected: {wrong}, But was {value}
   at line: 49 in C:\dev\boxstarter\tests\pester.tests.ps1

Should be line 5 not 49.

@scottmuc
Copy link
Contributor

scottmuc commented Feb 4, 2013

Hmm, probably didn't notice this because the line number wasn't needed to figure out where my tests were failing during last weeks hacking.

Looks like this needs to be covered by a test somehow. It.ps1 is a pretty messy ball of mud right now and fixing this defect will be a good opportunity to refactor it a little bit.

@mwrock mwrock closed this as completed in 32e8849 Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants