Update test fixtures and plugin utils for buidler plugin

buidler/draft
cgewecke 5 years ago
parent 0bc67b8a34
commit eee251d84f
  1. 2
      dist/plugin-assets/truffle.utils.js
  2. 14
      dist/truffle.plugin.js

@ -183,6 +183,7 @@ function loadLibrary(config){
} }
/** /**
* Maps truffle specific keys for the paths to things like sources to the generic * Maps truffle specific keys for the paths to things like sources to the generic
* keys required by the plugin utils * keys required by the plugin utils
@ -197,6 +198,7 @@ function normalizeConfig(config){
return config; return config;
} }
module.exports = { module.exports = {
getTestFilePaths: getTestFilePaths, getTestFilePaths: getTestFilePaths,
setNetwork: setNetwork, setNetwork: setNetwork,

@ -124,4 +124,18 @@ async function plugin(config){
if (failures > 0) throw new Error(ui.generate('tests-fail', [failures])); if (failures > 0) throw new Error(ui.generate('tests-fail', [failures]));
} }
/**
* Maps truffle specific keys for the paths to things like sources to the generic
* keys required by the plugin utils
* @return {Object} truffle-config.js
*/
function normalizeConfig(config){
config.workingDir = config.working_directory;
config.contractsDir = config.contracts_directory;
config.testDir = config.test_directory;
config.artifactsDir = config.build_directory;
return config;
}
module.exports = plugin; module.exports = plugin;

Loading…
Cancel
Save