ToIt took me some time to figure out what's wrong with you code (Thanks for the riddle). Here's how i get your test working i had to:
1- I've change truffle.js to following :
networks: {
local: {
host: 'localhost',
port: 7545,
// gas: 6000010,
// gasPrice:10000000000,
network_id: '*'
}
}
but instead out of gas i've got revert exception,
to deal with I've replaced :
TokenFactory(DeployedAddresses.TokenFactory());
by
new TokenFactory();
otherwise you have to add it to the deploymentcreated a migration script
as following (2_initial_migration.js):
pragma solidityvar ^0.4.24;
importTokenFactory "truffle/Assert.sol";
import= "truffle/DeployedAddressesartifacts.sol";
import require("../contracts/TokenFactory.sol";
contract TestTokenFactory {sol");
TokenFactorymodule.exports tk=new= TokenFactory();
function testChildContractDeployed(deployer) public{
tk.createToken("xxx","sym");
address[] memory deployedTokens = tk.getDeployedTokens();
Assertdeployer.equaldeploy(deployedTokens.length, 1, "Contact is not deployed"TokenFactory);
}
};
then the test passed with success