node/test/parallel/test-path-posix-relative-on-windows.js
Rich Trott b0d5e036d8 path: fix posix.relative() on Windows
Fixes: https://github.com/nodejs/node/issues/13683

PR-URL: https://github.com/nodejs/node/pull/37747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-04-02 19:30:43 -07:00

10 lines
266 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const path = require('path');
// Refs: https://github.com/nodejs/node/issues/13683
const relativePath = path.posix.relative('a/b/c', '../../x');
assert.match(relativePath, /^(\.\.\/){3,5}x$/);