-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gracefully handle syntax error when importing spec file
Avoid bailing out when using the importer to read in a spec file, if it has a syntax error. Instead, add a suite and an always-failing spec that highlights the location of the syntax error. (Previously, an unhelpful error message would be printed, showing the stack trace of where the spec was imported, not the location of the syntax error within the spec.) Closes: #13
- Loading branch information
Showing
4 changed files
with
26 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Copied from Jasmine, use the original project's coding style | ||
lib/jasmine.js | ||
test/jasmineIntegrationTest.js | ||
|
||
# Deliberate syntax error | ||
test/fixtures/syntaxErrorSpec.js |
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 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,2 @@ | ||
lett foo = 4; | ||
describe('SyntaxError suite', function () {}); |
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