@@ -29,6 +29,9 @@ module.exports.install = function install(contract, test, config, _trufflejs) {
2929 deployer.deploy(contract);
3030 };` ;
3131
32+ // Mock external asset
33+ const asset = 'module.exports = { value: true };' ;
34+
3235 // Mock truffle.js
3336 const trufflejs = _trufflejs ||
3437
@@ -46,6 +49,8 @@ module.exports.install = function install(contract, test, config, _trufflejs) {
4649 shell . mkdir ( './mock' ) ;
4750 shell . mkdir ( './mock/contracts' ) ;
4851 shell . mkdir ( './mock/migrations' ) ;
52+ shell . mkdir ( './mock/assets' ) ;
53+ shell . mkdir ( './mock/node_modules' ) ;
4954 shell . mkdir ( './mock/test' ) ;
5055
5156 if ( Array . isArray ( contract ) ) {
@@ -60,15 +65,15 @@ module.exports.install = function install(contract, test, config, _trufflejs) {
6065 fs . writeFileSync ( './mock/migrations/1_initial_migration.js' , initialMigration ) ;
6166 fs . writeFileSync ( './mock/migrations/2_deploy_contracts.js' , deployContracts ) ;
6267 fs . writeFileSync ( './mock/truffle.js' , trufflejs ) ;
68+ fs . writeFileSync ( './mock/assets/asset.js' , asset ) ;
6369 fs . writeFileSync ( './.solcover.js' , configjs ) ;
6470 shell . cp ( `./test/cli/${ test } ` , `./mock/test/${ test } ` ) ;
6571} ;
6672
6773/**
68- * Installs mock truffle project at ./mock with a single contract
74+ * Installs mock truffle project at ./mock with two contracts - one inherits from the other
6975 * and test specified by the params.
70- * @param {String } contract <contractName.sol> located in /test/sources/cli/
71- * @param {[type] } test <testName.js> located in /test/cli/
76+ * @param {config } .solcover.js configuration
7277 */
7378module . exports . installInheritanceTest = function installInheritanceTest ( config ) {
7479 shell . mkdir ( './mock' ) ;
0 commit comments