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

Add failing test for #105 #108

Merged
merged 2 commits into from
Feb 16, 2019
Merged
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
Prev Previous commit
Merge branch 'master' into v9-is-file
  • Loading branch information
sindresorhus authored Feb 16, 2019
commit 437e392a52d5713d13641c58476308186e2a48ad
30 changes: 28 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,28 @@ test('respects gitignore option false - sync', t => {
t.true(actual.indexOf('node_modules') > -1);
});

// https://github.com/sindresorhus/globby/issues/97
test.failing('`{extension: false}` and `expandDirectories.extensions` option', t => {
t.deepEqual(
m.sync(tmp, {
extension: false,
expandDirectories: {
extensions: [
'md',
'tmp'
]
}
}),
[
'a.tmp',
'b.tmp',
'c.tmp',
'd.tmp',
'e.tmp'
]
);
});

// https://github.com/sindresorhus/globby/issues/105
test.failing('throws ENOTDIR when specifying a file as cwd - async', async t => {
const isFile = path.resolve('fixtures/gitignore/bar.js');
Expand All @@ -225,6 +247,10 @@ test.failing('throws ENOTDIR when specifying a file as cwd - async', async t =>
// https://github.com/sindresorhus/globby/issues/105
test.failing('throws ENOTDIR when specifying a file as cwd - sync', t => {
const isFile = path.resolve('fixtures/gitignore/bar.js');
t.throws(() => m.sync('.', {cwd: isFile}), {code: 'ENOTDIR'});
t.throws(() => m.sync('*', {cwd: isFile}), {code: 'ENOTDIR'});
t.throws(() => {
m.sync('.', {cwd: isFile});
}, {code: 'ENOTDIR'});
t.throws(() => {
m.sync('*', {cwd: isFile});
}, {code: 'ENOTDIR'});
});
You are viewing a condensed version of this merge commit. You can view the full changes here.