mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix direct dependency reporting.
And test for it.
This commit is contained in:
@@ -48,7 +48,7 @@ var packageList = function (_currentProjectForTest) {
|
||||
return {
|
||||
name: name,
|
||||
version: version,
|
||||
direct: _.contains(directDeps, name)
|
||||
direct: _.has(directDeps, name)
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -73,6 +73,14 @@ selftest.define("report-stats", ["slow"], function () {
|
||||
selftest.expectEqual(_.sortBy(usage.packages, "name"),
|
||||
_.sortBy(stats.packageList(sandboxProject), "name"));
|
||||
|
||||
// Check that the direct dependency was recorded as such.
|
||||
_.each(usage.packages, function (package) {
|
||||
if (package.name === "local-package" &&
|
||||
! package.direct) {
|
||||
selftest.fail("local-package is not marked as a direct dependency");
|
||||
}
|
||||
});
|
||||
|
||||
// verify that the stats server recorded that with no userId
|
||||
var appPackages = stats.getPackagesForAppIdInTest(sandboxProject);
|
||||
selftest.expectEqual(appPackages.appId, identifier);
|
||||
|
||||
Reference in New Issue
Block a user