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

Suite only not anchored to title start #2298

Closed
ScottFreeCode opened this issue Jun 8, 2016 · 3 comments
Closed

Suite only not anchored to title start #2298

ScottFreeCode opened this issue Jun 8, 2016 · 3 comments
Labels
status: waiting for author waiting on response from OP - more information needed type: bug a defect, confirmed by a maintainer

Comments

@ScottFreeCode
Copy link
Contributor

In the process of looking into #2157 (comment), I noticed that the BDD interface's it.only escapes the regular expression and requires it to match the whole title with ^ and $, but describe.only merely passes the string to grep, which escapes it but does not require it to begin with ^. This same issue also affects the QUnit and TDD interfaces.

Contrived example:

describe.only("one", function() {
  it("two", function() { /* succeed */ })
})
describe("you know", function() {
  it("one of these should not run", function() {
    throw new Error("Specifically, this one should not run!")
  })
})
@ScottFreeCode
Copy link
Contributor Author

ScottFreeCode commented Jun 9, 2016

Something similar goes for the links in the HTML reporter; the test ones should use ^ and $ to require matching the whole title, and the suite ones should use ^ to require matching the start of the title. (Note that this code is in the same area as #2285 and #2300.)

@boneskull boneskull added type: bug a defect, confirmed by a maintainer confirmed labels Jun 27, 2016
@boneskull
Copy link
Contributor

boneskull commented Jul 3, 2016

@ScottFreeCode I merged 8a75434 into v3.0.0 branch. does this solve the issue?

@boneskull boneskull added the status: waiting for author waiting on response from OP - more information needed label Jul 3, 2016
@ScottFreeCode
Copy link
Contributor Author

Sorry I missed this!

Making only programmatic resolved the primary issue here.

It looks like the HTML links still have the same sort of problem, however. Do we have another issue for it? If not, I will open one instead of keeping this issue open for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author waiting on response from OP - more information needed type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants