This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Test fails for service generator #338
Comments
What do you mean? it looks right to me |
Well just try the following in a clean folder: $ yo angular
$ grunt test # all green
$ yo angular:service testService
$ grunt test # damn! |
👍 |
@eddiemonge @passy Unfortunately this issue isn't resolved for me yet. The casing of the class names differs from that one, that I entered. For example: $ yo angular:service fixedPointIteration 'use strict';
angular.module('algorithmsApp')
.service('Fixedpointiteration', function Fixedpointiteration() {
// AngularJS will instantiate a singleton by calling "new" on this function
}); 'use strict';
describe('Service: fixedPointIteration', function () {
// load the service's module
beforeEach(module('algorithmsApp'));
// instantiate service
var fixedPointIteration;
beforeEach(inject(function (_fixedPointIteration_) {
fixedPointIteration = _fixedPointIteration_;
}));
it('should do something', function () {
expect(!!fixedPointIteration).toBe(true);
});
}); but should be: 'use strict';
angular.module('algorithmsApp')
.service('FixedPointIteration', function FixedPointIteration() {
// AngularJS will instantiate a singleton by calling "new" on this function
}); 'use strict';
describe('Service: FixedPointIteration', function () {
// load the service's module
beforeEach(module('algorithmsApp'));
// instantiate service
var fixedPointIteration;
beforeEach(inject(function (FixedPointIteration) {
fixedPointIteration = FixedPointIteration;
}));
it('should do something', function () {
expect(!!fixedPointIteration).toBe(true);
});
}); |
I see whats going on. Yeah it looks like an upstream issue. related to #301 |
can someone reopen this please? |
stevemao
pushed a commit
to stevemao/generator-angular
that referenced
this issue
Nov 6, 2014
* Configurable route base, defaults to `/api/`. This only affects the client URL, the backend code will still be written to `server/api`. * Configurable pluralization of route, defaults to true. Closes yeoman#338
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you want to create a service with e.g
$ yo angular:service chineseRemainderTheorem
a test file gets generated, in my case this one:The injection doesn't work out of the box because of
_chineseRemainderTheorem_
so the tests failThe text was updated successfully, but these errors were encountered: