Skip to content

Commit

Permalink
[Tests] Revert unit test file to prev simpler version
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Apr 11, 2016
1 parent 3efd6da commit ceb3fa3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions test/unit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Minimist from 'minimist';
import Mocha from 'mocha';
import glob from 'glob';
import Glob from 'glob';

const argv = Minimist(process.argv.slice(2), {
alias: {
Expand All @@ -13,19 +13,7 @@ const mocha = new Mocha({
grep: argv.grep ? argv.grep : undefined,
});

const paths = [
`src/**/*${argv.component ? argv.component : '*'}*.spec.js`,
];

let pattern;

if (paths.length > 1) {
pattern = `{${paths.join(',')}}`;
} else {
pattern = paths[0];
}

glob(pattern, {}, (err, files) => {
Glob(`src/**/${argv.component ? argv.component : '*'}.spec.js`, {}, (err, files) => {
files.forEach((file) => mocha.addFile(file));

mocha.run((failures) => {
Expand Down

0 comments on commit ceb3fa3

Please sign in to comment.