Skip to content

Commit

Permalink
Add test confirming fix for #340
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Mar 19, 2016
1 parent 1a1b80a commit fe2c5af
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
10 changes: 5 additions & 5 deletions test/fixture/_external-deps-included.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"tags": [],
"loc": {
"start": {
"line": 5,
"line": 7,
"column": 0
},
"end": {
"line": 7,
"line": 9,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 8,
"line": 10,
"column": 0
},
"end": {
"line": 11,
"line": 13,
"column": 1
}
},
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n// non-js require\nrequire('./polyglot/blend.cpp');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
},
"errors": [],
"name": "foo",
Expand Down
2 changes: 2 additions & 0 deletions test/fixture/external.input.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require('external');
require('external2');
require('module-not-found');
// non-js require
require('./polyglot/blend.cpp');

/**
* I am in `external.input.js`.
Expand Down
10 changes: 5 additions & 5 deletions test/fixture/external.output.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"tags": [],
"loc": {
"start": {
"line": 5,
"line": 7,
"column": 0
},
"end": {
"line": 7,
"line": 9,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 8,
"line": 10,
"column": 0
},
"end": {
"line": 11,
"line": 13,
"column": 1
}
},
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n// non-js require\nrequire('./polyglot/blend.cpp');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
},
"errors": [],
"name": "foo",
Expand Down
10 changes: 5 additions & 5 deletions test/fixture/internal.output.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"tags": [],
"loc": {
"start": {
"line": 5,
"line": 7,
"column": 0
},
"end": {
"line": 7,
"line": 9,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 8,
"line": 10,
"column": 0
},
"end": {
"line": 11,
"line": 13,
"column": 1
}
},
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
"code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n// non-js require\nrequire('./polyglot/blend.cpp');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
},
"errors": [],
"name": "foo",
Expand Down

0 comments on commit fe2c5af

Please sign in to comment.