@@ -41,24 +41,6 @@ describe('loadLocalesConfig', () => {
41
41
} )
42
42
} )
43
43
44
- test ( 'Throws if one locale is too big' , async ( ) => {
45
- await inTemporaryDirectory ( async ( tmpDir : string ) => {
46
- // Given
47
- const localesPath = joinPath ( tmpDir , 'locales' )
48
- const enDefault = joinPath ( localesPath , 'en.default.json' )
49
- const es = joinPath ( localesPath , 'es.json' )
50
-
51
- await mkdir ( localesPath )
52
- await writeFile ( enDefault , JSON . stringify ( { hello : 'Hello' } ) )
53
- const bigArray = new Array ( 6000 ) . fill ( 'a' )
54
- await writeFile ( es , JSON . stringify ( bigArray ) )
55
-
56
- // When
57
- const got = loadLocalesConfig ( tmpDir , 'checkout_ui' )
58
- await expect ( got ) . rejects . toThrow ( / E r r o r l o a d i n g c h e c k o u t _ u i / )
59
- } )
60
- } )
61
-
62
44
test ( 'Throws if there are no defaults' , async ( ) => {
63
45
await inTemporaryDirectory ( async ( tmpDir : string ) => {
64
46
// Given
@@ -92,23 +74,4 @@ describe('loadLocalesConfig', () => {
92
74
await expect ( got ) . rejects . toThrow ( / E r r o r l o a d i n g c h e c k o u t _ u i / )
93
75
} )
94
76
} )
95
-
96
- test ( 'Throws if bundle is too big' , async ( ) => {
97
- await inTemporaryDirectory ( async ( tmpDir : string ) => {
98
- // Given
99
- const localesPath = joinPath ( tmpDir , 'locales' )
100
- const en = joinPath ( localesPath , 'en.default.json' )
101
- const es = joinPath ( localesPath , 'es.json' )
102
-
103
- await mkdir ( localesPath )
104
- const bigArray = JSON . stringify ( new Array ( 4000 ) . fill ( 'a' ) )
105
-
106
- await writeFile ( en , JSON . stringify ( bigArray ) )
107
- await writeFile ( es , JSON . stringify ( bigArray ) )
108
-
109
- // When
110
- const got = loadLocalesConfig ( tmpDir , 'checkout_ui' )
111
- await expect ( got ) . rejects . toThrow ( / E r r o r l o a d i n g c h e c k o u t _ u i / )
112
- } )
113
- } )
114
77
} )
0 commit comments