@@ -201,7 +201,7 @@ describe('ApexTestWireAdapter', () => {
201
201
cases . forEach ( ( { testName, adapter, adapterName} ) => {
202
202
describe ( testName , ( ) => {
203
203
describe ( 'getLastConfig()' , ( ) => {
204
- it ( 'should return last available config' , ( ) => {
204
+ it ( 'should return last available config' , async ( ) => {
205
205
const element = createElement ( 'example-apex' , { is : Apex } ) ;
206
206
element . param = `v1-${ adapterName } ` ;
207
207
@@ -219,6 +219,28 @@ describe('ApexTestWireAdapter', () => {
219
219
} ) ;
220
220
} ) ;
221
221
222
+ describe ( 'resetLastConfig' , ( ) => {
223
+ test ( 'getLastConfig() should return the last available config despite we run a new set of test' , ( ) => {
224
+ //Arrange
225
+ const actual = adapter . getLastConfig ( ) ;
226
+
227
+ // Assert
228
+ expect ( actual ) . not . toBeNull ( ) ;
229
+ } ) ;
230
+
231
+ it ( 'should reset the last available' , ( ) => {
232
+ // Arrange
233
+ let actual ;
234
+
235
+ //Act
236
+ adapter . resetLastConfig ( ) ;
237
+ actual = adapter . getLastConfig ( ) ;
238
+
239
+ // Assert
240
+ expect ( actual ) . toBeNull ( ) ;
241
+ } ) ;
242
+ } ) ;
243
+
222
244
describe ( 'emit()' , ( ) => {
223
245
it ( 'should emit default value when component is created but not connected' , ( ) => {
224
246
const element = createElement ( 'example-apex' , { is : Apex } ) ;
0 commit comments