@@ -37,7 +37,7 @@ describe('LocaleProxy', () => {
3737 expect ( ( ) => {
3838 // @ts -expect-error: LocaleProxy is read-only.
3939 locale . category = { } ;
40- } ) . toThrow (
40+ } ) . toThrowError (
4141 new FakerError ( 'You cannot edit the locale data on the faker instance' )
4242 ) ;
4343 } ) ;
@@ -46,7 +46,7 @@ describe('LocaleProxy', () => {
4646 expect ( ( ) => {
4747 // @ts -expect-error: LocaleProxy is read-only.
4848 locale . airline = { } ;
49- } ) . toThrow (
49+ } ) . toThrowError (
5050 new FakerError ( 'You cannot edit the locale data on the faker instance' )
5151 ) ;
5252 } ) ;
@@ -55,7 +55,7 @@ describe('LocaleProxy', () => {
5555 expect ( ( ) => {
5656 // @ts -expect-error: LocaleProxy is read-only.
5757 delete locale . category ;
58- } ) . toThrow (
58+ } ) . toThrowError (
5959 new FakerError ( 'You cannot edit the locale data on the faker instance' )
6060 ) ;
6161 } ) ;
@@ -64,7 +64,7 @@ describe('LocaleProxy', () => {
6464 expect ( ( ) => {
6565 // @ts -expect-error: LocaleProxy is read-only.
6666 delete locale . airline ;
67- } ) . toThrow (
67+ } ) . toThrowError (
6868 new FakerError ( 'You cannot edit the locale data on the faker instance' )
6969 ) ;
7070 } ) ;
@@ -94,7 +94,7 @@ describe('LocaleProxy', () => {
9494 } ) ;
9595
9696 it ( 'should not be possible to access a missing entry in a missing category' , ( ) => {
97- expect ( ( ) => locale . category . missing ) . toThrow (
97+ expect ( ( ) => locale . category . missing ) . toThrowError (
9898 new FakerError (
9999 `The locale data for 'category.missing' are missing in this locale.
100100 If this is a custom Faker instance, please make sure all required locales are used e.g. '[de_AT, de, en, base]'.
@@ -105,7 +105,7 @@ describe('LocaleProxy', () => {
105105 } ) ;
106106
107107 it ( 'should not be possible to access a missing entry in a present category' , ( ) => {
108- expect ( ( ) => locale . airline . missing ) . toThrow (
108+ expect ( ( ) => locale . airline . missing ) . toThrowError (
109109 new FakerError (
110110 `The locale data for 'airline.missing' are missing in this locale.
111111 If this is a custom Faker instance, please make sure all required locales are used e.g. '[de_AT, de, en, base]'.
@@ -124,7 +124,7 @@ describe('LocaleProxy', () => {
124124 airline : { airline : null } ,
125125 } ) ;
126126
127- expect ( ( ) => unavailable . airline . airline ) . toThrow (
127+ expect ( ( ) => unavailable . airline . airline ) . toThrowError (
128128 new FakerError (
129129 `The locale data for 'airline.airline' aren't applicable to this locale.
130130 If you think this is a bug, please report it at: https://github.com/faker-js/faker`
@@ -136,7 +136,7 @@ describe('LocaleProxy', () => {
136136 expect ( ( ) => {
137137 // @ts -expect-error: LocaleProxy is read-only.
138138 locale . category . missing = { } ;
139- } ) . toThrow (
139+ } ) . toThrowError (
140140 new FakerError ( 'You cannot edit the locale data on the faker instance' )
141141 ) ;
142142 } ) ;
@@ -145,7 +145,7 @@ describe('LocaleProxy', () => {
145145 expect ( ( ) => {
146146 // @ts -expect-error: LocaleProxy is read-only.
147147 locale . airline . missing = { } ;
148- } ) . toThrow (
148+ } ) . toThrowError (
149149 new FakerError ( 'You cannot edit the locale data on the faker instance' )
150150 ) ;
151151 } ) ;
@@ -154,7 +154,7 @@ describe('LocaleProxy', () => {
154154 expect ( ( ) => {
155155 // @ts -expect-error: LocaleProxy is read-only.
156156 locale . airline . airline = [ 'dummy' ] ;
157- } ) . toThrow (
157+ } ) . toThrowError (
158158 new FakerError ( 'You cannot edit the locale data on the faker instance' )
159159 ) ;
160160 } ) ;
@@ -163,7 +163,7 @@ describe('LocaleProxy', () => {
163163 expect ( ( ) => {
164164 // @ts -expect-error: LocaleProxy is read-only.
165165 delete locale . category . missing ;
166- } ) . toThrow (
166+ } ) . toThrowError (
167167 new FakerError ( 'You cannot edit the locale data on the faker instance' )
168168 ) ;
169169 } ) ;
@@ -172,7 +172,7 @@ describe('LocaleProxy', () => {
172172 expect ( ( ) => {
173173 // @ts -expect-error: LocaleProxy is read-only.
174174 delete locale . airline . missing ;
175- } ) . toThrow (
175+ } ) . toThrowError (
176176 new FakerError ( 'You cannot edit the locale data on the faker instance' )
177177 ) ;
178178 } ) ;
@@ -181,7 +181,7 @@ describe('LocaleProxy', () => {
181181 expect ( ( ) => {
182182 // @ts -expect-error: LocaleProxy is read-only.
183183 delete locale . airline . airline ;
184- } ) . toThrow (
184+ } ) . toThrowError (
185185 new FakerError ( 'You cannot edit the locale data on the faker instance' )
186186 ) ;
187187 } ) ;
0 commit comments