Summary
I'm creating a seed for modular design with AngularJS + Browserify + BabelJS. I'm implementing the unit test part.
Problem
When I call the angular module it returns me the error
TypeError: module is not a function at Context. (test.bundle.js: 10: 5)
This happens for $ controller, $ scope ...
TEST
var assert = chai.assert;
var expect = chai.expect;
describe("BaseController", () => {
beforeEach(() => {
module('MyApp');
});
it("Test1", () => {
expect(1).to.equal(1);
});
});
I'm not using CommonJS at the time of running the tests, it generates a bundler for me from all the tests and plays in the ./dist folder
Code
Branch is test-implement
GitHub: code
The project is open-source tips are very welcome.
To Roll
- git checkout -b test-implement origin / test-implement
- git checkout test-implement
- npm install
- bower install
- gulp server-test