Skip to content

Commit

Permalink
feat(espower-loader): use process.cwd() by default
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed Nov 13, 2016
1 parent 0689d4f commit 67edccd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ where `enable-power-assert.js` somewhere in your project is,

```javascript
require('espower-loader')({
cwd: process.cwd(),
pattern: 'test/**/*.js'
});
```
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var pathToMap = {};

function espowerLoader (options) {
'use strict';
options = extend({ cwd: process.cwd() }, options);

var patternStartsWithSlash = (options.pattern.lastIndexOf('/', 0) === 0);
var separator = patternStartsWithSlash ? '' : '/';
Expand Down
20 changes: 1 addition & 19 deletions test_loader/enable-power-assert.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
require('..')({

// directory where match starts with
cwd: process.cwd(),

// glob pattern using minimatch module
pattern: 'test/tobe_instrumented/**/*.js',

// options for espower module
espowerOptions: {
patterns: [
'assert(value, [message])',
'assert.ok(value, [message])',
'assert.equal(actual, expected, [message])',
'assert.notEqual(actual, expected, [message])',
'assert.strictEqual(actual, expected, [message])',
'assert.notStrictEqual(actual, expected, [message])',
'assert.deepEqual(actual, expected, [message])',
'assert.notDeepEqual(actual, expected, [message])'
]
}
pattern: 'test/tobe_instrumented/**/*.js'
});

0 comments on commit 67edccd

Please # to comment.