Skip to content

Instantly share code, notes, and snippets.

@rubentd
Created August 23, 2017 03:37
Show Gist options
  • Select an option

  • Save rubentd/42a0c24b9dfa10c4a75edcbb9c63c78a to your computer and use it in GitHub Desktop.

Select an option

Save rubentd/42a0c24b9dfa10c4a75edcbb9c63c78a to your computer and use it in GitHub Desktop.
describe('spider', function() {
describe('filterItems()', function() {
it('should remove the second item, cause it has a forbidden word', function() {
items = [
{
title: 'Redux rules',
description: 'Redux is the best, you might not need it tho',
author: 'Dan Abramov'
},
{
title: 'new jquery methods',
description: 'some article about jquery',
author: 'Some dude'
},
{
title: 'React native',
description: 'Getting started with React Native',
author: 'react native guys'
}
];
var filteredItems = spider.filterItems(items);
assert.deepEqual(filteredItems, [
{
title: 'Redux rules',
description: 'Redux is the best, you might not need it tho',
author: 'Dan Abramov'
},
{
title: 'React native',
description: 'Getting started with React Native',
author: 'react native guys'
}
]);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment