Skip to content

Commit

Permalink
test: add known issue test for path parse issue nodejs#6229
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Aug 27, 2016
1 parent a6d53c6 commit 519162d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/known_issues/test-path-parse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

require('../common');
const assert = require('assert');
const path = require('path');

// Issue: https://github.com/nodejs/node/issues/6229
// The path `/foo/bar` is not the same path as `/foo/bar/`
const parsed1 = path.parse('/foo/bar');
const parsed2 = path.parse('/foo/bar/');

assert.notDeepStrictEqual(parsed1, parsed2);

// parsed1 *should* equal:
// {root: '/', dir: '/foo', base: 'bar', ext: '', name: 'bar'}
//
// parsed2 *should* equal:
// {root: '/', dir: '/foo/bar', base: '', ext: '', name: ''}

0 comments on commit 519162d

Please sign in to comment.