diff options
Diffstat (limited to 'spec/frontend/reports/store/utils_spec.js')
-rw-r--r-- | spec/frontend/reports/store/utils_spec.js | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/spec/frontend/reports/store/utils_spec.js b/spec/frontend/reports/store/utils_spec.js index 0d9a8dd4585..9ae456658dc 100644 --- a/spec/frontend/reports/store/utils_spec.js +++ b/spec/frontend/reports/store/utils_spec.js @@ -30,9 +30,7 @@ describe('Reports store utils', () => { const data = { failed: 3, total: 10 }; const result = utils.summaryTextBuilder(name, data); - expect(result).toBe( - 'Test summary contained 3 failed/error test results out of 10 total tests', - ); + expect(result).toBe('Test summary contained 3 failed out of 10 total tests'); }); it('should render text for multiple errored results', () => { @@ -40,9 +38,7 @@ describe('Reports store utils', () => { const data = { errored: 7, total: 10 }; const result = utils.summaryTextBuilder(name, data); - expect(result).toBe( - 'Test summary contained 7 failed/error test results out of 10 total tests', - ); + expect(result).toBe('Test summary contained 7 errors out of 10 total tests'); }); it('should render text for multiple fixed results', () => { @@ -59,7 +55,7 @@ describe('Reports store utils', () => { const result = utils.summaryTextBuilder(name, data); expect(result).toBe( - 'Test summary contained 3 failed/error test results and 4 fixed test results out of 10 total tests', + 'Test summary contained 3 failed and 4 fixed test results out of 10 total tests', ); }); @@ -69,18 +65,17 @@ describe('Reports store utils', () => { const result = utils.summaryTextBuilder(name, data); expect(result).toBe( - 'Test summary contained 1 failed/error test result and 1 fixed test result out of 10 total tests', + 'Test summary contained 1 failed and 1 fixed test result out of 10 total tests', ); }); it('should render text for singular failed, errored, and fixed results', () => { - // these will be singular when the copy is updated const name = 'Test summary'; const data = { failed: 1, errored: 1, resolved: 1, total: 10 }; const result = utils.summaryTextBuilder(name, data); expect(result).toBe( - 'Test summary contained 2 failed/error test results and 1 fixed test result out of 10 total tests', + 'Test summary contained 1 failed, 1 error and 1 fixed test result out of 10 total tests', ); }); @@ -90,7 +85,7 @@ describe('Reports store utils', () => { const result = utils.summaryTextBuilder(name, data); expect(result).toBe( - 'Test summary contained 5 failed/error test results and 4 fixed test results out of 10 total tests', + 'Test summary contained 2 failed, 3 errors and 4 fixed test results out of 10 total tests', ); }); }); @@ -117,7 +112,7 @@ describe('Reports store utils', () => { const data = { failed: 3, total: 10 }; const result = utils.reportTextBuilder(name, data); - expect(result).toBe('Rspec found 3 failed/error test results out of 10 total tests'); + expect(result).toBe('Rspec found 3 failed out of 10 total tests'); }); it('should render text for multiple errored results', () => { @@ -125,7 +120,7 @@ describe('Reports store utils', () => { const data = { errored: 7, total: 10 }; const result = utils.reportTextBuilder(name, data); - expect(result).toBe('Rspec found 7 failed/error test results out of 10 total tests'); + expect(result).toBe('Rspec found 7 errors out of 10 total tests'); }); it('should render text for multiple fixed results', () => { @@ -141,9 +136,7 @@ describe('Reports store utils', () => { const data = { failed: 3, resolved: 4, total: 10 }; const result = utils.reportTextBuilder(name, data); - expect(result).toBe( - 'Rspec found 3 failed/error test results and 4 fixed test results out of 10 total tests', - ); + expect(result).toBe('Rspec found 3 failed and 4 fixed test results out of 10 total tests'); }); it('should render text for a singular fixed, and a singular failed result', () => { @@ -151,19 +144,16 @@ describe('Reports store utils', () => { const data = { failed: 1, resolved: 1, total: 10 }; const result = utils.reportTextBuilder(name, data); - expect(result).toBe( - 'Rspec found 1 failed/error test result and 1 fixed test result out of 10 total tests', - ); + expect(result).toBe('Rspec found 1 failed and 1 fixed test result out of 10 total tests'); }); it('should render text for singular failed, errored, and fixed results', () => { - // these will be singular when the copy is updated const name = 'Rspec'; const data = { failed: 1, errored: 1, resolved: 1, total: 10 }; const result = utils.reportTextBuilder(name, data); expect(result).toBe( - 'Rspec found 2 failed/error test results and 1 fixed test result out of 10 total tests', + 'Rspec found 1 failed, 1 error and 1 fixed test result out of 10 total tests', ); }); @@ -173,7 +163,7 @@ describe('Reports store utils', () => { const result = utils.reportTextBuilder(name, data); expect(result).toBe( - 'Rspec found 5 failed/error test results and 4 fixed test results out of 10 total tests', + 'Rspec found 2 failed, 3 errors and 4 fixed test results out of 10 total tests', ); }); }); |