-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix-1735 Parentheses in developers' paths break cucumber's own tests …
…WIP (#1824) * Extract functions into their own files * Allow injection of exclusion filter to make easier to test * Make sure we always exclude ourselves * Add unit test for getDefinitionLineAndUri * -adds regex pattern for stack traces -removes dependencies for StackFram library * - adds "source-map-support" dependency - progress towards fixing bug for paths with parentheses Cucumber's own features fail when parent directory contains parentheses #1735 - gets accurate line numbers for Error stacks in typescript Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Matt Wynne <matt@mattwynne.net> * update cspotcode/source-map-support * remove .DS_Store * updates unit test to support paths on windows Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com> * Removes assertion for a failing test that's no longer needed Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com> * Removes exception for the custom stack trace feature Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com> * Updates changelog Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com> * fixed linting for previous commit Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com> Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Matt Wynne <matt@mattwynne.net> Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
- Loading branch information
1 parent
29a7a90
commit 704bafa
Showing
6 changed files
with
37 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
src/support_code_library_builder/get_definition_line_and_uri.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/support_code_library_builder/get_definition_line_and_uri_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import assert from 'assert' | ||
import { getDefinitionLineAndUri } from './get_definition_line_and_uri' | ||
import path from 'path' | ||
|
||
describe(getDefinitionLineAndUri.name, () => { | ||
it('correctly gets the filename of the caller', () => { | ||
const includeAnyFile = (): boolean => false | ||
const { uri, line } = getDefinitionLineAndUri('.', includeAnyFile) | ||
assert.strictEqual( | ||
path.normalize(uri), | ||
path.normalize( | ||
'src/support_code_library_builder/get_definition_line_and_uri_spec.ts' | ||
) | ||
) | ||
assert.strictEqual(line, 8) | ||
}) | ||
}) |