Closed Emidomenge closed 8 years ago
It works if example.controller.spec.js
looks like this :
changing "ExampleComponent" by "example"
'use strict';
describe('Component: ExampleComponent', function () {
// load the controller's module
beforeEach(module('myModule'));
var ExampleComponent, scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($componentController, $rootScope) {
scope = $rootScope.$new();
ExampleComponent = $componentController('example', { // <------------------ HERE
$scope: scope
});
}));
it('should ...', function () {
expect(1).toEqual(1);
});
});
This has been fixed with https://github.com/DaftMonk/generator-ng-component/commit/72ad578ab6b4d49e32acf61ef017cd36d42efcdb. I just need to make another release.
Closed with https://github.com/angular-fullstack/generator-angular-fullstack/commit/80957817cb4ccaebe41bcf12aa691098ce2f53e0; wait for next release of generator.
If I run :
yo angular-fullstack:route example
And then run
grunt test:client --force
I got this error just after
example.controller.spec.js
has been created : (I'm beginner with Jasmine)File
example.controller.spec.js
looks like this :And file
example.controller.js
looks like this :