Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove passing an ember-cli project instance to the config function #1037

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
12 changes: 0 additions & 12 deletions test/utils/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading