From eee251d84f7218e8c59b64e914782511a3c7446f Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sun, 13 Oct 2019 16:15:55 -0700 Subject: [PATCH] Update test fixtures and plugin utils for buidler plugin --- dist/plugin-assets/truffle.utils.js | 2 ++ dist/truffle.plugin.js | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/dist/plugin-assets/truffle.utils.js b/dist/plugin-assets/truffle.utils.js index 3f430bd..b01b553 100644 --- a/dist/plugin-assets/truffle.utils.js +++ b/dist/plugin-assets/truffle.utils.js @@ -183,6 +183,7 @@ function loadLibrary(config){ } + /** * Maps truffle specific keys for the paths to things like sources to the generic * keys required by the plugin utils @@ -197,6 +198,7 @@ function normalizeConfig(config){ return config; } + module.exports = { getTestFilePaths: getTestFilePaths, setNetwork: setNetwork, diff --git a/dist/truffle.plugin.js b/dist/truffle.plugin.js index 62c4ad3..abcd733 100644 --- a/dist/truffle.plugin.js +++ b/dist/truffle.plugin.js @@ -124,4 +124,18 @@ async function plugin(config){ 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;