0
I would like to know the best way to test (with Jasmine) a filter with this scenario:
function districtFilter(city, array) {
var districtFound = array.filter(function(a) {
return a.id !== city.id;
});
return districtFound;
}
0
I would like to know the best way to test (with Jasmine) a filter with this scenario:
function districtFilter(city, array) {
var districtFound = array.filter(function(a) {
return a.id !== city.id;
});
return districtFound;
}
-1
var array = [
{
id: 1,
city: "Washington"
},
{
id: 2,
city: "Chicago"
},
{
id: 3,
city: "New York"
}];
var city = {
id: 1,
city: "Washington"
};
console.log(districtFilter(city, array));
Browser other questions tagged javascript angularjs jasmine
You are not signed in. Login or sign up in order to post.
It would be in unit test, using the framework for testing, Jasmine
– Bruno Cabral