Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add known issue test for path parse issue #6229 #8293

Closed
wants to merge 3 commits into from
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
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: ''}