diff options
Diffstat (limited to 'spec/frontend/jobs/store/mutations_spec.js')
-rw-r--r-- | spec/frontend/jobs/store/mutations_spec.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/frontend/jobs/store/mutations_spec.js b/spec/frontend/jobs/store/mutations_spec.js index d1ab152330e..d77690ffac0 100644 --- a/spec/frontend/jobs/store/mutations_spec.js +++ b/spec/frontend/jobs/store/mutations_spec.js @@ -157,17 +157,21 @@ describe('Jobs Store Mutations', () => { }); }); - describe('STOP_POLLING_TRACE', () => { - it('sets isTraceComplete to true', () => { - mutations[types.STOP_POLLING_TRACE](stateCopy); + describe('SET_TRACE_TIMEOUT', () => { + it('sets the traceTimeout id', () => { + const id = 7; - expect(stateCopy.isTraceComplete).toEqual(true); + expect(stateCopy.traceTimeout).not.toEqual(id); + + mutations[types.SET_TRACE_TIMEOUT](stateCopy, id); + + expect(stateCopy.traceTimeout).toEqual(id); }); }); - describe('RECEIVE_TRACE_ERROR', () => { - it('resets trace state and sets error to true', () => { - mutations[types.RECEIVE_TRACE_ERROR](stateCopy); + describe('STOP_POLLING_TRACE', () => { + it('sets isTraceComplete to true', () => { + mutations[types.STOP_POLLING_TRACE](stateCopy); expect(stateCopy.isTraceComplete).toEqual(true); }); |