From edbbaa160bdfc58e7415d0bc37b18dbf79f07e4b Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 7 Jun 2018 20:11:49 -0400 Subject: [PATCH] make config params optional --- lib/tests/test.js | 4 ++++ test_apps/test_app/test/simple_storage_deploy_spec.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tests/test.js b/lib/tests/test.js index aa0ea821b..4f9d10755 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -121,6 +121,10 @@ class Test { config(options, callback) { const self = this; + if (typeof(options) === 'function') { + callback = options; + options = {}; + } if (!callback) { callback = function () { }; diff --git a/test_apps/test_app/test/simple_storage_deploy_spec.js b/test_apps/test_app/test/simple_storage_deploy_spec.js index e4d24241c..0f814434d 100644 --- a/test_apps/test_app/test/simple_storage_deploy_spec.js +++ b/test_apps/test_app/test/simple_storage_deploy_spec.js @@ -2,7 +2,7 @@ const SimpleStorage = embark.require('Embark/contracts/SimpleStorage'); let accounts; -config({}, (err, theAccounts) => { +config((err, theAccounts) => { accounts = theAccounts; });