From b6a1c8cfb84bb6febcea8f055dcc408d1b042be7 Mon Sep 17 00:00:00 2001 From: Bert De Block Date: Fri, 20 Dec 2024 10:11:32 +0100 Subject: [PATCH] Remove passing an ember-cli `project` instance to the config function --- lib/utils/config.js | 2 +- test/utils/config-test.js | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/utils/config.js b/lib/utils/config.js index 51848b96..d37630f4 100644 --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -32,7 +32,7 @@ async function getBaseConfig(options) { if (fs.existsSync(configPath)) { let configData = await require(configPath); - data = typeof configData === 'function' ? await configData(options.project) : configData; + data = typeof configData === 'function' ? await configData() : configData; } else { debug('Config file does not exist %s', configPath); } diff --git a/test/utils/config-test.js b/test/utils/config-test.js index 31a67365..eabdac13 100644 --- a/test/utils/config-test.js +++ b/test/utils/config-test.js @@ -108,18 +108,6 @@ describe('utils/config', () => { }); }); - it('config file exporting a function is passed the project', () => { - generateConfigFile( - 'module.exports = function(project) { return { scenarios: [ { foo: project.blah }] } };', - ); - - project.blah = 'passed-in'; - return getConfig({ project }).then((config) => { - expect(config.scenarios).to.have.lengthOf(1); - expect(config.scenarios[0].foo).to.equal('passed-in'); - }); - }); - it('throws error if project.root/config/ember-try.js is not present and no versionCompatibility', () => { return getConfig({ project }).catch((error) => { expect(error).to.match(