Commit b678e07e authored by Winnie Hellmann's avatar Winnie Hellmann

Run yarn prettier-all-save

parent 7b846c67
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
const text = `${name} - ${status.tooltip}`; const text = `${name} - ${status.tooltip}`;
if (this.isDelayedJob) { if (this.isDelayedJob) {
return sprintf(text, { remainingTime: this.remainingTime }) return sprintf(text, { remainingTime: this.remainingTime });
} }
return text; return text;
......
...@@ -422,17 +422,19 @@ describe('Job App ', () => { ...@@ -422,17 +422,19 @@ describe('Job App ', () => {
}, 0); }, 0);
}); });
it('displays remaining time for a delayed job', (done) => { it('displays remaining time for a delayed job', done => {
const oneHourInMilliseconds = 3600000; const oneHourInMilliseconds = 3600000;
spyOn(Date, 'now').and.callFake(() => new Date(delayedJobFixture.scheduled_at).getTime() - oneHourInMilliseconds); spyOn(Date, 'now').and.callFake(
mock.onGet(props.endpoint).replyOnce(200, { ... delayedJobFixture }); () => new Date(delayedJobFixture.scheduled_at).getTime() - oneHourInMilliseconds,
);
mock.onGet(props.endpoint).replyOnce(200, { ...delayedJobFixture });
vm = mountComponentWithStore(Component, { vm = mountComponentWithStore(Component, {
props, props,
store, store,
}); });
store.subscribeAction((action) => { store.subscribeAction(action => {
if (action.type !== 'receiveJobSuccess') { if (action.type !== 'receiveJobSuccess') {
return; return;
} }
......
...@@ -88,11 +88,9 @@ describe('JobContainerItem', () => { ...@@ -88,11 +88,9 @@ describe('JobContainerItem', () => {
Vue.nextTick() Vue.nextTick()
.then(() => { .then(() => {
expect( expect(vm.$el.querySelector('.js-job-link').getAttribute('data-original-title')).toEqual(
vm.$el 'delayed job - delayed manual action (00:22:17)',
.querySelector('.js-job-link') );
.getAttribute('data-original-title'),
).toEqual('delayed job - delayed manual action (00:22:17)');
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
......
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