MCPcopy
hub / github.com/shelljs/shelljs / abs

Function abs

test/config.js:161–167  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

159 shell.config.globOptions = { absolute: true };
160 const result = common.expand(['test/resources/*a*']);
161 function abs(file) {
162 // Normalize to posix-style path separators on all platforms.
163 const CWD = process.platform === 'win32' ?
164 process.cwd().replace(/\\/g, '/') :
165 process.cwd();
166 return path.posix.join(CWD, file);
167 }
168 const expected = [
169 abs('test/resources/a.txt'),
170 abs('test/resources/badlink'),

Callers 1

config.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected