path-utils.js 331 B

12345678910111213141516
  1. 'use strict'
  2. const path = require('path')
  3. const PathUtils = {
  4. formatPathMapping (path, line, column) {
  5. return path + (line ? `:${line}` : '') + (column ? `:${column}` : '')
  6. },
  7. calculateAbsolutePath (karmaRelativePath) {
  8. return path.join(__dirname, '..', '..', karmaRelativePath)
  9. }
  10. }
  11. module.exports = PathUtils