@@ -128,17 +128,18 @@ void main() {
128128 test ('setItem overwrites existing value' , () async {
129129 const initialValue = 'initial' ;
130130 const newValue = 'new' ;
131-
131+
132132 await asyncStorage.setItem (key: testKey, value: initialValue);
133133 expect (await asyncStorage.getItem (key: testKey), initialValue);
134-
134+
135135 await asyncStorage.setItem (key: testKey, value: newValue);
136136 expect (await asyncStorage.getItem (key: testKey), newValue);
137137 });
138138
139139 test ('removeItem handles non-existent key gracefully' , () async {
140140 // Should not throw when removing a key that doesn't exist
141- expect (() => asyncStorage.removeItem (key: 'non_existent_key' ), returnsNormally);
141+ expect (() => asyncStorage.removeItem (key: 'non_existent_key' ),
142+ returnsNormally);
142143 await asyncStorage.removeItem (key: 'non_existent_key' );
143144 });
144145 });
@@ -164,16 +165,17 @@ void main() {
164165 test ('persistSession does nothing and returns normally' , () async {
165166 expect (() => emptyStorage.persistSession ('test' ), returnsNormally);
166167 await emptyStorage.persistSession ('test' );
167-
168+
168169 // Should still return null/false after persist attempt
169170 expect (await emptyStorage.hasAccessToken (), false );
170171 expect (await emptyStorage.accessToken (), null );
171172 });
172173
173- test ('removePersistedSession does nothing and returns normally' , () async {
174+ test ('removePersistedSession does nothing and returns normally' ,
175+ () async {
174176 expect (() => emptyStorage.removePersistedSession (), returnsNormally);
175177 await emptyStorage.removePersistedSession ();
176-
178+
177179 // Should still return null/false after remove attempt
178180 expect (await emptyStorage.hasAccessToken (), false );
179181 expect (await emptyStorage.accessToken (), null );
@@ -187,7 +189,7 @@ void main() {
187189 persistSessionKey: 'test_empty_session' ,
188190 );
189191 await localStorage.initialize ();
190-
192+
191193 await localStorage.persistSession ('' );
192194 expect (await localStorage.hasAccessToken (), true );
193195 expect (await localStorage.accessToken (), '' );
@@ -198,8 +200,9 @@ void main() {
198200 persistSessionKey: 'test_special_chars' ,
199201 );
200202 await localStorage.initialize ();
201-
202- const specialSession = '{"access_token": "áéíóú-test-token-!@#\$ %^&*()"}' ;
203+
204+ const specialSession =
205+ '{"access_token": "áéíóú-test-token-!@#\$ %^&*()"}' ;
203206 await localStorage.persistSession (specialSession);
204207 expect (await localStorage.hasAccessToken (), true );
205208 expect (await localStorage.accessToken (), specialSession);
@@ -210,16 +213,16 @@ void main() {
210213 persistSessionKey: 'test_multiple_ops' ,
211214 );
212215 await localStorage.initialize ();
213-
216+
214217 // Multiple persist operations
215218 await localStorage.persistSession ('session1' );
216219 await localStorage.persistSession ('session2' );
217220 expect (await localStorage.accessToken (), 'session2' );
218-
221+
219222 // Remove then add again
220223 await localStorage.removePersistedSession ();
221224 expect (await localStorage.hasAccessToken (), false );
222-
225+
223226 await localStorage.persistSession ('session3' );
224227 expect (await localStorage.accessToken (), 'session3' );
225228 });
0 commit comments