@@ -33,9 +33,9 @@ describe('hot module replacement', () => {
3333 } )
3434
3535 test ( 'createRecord' , ( ) => {
36- expect ( createRecord ( 'test1' ) ) . toBe ( true )
36+ expect ( createRecord ( 'test1' , { } ) ) . toBe ( true )
3737 // if id has already been created, should return false
38- expect ( createRecord ( 'test1' ) ) . toBe ( false )
38+ expect ( createRecord ( 'test1' , { } ) ) . toBe ( false )
3939 } )
4040
4141 test ( 'rerender' , async ( ) => {
@@ -47,7 +47,7 @@ describe('hot module replacement', () => {
4747 __hmrId : childId ,
4848 render : compileToFunction ( `<div><slot/></div>` )
4949 }
50- createRecord ( childId )
50+ createRecord ( childId , Child )
5151
5252 const Parent : ComponentOptions = {
5353 __hmrId : parentId ,
@@ -59,7 +59,7 @@ describe('hot module replacement', () => {
5959 `<div @click="count++">{{ count }}<Child>{{ count }}</Child></div>`
6060 )
6161 }
62- createRecord ( parentId )
62+ createRecord ( parentId , Parent )
6363
6464 render ( h ( Parent ) , root )
6565 expect ( serializeInner ( root ) ) . toBe ( `<div>0<div>0</div></div>` )
@@ -125,7 +125,7 @@ describe('hot module replacement', () => {
125125 unmounted : unmountSpy ,
126126 render : compileToFunction ( `<div @click="count++">{{ count }}</div>` )
127127 }
128- createRecord ( childId )
128+ createRecord ( childId , Child )
129129
130130 const Parent : ComponentOptions = {
131131 render : ( ) => h ( Child )
@@ -164,7 +164,7 @@ describe('hot module replacement', () => {
164164 render : compileToFunction ( `<div @click="count++">{{ count }}</div>` )
165165 }
166166 }
167- createRecord ( childId )
167+ createRecord ( childId , Child )
168168
169169 const Parent : ComponentOptions = {
170170 render : ( ) => h ( Child )
@@ -209,7 +209,7 @@ describe('hot module replacement', () => {
209209 } ,
210210 render : compileToFunction ( template )
211211 }
212- createRecord ( id )
212+ createRecord ( id , Comp )
213213
214214 render ( h ( Comp ) , root )
215215 expect ( serializeInner ( root ) ) . toBe (
@@ -246,14 +246,14 @@ describe('hot module replacement', () => {
246246 } ,
247247 render : compileToFunction ( `<div>{{ msg }}</div>` )
248248 }
249- createRecord ( childId )
249+ createRecord ( childId , Child )
250250
251251 const Parent : ComponentOptions = {
252252 __hmrId : parentId ,
253253 components : { Child } ,
254254 render : compileToFunction ( `<Child msg="foo" />` )
255255 }
256- createRecord ( parentId )
256+ createRecord ( parentId , Parent )
257257
258258 render ( h ( Parent ) , root )
259259 expect ( serializeInner ( root ) ) . toBe ( `<div>foo</div>` )
@@ -272,14 +272,14 @@ describe('hot module replacement', () => {
272272 __hmrId : childId ,
273273 render : compileToFunction ( `<div>child</div>` )
274274 }
275- createRecord ( childId )
275+ createRecord ( childId , Child )
276276
277277 const Parent : ComponentOptions = {
278278 __hmrId : parentId ,
279279 components : { Child } ,
280280 render : compileToFunction ( `<Child class="test" />` )
281281 }
282- createRecord ( parentId )
282+ createRecord ( parentId , Parent )
283283
284284 render ( h ( Parent ) , root )
285285 expect ( serializeInner ( root ) ) . toBe ( `<div class="test">child</div>` )
@@ -299,7 +299,7 @@ describe('hot module replacement', () => {
299299 __hmrId : childId ,
300300 render : compileToFunction ( `<div>child</div>` )
301301 }
302- createRecord ( childId )
302+ createRecord ( childId , Child )
303303
304304 const components : ComponentOptions [ ] = [ ]
305305
@@ -321,7 +321,7 @@ describe('hot module replacement', () => {
321321 }
322322 }
323323
324- createRecord ( parentId )
324+ createRecord ( parentId , parentComp )
325325 }
326326
327327 const last = components [ components . length - 1 ]
0 commit comments