Skip to content

Commit 66fd940

Browse files
wip(tests): minor enhancements
1 parent e20b864 commit 66fd940

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/basic.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const { defaultFilesFactory, createPage } = require('./testsTools.js');
128128
}
129129
});
130130

131-
await expect(output.filter(e => e.type === 'pageerror' && e.text).map(e => e.text)[0]).toMatch(/.*HTTP Error.*/);
131+
await expect(output.filter(e => e.type === 'pageerror' && e.text).map(e => e.text)[0]).toMatch('HttpError');
132132

133133
});
134134

@@ -476,6 +476,7 @@ const { defaultFilesFactory, createPage } = require('./testsTools.js');
476476
});
477477
478478
return createApp(options).then((app) => {
479+
479480
mountApp(app, 'elt1')
480481
481482
options.moduleCache = {
@@ -485,6 +486,7 @@ const { defaultFilesFactory, createPage } = require('./testsTools.js');
485486
createApp(options).then((app2) => {
486487
mountApp(app2, 'elt2');
487488
});
489+
488490
})
489491
}
490492
`

tests/testsTools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ const defaultFilesFactory = ({ vueTarget }) => ({
276276
optionsOverride(options)
277277
278278
boot({ options, createApp, mountApp, Vue })
279-
.then(app => app.$el.parentNode.vueApp = app);
279+
.then(app => app && (app.$el.parentNode.vueApp = app));
280280
281281
//window._done && window._done();
282282

0 commit comments

Comments
 (0)