Skip to content

Commit c975c66

Browse files
committed
test: add testcase for base in non-standalone mode
1 parent fc17a26 commit c975c66

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,23 @@ function wrap(server, middleware) {
184184
});
185185
});
186186

187+
describe('self package with base', function() {
188+
189+
before(function () {
190+
app = server();
191+
app.use(middleware(join(fixtures, 'parser'), {
192+
base: 'http://a.com/base/'
193+
}));
194+
});
195+
196+
it('should match /base/index.js -> /index.js, wrap', function(done) {
197+
request(app.listen())
198+
.get('/base/index.js')
199+
.expect(util.define('index', 'var b = require("b/0.1.0/index.js");\nconsole.log(\'a\');\n'))
200+
.expect(200, done);
201+
});
202+
});
203+
187204
describe('dependent package', function() {
188205

189206
before(function() {

0 commit comments

Comments
 (0)