mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix an http test failing due to new static resource URL prefixes.
This commit is contained in:
@@ -485,16 +485,22 @@ if (Meteor.isServer) {
|
||||
// the x-suppress-error header).
|
||||
WebApp.suppressConnectErrors();
|
||||
|
||||
var do_test = function (path, code, match) {
|
||||
HTTP.get(
|
||||
url_base() + path,
|
||||
{headers: {'x-suppress-error': 'true'}},
|
||||
expect(function(error, result) {
|
||||
test.equal(result.statusCode, code);
|
||||
if (match)
|
||||
test.matches(result.content, match);
|
||||
}));
|
||||
};
|
||||
function do_test(path, code, match) {
|
||||
const prefix = Meteor.isModern
|
||||
? "/__browser"
|
||||
: "/__browser.legacy";
|
||||
|
||||
HTTP.get(url_base() + prefix + path, {
|
||||
headers: {
|
||||
"x-suppress-error": "true"
|
||||
}
|
||||
}, expect(function(error, result) {
|
||||
test.equal(result.statusCode, code);
|
||||
if (match) {
|
||||
test.matches(result.content, match);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
// existing static file
|
||||
do_test("/packages/local-test_http/test_static.serveme", 200, /static file serving/);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
- [ ] Fix dynamic module source map URLs (prepend `/__arch`).
|
||||
|
||||
- [ ] Fix tests failing because of changes to static resource URLs.
|
||||
- [x] Fix tests failing because of changes to static resource URLs.
|
||||
|
||||
- [ ] In development, save time by only rebuilding `web.browser` (modern)?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user