sh33dafi/jest-sonar

View on GitHub
src/reporter/relative-path-reporter.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const AbstractReporter = require('./abstract-reporter');
const path = require('path');

class RelativePathReporter extends AbstractReporter {
    constructor(rootDir) {
        super(rootDir);
    }

    mapFilePath(filePath) {
        return path.relative(this.rootDir, filePath);
    }
}

module.exports = RelativePathReporter;