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

fix(fullReporter): Fix off-by-one display issue #620

Merged
merged 1 commit into from
Nov 10, 2019

Conversation

elliot-nelson
Copy link
Contributor

SUMMARY

Tweak the fullReporter slightly to display the correct line and column highlighting.

TESTS

No tests included; I don't see an easy way to provide a test for a reporter given the current approach, but let me know if I'm missing something.

TEST CASE

Using this example build, here are before and after screenshots of the output...

// gulpfile.js
module.exports.default = () => {
    const ts = typescript.createProject('tsconfig.json', typescript.reporter.fullReporter());
    return gulp.src('src/ts/example.ts')
        .pipe(ts(typescript.reporter.fullReporter())).js
        .pipe(gulp.dest('dist'));
};
// src/ts/example.ts
export function example() {
    console.log(Math.squeak());
}

BEFORE SCREENSHOT

Screen Shot 2019-07-01 at 7 31 53 AM

AFTER SCREENSHOT

Screen Shot 2019-07-01 at 7 29 51 AM

@ivogabe ivogabe merged commit e006f9b into ivogabe:master Nov 10, 2019
@ivogabe
Copy link
Owner

ivogabe commented Nov 10, 2019

Thanks for your PR Elliot! Sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants