@@ -47,83 +47,83 @@ describe('PersistenteAttributesManager.service.ts', () => {
4747 type TestTypes = {
4848 name : string ;
4949 count : number ;
50- }
50+ } ;
5151 class ExtendClass extends PersistentAttributesManager < TestTypes > {
5252 protected readonly defaultAttributes = {
5353 name : 'john' ,
54- count : 0
55- }
54+ count : 0 ,
55+ } ;
5656 }
57- let target : ExtendClass
57+ let target : ExtendClass ;
5858 beforeEach ( ( ) => {
5959 adapter = new MockPersistenceAdapter ( ) ;
6060 handlerInput = new HandlerInputFactory (
6161 new RequestEnvelopeFactory ( new LaunchRequestFactory ( ) )
6262 )
6363 . setPersistanceAdapter ( adapter )
6464 . create ( ) ;
65- target = new ExtendClass ( handlerInput . attributesManager )
66- } )
65+ target = new ExtendClass ( handlerInput . attributesManager ) ;
66+ } ) ;
6767 it ( 'should get default value' , async ( ) => {
68- const attributes = await target . getPersistentAttributes ( )
68+ const attributes = await target . getPersistentAttributes ( ) ;
6969 expect ( attributes ) . toEqual ( {
7070 name : 'john' ,
71- count : 0
72- } )
73- } )
71+ count : 0 ,
72+ } ) ;
73+ } ) ;
7474 it ( 'should get overwritten default value' , async ( ) => {
7575 const attributes = await target . getPersistentAttributes ( {
76- count : 2
77- } )
76+ count : 2 ,
77+ } ) ;
7878 expect ( attributes ) . toEqual ( {
7979 name : 'john' ,
80- count : 2
81- } )
82- } )
80+ count : 2 ,
81+ } ) ;
82+ } ) ;
8383 it ( 'should get overwritten default value' , async ( ) => {
8484 const attributes = await target . getPersistentAttributes ( {
85- count : 2
86- } )
85+ count : 2 ,
86+ } ) ;
8787 expect ( attributes ) . toEqual ( {
8888 name : 'john' ,
89- count : 2
90- } )
91- } )
89+ count : 2 ,
90+ } ) ;
91+ } ) ;
9292 it ( 'should not saved default atts when does not call save' , async ( ) => {
9393 handlerInput2 = new HandlerInputFactory (
9494 new RequestEnvelopeFactory ( new LaunchRequestFactory ( ) )
9595 )
9696 . setPersistanceAdapter ( adapter )
9797 . create ( ) ;
98- const target2 = new ExtendClass ( handlerInput2 . attributesManager )
98+ const target2 = new ExtendClass ( handlerInput2 . attributesManager ) ;
9999 await target . getPersistentAttributes ( {
100- count : 2
101- } )
102- const attributes = await target2 . getPersistentAttributes ( )
100+ count : 2 ,
101+ } ) ;
102+ const attributes = await target2 . getPersistentAttributes ( ) ;
103103 expect ( attributes ) . toEqual ( {
104104 name : 'john' ,
105- count : 0
106- } )
107- } )
105+ count : 0 ,
106+ } ) ;
107+ } ) ;
108108 it ( 'should saved default atts when call save' , async ( ) => {
109109 handlerInput2 = new HandlerInputFactory (
110110 new RequestEnvelopeFactory ( new LaunchRequestFactory ( ) )
111111 )
112112 . setPersistanceAdapter ( adapter )
113113 . create ( ) ;
114- const target2 = new ExtendClass ( handlerInput2 . attributesManager )
115- const att = await target . getPersistentAttributes ( {
116- count : 2
117- } )
118- await target . updatePersistentAttributes ( att )
119- await target . save ( )
120- const attributes = await target2 . getPersistentAttributes ( )
114+ const target2 = new ExtendClass ( handlerInput2 . attributesManager ) ;
115+ const att = await target . getPersistentAttributes ( {
116+ count : 2 ,
117+ } ) ;
118+ await target . updatePersistentAttributes ( att ) ;
119+ await target . save ( ) ;
120+ const attributes = await target2 . getPersistentAttributes ( ) ;
121121 expect ( attributes ) . toEqual ( {
122122 name : 'john' ,
123- count : 2
124- } )
125- } )
126- } )
123+ count : 2 ,
124+ } ) ;
125+ } ) ;
126+ } ) ;
127127
128128 describe ( 'Class method test' , ( ) => {
129129 it ( '| should not save adn get persisted attributes without execute save method' , async ( ) => {
0 commit comments