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

Add fallback startline #1678

Merged
merged 3 commits into from
Sep 9, 2020
Merged

Add fallback startline #1678

merged 3 commits into from
Sep 9, 2020

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented Sep 8, 2020

1. General summary of the pull request

#1664 changed the way StartLine in test/block-objects where detected to fix linefilter in scenarios where It/Context/Describe has the scriptblock-start on a different line than the function name. This added a requirement to specify a StartLine-parameter when using New-Test/Block directly which might break som custom solutions and makes RSpec-tests unnecessary complicated.

This PR adds a fallback to New-*Test/Block which ensure StartLine always has a value; either provided as a parameter or equal to the line where New-*Test/Block where called directly.

Fix #1673

Reverts extraction of re-run test in 459a4b7
src/Pester.Runtime.psm1 Outdated Show resolved Hide resolved
@nohwnd nohwnd merged commit 4aeaf52 into pester:v5.0 Sep 9, 2020
@nohwnd
Copy link
Member

nohwnd commented Sep 9, 2020

Great job! Btw do you have twitter? DM me there if you have, but DMs are open, and I can then mention you when tweeting releases.

@fflaten fflaten deleted the fallback-startline branch September 9, 2020 18:36
@fflaten fflaten changed the title Add fallbackFallback startline Add fallback startline May 23, 2021
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

Successfully merging this pull request may close these issues.

$StartLine fallback
2 participants