I would like to do unit tests on Node.js , I am using grunt-jasmine , but it does not recognize the variable exports , module and nor required .
Is there a way to solve this or does someone suggest a testing framewor...
I want to test the following scenario:
I have a scope:
var scope;
beforeEach(inject(function($rootScope) {
scope = $rootScope.$new();
}));
You need to test whether the assignment of a variable in the $ scope within an asynchronous fun...
JavaScript code has some html interactions like this example:
function retornaListaDeItens(argument) {
return document.getElementsByClassName(argument);
}
I use the return of this function to perform operations in JavaScript, performing u...
I have a method in a service that removes items older than 60 days from a list.
self.removerAntigas = function () {
var dataCorte = new Date();
var dataAux = dataCorte.getDate();
dataCorte.setDate(dataAux - 60);...
As far as it is advantageous to do unit tests on the presentation layer,
what are the scenarios where Javascript unit testing is advantageous?
Is it only advantageous if you have calculations in Javascript?
Obs : I'll use Jasmine for test...
I want to organize my javascript tests on separate files, but these can be part of a common module. For example:
describe("Controllers", function () {
describe('Move list Controller', function () {
//ListController its
});...
I have a WordPress site with lots of JS files that were not structured to be tested - they were not written as modules that can be imported nor is there a app.js that loads all of them as a framework.
The files are only compiled and mi...
I have implemented unit tests using Jasmine in my application and want to configure in Maven a continuous integration so that the tests run automatically. It is already working, however an error is appearing in the Eclipse console and I would li...
I'm trying to compare the type of method when there is a call with the api url.
import { async, ComponentFixture, TestBed, getTestBed } from '@angular/core/testing';
import { ServiceOrderTypesComponent } from './service-order-types.com...
I have a controller with some functions:
angular.module('teste.controllers')
.controller(TestCtrl, function($scope){
var vm = this;
vm.funcTest = function(){
return 1 + 1;
}
function _testSoma2(){
return 2 + 2;
}
})...