Skip to content

Commit 8618294

Browse files
authored
Merge pull request #1037 from bertdeblock/remove-passing-a-project-instance-to-a-config-function
2 parents 4547c62 + b6a1c8c commit 8618294

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

lib/utils/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function getBaseConfig(options) {
3232
if (fs.existsSync(configPath)) {
3333
let configData = await require(configPath);
3434

35-
data = typeof configData === 'function' ? await configData(options.project) : configData;
35+
data = typeof configData === 'function' ? await configData() : configData;
3636
} else {
3737
debug('Config file does not exist %s', configPath);
3838
}

test/utils/config-test.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,6 @@ describe('utils/config', () => {
108108
});
109109
});
110110

111-
it('config file exporting a function is passed the project', () => {
112-
generateConfigFile(
113-
'module.exports = function(project) { return { scenarios: [ { foo: project.blah }] } };',
114-
);
115-
116-
project.blah = 'passed-in';
117-
return getConfig({ project }).then((config) => {
118-
expect(config.scenarios).to.have.lengthOf(1);
119-
expect(config.scenarios[0].foo).to.equal('passed-in');
120-
});
121-
});
122-
123111
it('throws error if project.root/config/ember-try.js is not present and no versionCompatibility', () => {
124112
return getConfig({ project }).catch((error) => {
125113
expect(error).to.match(

0 commit comments

Comments
 (0)