Skip to content

Commit fe2c5af

Browse files
committed
Add test confirming fix for #340
1 parent 1a1b80a commit fe2c5af

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

Diff for: test/fixture/_external-deps-included.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
"tags": [],
55
"loc": {
66
"start": {
7-
"line": 5,
7+
"line": 7,
88
"column": 0
99
},
1010
"end": {
11-
"line": 7,
11+
"line": 9,
1212
"column": 3
1313
}
1414
},
1515
"context": {
1616
"loc": {
1717
"start": {
18-
"line": 8,
18+
"line": 10,
1919
"column": 0
2020
},
2121
"end": {
22-
"line": 11,
22+
"line": 13,
2323
"column": 1
2424
}
2525
},
26-
"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"
26+
"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"
2727
},
2828
"errors": [],
2929
"name": "foo",

Diff for: test/fixture/external.input.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require('external');
22
require('external2');
33
require('module-not-found');
4+
// non-js require
5+
require('./polyglot/blend.cpp');
46

57
/**
68
* I am in `external.input.js`.

Diff for: test/fixture/external.output.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
"tags": [],
55
"loc": {
66
"start": {
7-
"line": 5,
7+
"line": 7,
88
"column": 0
99
},
1010
"end": {
11-
"line": 7,
11+
"line": 9,
1212
"column": 3
1313
}
1414
},
1515
"context": {
1616
"loc": {
1717
"start": {
18-
"line": 8,
18+
"line": 10,
1919
"column": 0
2020
},
2121
"end": {
22-
"line": 11,
22+
"line": 13,
2323
"column": 1
2424
}
2525
},
26-
"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"
26+
"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"
2727
},
2828
"errors": [],
2929
"name": "foo",

Diff for: test/fixture/internal.output.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
"tags": [],
55
"loc": {
66
"start": {
7-
"line": 5,
7+
"line": 7,
88
"column": 0
99
},
1010
"end": {
11-
"line": 7,
11+
"line": 9,
1212
"column": 3
1313
}
1414
},
1515
"context": {
1616
"loc": {
1717
"start": {
18-
"line": 8,
18+
"line": 10,
1919
"column": 0
2020
},
2121
"end": {
22-
"line": 11,
22+
"line": 13,
2323
"column": 1
2424
}
2525
},
26-
"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"
26+
"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"
2727
},
2828
"errors": [],
2929
"name": "foo",

0 commit comments

Comments
 (0)