-
user2050690
angularjs testacular
My pc is Windows7 32bit. When I test Angularjs tutorial step2. Chrome not start with error.— versions — Angularjs:1.0.2 testacular:0.4.0— messages —-info: Testacular server started at http://localhost:9876/info (launcher): Starting browser chromeerror (launcher):events.js:71throw arguments[1]; // Unhandled ‘error’ event^Error: write EIOat errnoException (net.js:770:11)at Object.afterWrite (net.js:594:19)
-
fatuhoku
javascript testing coffeescript testacular
I’m using Coffeescript for everything, and have ran into trouble trying to include chai.js into my test.my configs/testacular.conf.js looks like this (note the relative basePath):basePath = ‘../’;// Install devDependencies with `npm install` first before attempting to run Testacular! files = [MOCHA,MOCHA_ADAPTER,’assets/js/lib/**/*.js’,’test/lib/angular/*.js’,’test/unit/**/*.coffee’,’assets/js/*.coffee’,’node_modules/chai/chai.js’ ];autoWatch = true;browsers = [‘Chrome’];I list node_modules/chai
-
pgreen2
javascript angularjs google-closure-library commonjs testacular
For a project that I am working on I have been using a hodgepodge of javascript libraries. The main logic of my code is broken down into multiple commonjs modules. I use google closure to combine the modules into one output js file which I use within my angularjs application.The problem I am having is trying to perform tests with testacular. There error I receive is Uncaught ReferenceError: require is not defined. It is happening because, unlike google closure, testacular doesn’t understand
-
mattdwen
angularjs angular-ui testacular
I’m trying to unit test a controller which uses the Angular UI-Bootstrap dialog directive, but am receiving a Error: Argument ‘directive’ is required error.This actually occurs as soon as I include the ui-bootstrap.min.js file in the Testacular config.The controller is defined as:angular.module(‘xFormsEntries’).controller(‘xFormsEntryListCtrl’, function ($scope, $dialog, Form, FormEntry, FormField) {…The unit test is:describe(‘xForms Controllers’, function() {beforeEach(function() {this.addMat
-
iwein
angularjs jasmine testacular angular-scenario
Testacular is awesome, so is angular-scenario. Using them together is proving a challenge however. There is an ANGULAR-SCENARIO-ADAPTER in Testacular, but that breaks simple tests. If you include angular-scenario.js yourself Testacular will run no tests at all. Has anyone got this running properly?ANGULAR-SCENARIO-ADAPTERI’ve tried to use this with a trivial test, but I saw some weird behavior:Test: describe(‘Simple’, function(){it(‘should compare strings’, function(){expect(‘foo’).toBe(‘foo’);}
-
Abilash
javascript unit-testing angularjs jasmine testacular
I’m trying to set up a unit testing environment for my project and I’m having some problems. I’m trying to use Testacular with Jasmine for testing my AngularJS code.I have a module Services which has a factory method called KeepAlive. Here is its set up.angular.module(‘services’, []).factory(‘KeepAlive’, [‘$rootScope’, function($rootScope){//My Code }]);This module is attached to a module called MainModule. Here is its code.angular.module(‘MainModule’, [‘filters’, ‘services’, ‘directives’, ‘ui’]
-
Roy Truelove
javascript unit-testing angularjs jasmine testacular
I’m testing service A, but service A depends on service B. (eg service B is injected into service A).I’ve seen this question but my case is a bit different because in my opinion it makes more sense to mock service B instead of injecting an actual instance of service B. I’d mock it with a jasmine spy.Here’s a sample test:describe(“Sample Test Suite”, function() {beforeEach(function() {module(‘moduleThatContainsServiceA’);inject([‘serviceA’, function(service) {this.service = service;}]);});it(‘c