How to use the timekeeper.reset function in timekeeper

To help you get started, we’ve selected a few timekeeper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / idl / test / idl.js View on Github external
stringLength: stringLength
        });

        assert.equal(text, expectedText);

        function ago(letter) {
            var ts = upstream.meta.remotes['github.com/org/' + letter].time;
            var delta = now - (new Date(ts)).getTime();
            return timeAgo.ago(new Date(Date.now() - delta));
        }

        function underline(h) {
            return chalk.blue.underline(h);
        }

        tk.reset();

        assert.end();
    }
});
github uber-archive / idl / test / idl.js View on Github external
stringLength: stringLength
        });

        assert.equal(text, expectedText);

        function ago(letter) {
            var ts = upstream.meta.remotes['github.com/org/' + letter].time;
            var delta = now - (new Date(ts)).getTime();
            return timeAgo.ago(new Date(Date.now() - delta));
        }

        function underline(h) {
            return chalk.blue.underline(h);
        }

        tk.reset();

        assert.end();
    }
});

timekeeper

Easy testing of time-dependent code.

MIT
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis

Popular timekeeper functions