Commit 68cb7b6 1 parent 5f19812 commit 68cb7b6 Copy full SHA for 68cb7b6
File tree 2 files changed +2
-16
lines changed
2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -135,18 +135,6 @@ describe(`gatsby-remark-code-repls`, () => {
135
135
}
136
136
} )
137
137
138
- it ( `should wrap any non-error rejection from recursive-readdir in an Error instance` , async ( ) => {
139
- const rejectionMessage = `an error message`
140
-
141
- readdir . mockRejectedValue ( rejectionMessage )
142
-
143
- try {
144
- await createPages ( createPagesParams )
145
- } catch ( err ) {
146
- expect ( err ) . toEqual ( Error ( rejectionMessage ) )
147
- }
148
- } )
149
-
150
138
it ( `should not load any external packages by default` , async ( ) => {
151
139
readdir . mockResolvedValue ( [ `file.js` ] )
152
140
Original file line number Diff line number Diff line change @@ -75,9 +75,7 @@ exports.createPages = async (
75
75
}
76
76
} )
77
77
} catch ( error ) {
78
- if ( error instanceof Error ) {
79
- throw error
80
- }
81
- throw Error ( error )
78
+ // retrow errors upstream
79
+ throw error
82
80
}
83
81
}
You can’t perform that action at this time.
0 commit comments