Commit fb429646 authored by mfluharty's avatar mfluharty

Review feedback changes

Pass caught error to receiveReportsError
Expect error to be passed in fetchReports spec
camelCase feature flag name in spec name
parent 2827e94f
......@@ -29,7 +29,7 @@ export const fetchReports = ({ state, dispatch, commit }, diffFeatureFlagEnabled
),
)
.then((data) => dispatch('receiveReportsSuccess', data))
.catch(() => dispatch('receiveReportsError'));
.catch((error) => dispatch('receiveReportsError', error));
};
export const receiveReportsSuccess = ({ commit }, data) => {
......
......@@ -65,7 +65,7 @@ describe('Codequality Reports actions', () => {
let mock;
let diffFeatureFlagEnabled;
describe('with :codequality_mr_diff feature flag enabled', () => {
describe('with codequalityMrDiff feature flag enabled', () => {
beforeEach(() => {
diffFeatureFlagEnabled = true;
localState.reportsPath = `${TEST_HOST}/codequality_reports.json`;
......@@ -112,7 +112,7 @@ describe('Codequality Reports actions', () => {
});
});
describe('with :codequality_mr_diff feature flag disabled', () => {
describe('with codequalityMrDiff feature flag disabled', () => {
beforeEach(() => {
diffFeatureFlagEnabled = false;
localState.headPath = `${TEST_HOST}/head.json`;
......@@ -157,7 +157,7 @@ describe('Codequality Reports actions', () => {
diffFeatureFlagEnabled,
localState,
[{ type: types.REQUEST_REPORTS }],
[{ type: 'receiveReportsError' }],
[{ type: 'receiveReportsError', payload: expect.any(Error) }],
done,
);
});
......
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