old addon failure after upgrade to 3.17.0
BryanCrotaz opened this issue · comments
Used ember-cli-update
to upgrade old addon to 3.17.0
.
After this, tests failed with global resolver deprecation and tests failed to load.
Reason:
tests/helpers/resolver.js
should have been deleted
tests/test-helper.js
should have been overwritten with the new content from the blueprint
When I did this, the problems went away.
Original code
// tests/helpers/resolver.js
tests/helpers/resolver
import Resolver from '../../resolver';
import config from '../../config/environment';
const resolver = Resolver.create();
resolver.namespace = {
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix
};
export default resolver;
// tests/test-helper.js
import resolver from './resolver';
import { setResolver } from '@ember/test-helpers';
setResolver(resolver);
FWIW, the new content for tests/test-helper.js
should use setApplication
not setResolver
.
See here: https://github.com/ember-cli/ember-addon-output/blob/v3.17.0/tests/test-helper.js#L6.
Yes, the code I show is the old version.
The point is that ember-cli-update
didn't put in the new content, leaving me with a completely broken addon.
The code in https://github.com/ember-cli/ember-addon-output/blob/v3.17.0/tests/test-helper.js#L6 hasn't updated since 2017. ember-cli-update doesn't touch code that hasn't updated. For all the tool knows, you intentionally wanted the file like that. It looks like you missed an update a long time ago for that addon. You could ember init
or ember-cli-update init
to get the file updated.