-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
log typescript errors to console #1834
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d0a0008
log typescript errors to console
btkostner a5048de
add reporter tests for typescript errors
btkostner cdbebff
Merge branch 'master' into pr/1834
novemberborn 441efdd
Revert source-map-initial fixture changes
novemberborn 50bd946
Fix typo in cacheEnabled option
novemberborn 50bf3ea
Take a different approach to building options for TypeScript integrat…
novemberborn bbf04f2
Update TypeScript build error fixture
novemberborn b0de20f
Tweak reporter output
novemberborn c398fbc
Normalize TS diagostic text line endings so tests pass on AppVeyor
novemberborn 434aaa1
Normalize line endings for TAP reporter too
novemberborn 570cd5b
Apply custom sanitizers *first*, otherwise the posix one breaks repla…
novemberborn 091fe72
Don't run TypeScript integration test for TAP reporter
novemberborn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
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
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 @@ | ||
this.is.a.build.error() |
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 @@ | ||
{} |
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,23 +1,22 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
var _sourceMapFixtures = require('source-map-fixtures'); | ||
var _sourceMapFixtures = require("source-map-fixtures"); | ||
|
||
var _ = require('../../'); | ||
|
||
var _2 = _interopRequireDefault(_); | ||
var _ = _interopRequireDefault(require("../../")); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
const fixture = (0, _sourceMapFixtures.mapFile)('throws').require(); | ||
|
||
// The uncaught exception is passed to the corresponding cli test. The line | ||
const fixture = (0, _sourceMapFixtures.mapFile)('throws').require(); // The uncaught exception is passed to the corresponding cli test. The line | ||
// numbers from the 'throws' fixture (which uses a map file), as well as the | ||
// line of the fixture.run() call, should match the source lines from this | ||
// string. | ||
(0, _2.default)('throw an uncaught exception', t => { | ||
setImmediate(run); | ||
t.pass(); | ||
|
||
|
||
(0, _.default)('throw an uncaught exception', t => { | ||
setImmediate(run); | ||
t.pass(); | ||
}); | ||
|
||
const run = () => fixture.run(); | ||
//# sourceMappingURL=./source-map-initial.js.map | ||
// Generated using node test/fixtures/_generate-source-map-initial.js |
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
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,24 @@ | ||
[?25l---tty-stream-chunk-separator | ||
|
||
---tty-stream-chunk-separator | ||
* ---tty-stream-chunk-separator | ||
[2K[1G---tty-stream-chunk-separator | ||
[?25h | ||
[31m1 uncaught exception[39m | ||
|
||
[1m[37mUncaught exception in test/fixture/report/typescript/build-error.ts[39m[22m | ||
|
||
[90m~/node_modules/ts-node/src/index.ts:250[39m | ||
|
||
TSError: ⨯ Unable to compile TypeScript: | ||
|
||
build-error.ts(3,1): error TS2532: Object is possibly 'undefined'. | ||
|
||
|
||
[90mcreateTSError (~/node_modules/ts-node/src/index.ts:250:12)[39m | ||
[90mgetOutput (~/node_modules/ts-node/src/index.ts:358:40)[39m | ||
[90mObject.compile (~/node_modules/ts-node/src/index.ts:545:11)[39m | ||
[90mModule.m._compile (~/node_modules/ts-node/src/index.ts:430:43)[39m | ||
[90mObject.require.extensions.(anonymous function) [as .ts] (~/node_modules/ts-node/src/index.ts:433:12)[39m | ||
|
||
---tty-stream-chunk-separator |
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,27 @@ | ||
TAP version 13 | ||
---tty-stream-chunk-separator | ||
# TSError: ⨯ Unable to compile TypeScript: | ||
not ok 1 - TSError: ⨯ Unable to compile TypeScript: | ||
--- | ||
diagnosticText: | | ||
build-error.ts(3,1): error TS2532: Object is possibly 'undefined'. | ||
diagnosticCodes: [] | ||
name: TSError | ||
message: | | ||
⨯ Unable to compile TypeScript: | ||
build-error.ts(3,1): error TS2532: Object is possibly 'undefined'. | ||
at: >- | ||
createTSError | ||
(~/node_modules/ts-node/src/index.ts:250:12) | ||
... | ||
---tty-stream-chunk-separator | ||
# test/fixture/report/typescript/build-error.ts exited with a non-zero exit code: 1 | ||
not ok 2 - test/fixture/report/typescript/build-error.ts exited with a non-zero exit code: 1 | ||
---tty-stream-chunk-separator | ||
|
||
1..0 | ||
# tests 0 | ||
# pass 0 | ||
# fail 2 | ||
|
||
---tty-stream-chunk-separator |
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,24 @@ | ||
|
||
---tty-stream-chunk-separator | ||
[1m[37mUncaught exception in test/fixture/report/typescript/build-error.ts[39m[22m | ||
|
||
[90m~/node_modules/ts-node/src/index.ts:250[39m | ||
|
||
TSError: ⨯ Unable to compile TypeScript: | ||
|
||
build-error.ts(3,1): error TS2532: Object is possibly 'undefined'. | ||
|
||
|
||
[90mcreateTSError (~/node_modules/ts-node/src/index.ts:250:12)[39m | ||
[90mgetOutput (~/node_modules/ts-node/src/index.ts:358:40)[39m | ||
[90mObject.compile (~/node_modules/ts-node/src/index.ts:545:11)[39m | ||
[90mModule.m._compile (~/node_modules/ts-node/src/index.ts:430:43)[39m | ||
[90mObject.require.extensions.(anonymous function) [as .ts] (~/node_modules/ts-node/src/index.ts:433:12)[39m | ||
|
||
---tty-stream-chunk-separator | ||
[31m✖ test/fixture/report/typescript/build-error.ts exited with a non-zero exit code: 1[39m | ||
---tty-stream-chunk-separator | ||
|
||
[31m1 uncaught exception[39m | ||
|
||
---tty-stream-chunk-separator |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These changes were made by the linter