• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ogonkov / nunjucks-loader / 4279033683

pending completion
4279033683

Pull #161

github

GitHub
Merge ccedf5df5 into 74d84a5c2
Pull Request #161: Bump actions/cache from 3.0.6 to 3.2.6

129 of 177 branches covered (72.88%)

Branch coverage included in aggregate %.

412 of 474 relevant lines covered (86.92%)

101.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/lib/utils/get-import-path.js
1
import {getPathRemover} from './get-path-remover';
2
import {sortBy} from './sort-by';
3

4

5
const isWindows = process.platform === 'win32';
5✔
6
const sortByLength = sortBy('length');
5✔
7

8
/**
9
 * @param {string}   resourcePath
10
 * @param {string[]} searchPaths
11
 * @returns {string}
12
 */
13
export function getImportPath(resourcePath, searchPaths) {
14
    const removeSearchPath = getPathRemover(resourcePath);
99✔
15
    let [importPath] = searchPaths.map(removeSearchPath).sort(sortByLength);
99✔
16

17
    if (isWindows) {
99!
18
        importPath = importPath.replace(/\\/g, '/');
×
19
    }
20

21
    return importPath;
99✔
22
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc