File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
containers/ReviewModal/ReviewErrors Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ module.exports = createConfig('jest', {
6
6
'<rootDir>/src/setupTest.js' ,
7
7
] ,
8
8
modulePaths : [ '<rootDir>/src/' ] ,
9
+ moduleNameMapper : {
10
+ '@src/(.*)' : '<rootDir>/src/$1' ,
11
+ } ,
9
12
coveragePathIgnorePatterns : [
10
13
'src/segment.js' ,
11
14
'src/postcss.config.js' ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const messages = defineMessages({
25
25
} ,
26
26
gradeNotSubmittedContent : {
27
27
id : 'ora-grading.ReviewModal.gradeNotSubmitted.Content' ,
28
- defaultMessage : "We 're sorry, something went wrong when we tried to submit this grade. Please try again." ,
28
+ defaultMessage : 'We\ 're sorry, something went wrong when we tried to submit this grade. Please try again.' ,
29
29
description : 'Grade submission network error message' ,
30
30
} ,
31
31
resubmitGrade : {
@@ -70,11 +70,11 @@ const messages = defineMessages({
70
70
} ,
71
71
downloadFailedHeading : {
72
72
id : 'ora-grading.ReviewModal.errorDownloadFailed' ,
73
- defaultMessage : ` Couldn't download files` ,
73
+ defaultMessage : ' Couldn\ 't download files' ,
74
74
} ,
75
75
downloadFailedContent : {
76
76
id : 'ora-grading.ReviewModal.errorDownloadFailedContent' ,
77
- defaultMessage : `We 're sorry, something went wrong when we tried to download these files. Please try again.` ,
77
+ defaultMessage : 'We\ 're sorry, something went wrong when we tried to download these files. Please try again.' ,
78
78
description : 'Failed download error content' ,
79
79
} ,
80
80
retryDownload : {
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ export const downloadBlobs = async (files) => {
87
87
}
88
88
}
89
89
if ( errors . length ) {
90
+ // eslint-disable-next-line @typescript-eslint/no-throw-literal
90
91
throw DownloadException ( errors ) ;
91
92
}
92
93
return ( { blobs, files } ) ;
@@ -95,12 +96,13 @@ export const downloadBlobs = async (files) => {
95
96
/**
96
97
* @param {string } submissionUUID
97
98
* @returns Promise
98
- */
99
+ */
99
100
export const getSubmissionFiles = async ( submissionUUID ) => {
100
101
try {
101
102
const { files } = await api . fetchSubmissionFiles ( submissionUUID ) ;
102
103
return files ;
103
104
} catch {
105
+ // eslint-disable-next-line @typescript-eslint/no-throw-literal
104
106
throw FetchSubmissionFilesException ( ) ;
105
107
}
106
108
} ;
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ jest.mock('@zip.js/zip.js', () => {
21
21
close : mockZipClose . mockImplementation ( ( ) => Promise . resolve ( files ) ) ,
22
22
files,
23
23
} ) ) ,
24
- BlobWriter : function _ ( ) { return mockBlobWriter ; } ,
25
- TextReader : function _ ( ) { return mockTextReader ; } ,
26
- BlobReader : function _ ( ) { return mockBlobReader ; } ,
24
+ BlobWriter : ( ) => mockBlobWriter ,
25
+ TextReader : ( ) => mockTextReader ,
26
+ BlobReader : ( ) => mockBlobReader ,
27
27
} ;
28
28
} ) ;
29
29
You can’t perform that action at this time.
0 commit comments