Commit 2bbaf4c1 authored by Robert Knight's avatar Robert Knight

Move date, time & retry utility code to `util/` dir

As per #648, move several modules containing utility functions which
have no dependencies on other code to `src/sidebar/util`.
parent cf10d9f3
'use strict';
var dateUtil = require('../date-util');
var dateUtil = require('../util/date');
// @ngInject
function TimestampController($scope, time) {
......
......@@ -221,7 +221,7 @@ module.exports = angular.module('h', [
.value('raven', require('./raven'))
.value('serviceConfig', serviceConfig)
.value('settings', settings)
.value('time', require('./time'))
.value('time', require('./util/time'))
.value('urlEncodeFilter', require('./filter/url').encode)
.config(configureCompile)
......
'use strict';
var { retryPromiseOperation } = require('../retry-util');
var { retryPromiseOperation } = require('../util/retry');
/**
* A service which fetches and caches API route metadata.
......
'use strict';
var events = require('../events');
var retryUtil = require('../retry-util');
var retryUtil = require('../util/retry');
var CACHE_TTL = 5 * 60 * 1000; // 5 minutes
......
'use strict';
var retryUtil = require('../retry-util');
var toResult = require('../../shared/test/promise-util').toResult;
var retryUtil = require('../retry');
var toResult = require('../../../shared/test/promise-util').toResult;
describe('retry-util', function () {
describe('sidebar.util.retry', function () {
describe('.retryPromiseOperation', function () {
it('should return the result of the operation function', function () {
var operation = sinon.stub().returns(Promise.resolve(42));
......
......@@ -38,7 +38,7 @@ var FIXTURES_NEXT_FUZZY_UPDATE = [
[8 * year, null],
];
describe('time', function () {
describe('sidebar.util.time', function () {
var sandbox;
beforeEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment