Skip to content

Commit

Permalink
readme: make module paths relative (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
rus0000 authored and bendrucker committed Jun 3, 2017
1 parent af2c869 commit 62de97c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -292,14 +292,14 @@ Watch out for more warnings below.

```javascript
// foo.js
var bar = require('bar');
var bar = require('./bar');

module.exports = function() {
bar();
}

// bar.js
var baz = require('baz');
var baz = require('./baz');

module.exports = function() {
baz.method();
Expand All @@ -314,7 +314,7 @@ module.exports = {

// test.js
var stubs = {
'baz': {
'./baz': {
method: function(val) {
console.info('goodbye');
},
Expand All @@ -324,7 +324,7 @@ var stubs = {

var proxyquire = require('proxyquire');

var foo = proxyquire('foo', stubs);
var foo = proxyquire('./foo', stubs);
foo(); // 'goodbye' is printed to stdout
```

Expand Down

0 comments on commit 62de97c

Please sign in to comment.