Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: add known issue test for path parse issue #6229
Refs: #6229
  • Loading branch information
jasnell committed Aug 27, 2016
commit 519162dbda2e95399213d37418e1444874c58a22
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this to the top, just under 'use strict;', and change Issue to Refs for consistency with the other known issue tests.

// 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: ''}