-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUGFIX beta] Test nested addon import #6043
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
var fs = require('fs-extra'); | ||
|
||
var runCommand = require('../helpers/run-command'); | ||
var acceptance = require('../helpers/acceptance'); | ||
var copyFixtureFiles = require('../helpers/copy-fixture-files'); | ||
var createTestTargets = acceptance.createTestTargets; | ||
var teardownTestTargets = acceptance.teardownTestTargets; | ||
var linkDependencies = acceptance.linkDependencies; | ||
var cleanupRun = acceptance.cleanupRun; | ||
|
||
var chai = require('../chai'); | ||
var expect = chai.expect; | ||
var file = chai.file; | ||
var dir = chai.dir; | ||
|
||
var appName = 'some-cool-app'; | ||
|
||
describe('Acceptance: nested-addons-smoke-test', function() { | ||
this.timeout(360000); | ||
|
||
before(function() { | ||
return createTestTargets(appName); | ||
}); | ||
|
||
after(function() { | ||
return teardownTestTargets(); | ||
}); | ||
|
||
beforeEach(function() { | ||
return linkDependencies(appName); | ||
}); | ||
|
||
afterEach(function() { | ||
return cleanupRun(appName).then(function() { | ||
expect(dir('tmp/' + appName)).to.not.exist; | ||
}); | ||
}); | ||
|
||
it('addons with nested addons compile correctly', function() { | ||
return copyFixtureFiles('addon/with-nested-addons') | ||
.then(function() { | ||
var packageJsonPath = path.join(__dirname, '..', '..', 'tmp', appName, 'package.json'); | ||
var packageJson = fs.readJsonSync(packageJsonPath); | ||
packageJson.devDependencies['ember-top-addon'] = 'latest'; | ||
|
||
return fs.writeJsonSync(packageJsonPath, packageJson); | ||
}) | ||
.then(function() { | ||
return runCommand(path.join('.', 'node_modules', 'ember-cli', 'bin', 'ember'), 'build'); | ||
}) | ||
.then(function() { | ||
expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_APP_IMPORT'); | ||
expect(file('dist/assets/vendor.js')).to.contain('INNER_ADDON_IMPORT_WITH_THIS_IMPORT'); | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this part here takes quite a long time it might be beneficial to combine this with other "slow" tests. e.g. if there is something like an
addons-smoke-test-slow
already then you should probably just add it there instead.