fix tests using new dependencies

This commit is contained in:
Jonathan Rainville 2018-06-20 13:56:43 -04:00 committed by Pascal Precht
parent 38f32804f9
commit bab0b71831
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 7 additions and 4 deletions

View File

@ -296,14 +296,17 @@ class ContractsManager {
let className;
function getDependencyCount(contractName, cycleDetector) {
if (!self.contracts[contractName]) {
return 0;
}
if (self.contracts[contractName].dependencyCount || self.contracts[contractName].dependencyCount === 0) {
// Already have that count
return self.contracts[contractName].dependencyCount;
}
if (!self.contractDependencies[contractName] || !self.contractDependencies[contractName].length) {
self.contracts[contractName].dependencyCount = 0;
return 0;
}
if (self.contracts[contractName].dependencyCount) {
// Already have that count
return self.contracts[contractName].dependencyCount;
}
let total = self.contractDependencies[contractName].length;
self.contractDependencies[contractName].some(dependencyName => {
if (cycleDetector.indexOf(dependencyName) > -1) {