-
-
Notifications
You must be signed in to change notification settings - Fork 88
Simplify default iteration scopes; file scopeHandler #1075
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
Simplify default iteration scopes; file scopeHandler #1075
Conversation
|
||
export default class DocumentScopeHandler implements ScopeHandler { | ||
public readonly scopeType = { type: "line" } as const; | ||
public readonly iterationScopeType = { type: "document" } as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that iteration scope of document is document, so we get "every file" for free, if for whatever reason someone wants to do that 🤔
* might want the default iteration scope to be `"file"`, but you don't need | ||
* to expand to the file just to find instances of the given scope type. | ||
*/ | ||
protected get searchScopeType(): ScopeType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this in preparation for "next air"
/ "every air"
, which will use line
as its search scope, but document
as its iteration scope
if (fixture.thrownError != null) { | ||
throw Error( | ||
`Expected error ${fixture.thrownError.name} but none was thrown` | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to move this so that we could update fixtures that went from error to success
Removes notion of
getIterationScopesTouchingPosition
and instead just calls containing scope on iteration scopeAlso steals
DocumentScopeHandler
from #1073 as that was necessary to make line scope handler work in this new setupChecklist