-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(babel): remove dependency on babel
remove dependency on babel, simplifying build process also moving devDependencies into Travis steps BREAKING CHANGE: module exports path changed to just `lib/index.js` Closes: #44
- Loading branch information
Ahmad Nassri
committed
Dec 16, 2016
1 parent
5bdb0ce
commit 451f0ac
Showing
8 changed files
with
51 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,5 @@ engines: | |
|
||
ratings: | ||
paths: | ||
- src/** | ||
- lib/** | ||
- test/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
*.log | ||
/lib | ||
/node_modules | ||
/.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
import glob from '../src/index' | ||
import { test } from 'tap' | ||
'use strict' | ||
|
||
test('should successfully parse', (assert) => { | ||
const glob = require('../src/index') | ||
const test = require('tap').test | ||
|
||
test('should successfully parse', assert => { | ||
assert.plan(2) | ||
|
||
glob('test/**') | ||
.then((files) => { | ||
.then(files => { | ||
assert.type(files, Array) | ||
assert.same(files, [ 'test', 'test/index.js' ]) | ||
}) | ||
}) | ||
|
||
test('should be rejected when globbing fails', (assert) => { | ||
test('should be rejected when globbing fails', assert => { | ||
assert.plan(1) | ||
|
||
glob('/**/*') | ||
.catch((err) => assert.equal(err.code, 'EACCES')) | ||
.catch(err => assert.equal(err.code, 'EACCES')) | ||
}) | ||
|
||
test('should throw a type error when the first argument is not a string.', (assert) => { | ||
test('should throw a type error when the first argument is not a string.', assert => { | ||
assert.plan(1) | ||
|
||
glob({}) | ||
.catch((err) => assert.equal(err.message, 'glob pattern string required')) | ||
.catch(err => assert.equal(err.message, 'glob pattern string required')) | ||
}) | ||
|
||
test('should throw a type error when it takes no arguments.', (assert) => { | ||
test('should throw a type error when it takes no arguments.', assert => { | ||
assert.plan(1) | ||
|
||
glob() | ||
.catch((err) => assert.equal(err.message, 'glob pattern string required')) | ||
.catch(err => assert.equal(err.message, 'glob pattern string required')) | ||
}) |