Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getLastHour = () => {
- const date = new Date().getTime() - 3600000;
- return date;
- };
- describe('getLastHour', () => {
- const getLastHour = mobileArticleService.__get__('getLastHour');
- const getTime = sinon.stub(2019052906);
- const Date = sinon.stub({ getTime });
- const formatEastern = sinon.stub().returns(2019052906);
- before(() => {
- mobileArticleService.__set__({
- Date,
- getTime,
- });
- });
- it('should return date with hours ', () => {
- expect(Date).to.be.called;
- expect(getTime).to.be.called;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement