mirror of https://github.com/embarklabs/embark.git
fix tests using new dependencies
This commit is contained in:
parent
38f32804f9
commit
bab0b71831
|
@ -296,14 +296,17 @@ class ContractsManager {
|
||||||
let className;
|
let className;
|
||||||
|
|
||||||
function getDependencyCount(contractName, cycleDetector) {
|
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) {
|
if (!self.contractDependencies[contractName] || !self.contractDependencies[contractName].length) {
|
||||||
self.contracts[contractName].dependencyCount = 0;
|
self.contracts[contractName].dependencyCount = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (self.contracts[contractName].dependencyCount) {
|
|
||||||
// Already have that count
|
|
||||||
return self.contracts[contractName].dependencyCount;
|
|
||||||
}
|
|
||||||
let total = self.contractDependencies[contractName].length;
|
let total = self.contractDependencies[contractName].length;
|
||||||
self.contractDependencies[contractName].some(dependencyName => {
|
self.contractDependencies[contractName].some(dependencyName => {
|
||||||
if (cycleDetector.indexOf(dependencyName) > -1) {
|
if (cycleDetector.indexOf(dependencyName) > -1) {
|
||||||
|
|
Loading…
Reference in New Issue