import velocity from 'velocity-animate';
export function slideDown(element, callback) {
velocity(element, 'slideDown', {
duration: 250,
complete: callback
});
}
spyOn('velocity');
--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmine-js+...@googlegroups.com.
To post to this group, send email to jasmi...@googlegroups.com.
Visit this group at http://groups.google.com/group/jasmine-js.
For more options, visit https://groups.google.com/d/optout.
- utils.js
export function getProducts
() {};
export function getCategories() {};
- stores.js
import {
getProducts
} from './utils';
export default {
trick() {
let total =
getProducts
();
if (total) { //do something}
else {} { // do something}
}
};
- stores-test.js
import {
getProducts
} from './utils';
import
stores from './stores';
it('Should Test', () => {
spyOn(getProducts).and.returnValue('5');
});