NET-Web-API-w-Angular/my-app/node_modules/karma/lib/utils/pattern-utils.js

15 lines
376 B
JavaScript
Raw Normal View History

2024-02-09 00:38:41 +00:00
'use strict'
const path = require('path')
const PatternUtils = {
getBaseDir (pattern) {
return pattern
.replace(/[/\\][^/\\]*\*.*$/, '') // remove parts with *
.replace(/[/\\][^/\\]*[!+]\(.*$/, '') // remove parts with !(...) and +(...)
.replace(/[/\\][^/\\]*\)\?.*$/, '') || path.sep // remove parts with (...)?
}
}
module.exports = PatternUtils