|
|
@@ -310,4 +310,26 @@ describe('api: createVaporApp', () => {
|
|
|
).toHaveBeenWarned()
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+ describe('config.performance', () => {
|
|
|
+ afterEach(() => {
|
|
|
+ window.performance.clearMeasures()
|
|
|
+ })
|
|
|
+
|
|
|
+ test('with performance enabled', () => {
|
|
|
+ const { app, mount } = define({}).create()
|
|
|
+
|
|
|
+ app.config.performance = true
|
|
|
+ mount()
|
|
|
+ expect(window.performance.getEntries()).lengthOf(2)
|
|
|
+ })
|
|
|
+
|
|
|
+ test('with performance disabled', () => {
|
|
|
+ const { app, mount } = define({}).create()
|
|
|
+
|
|
|
+ app.config.performance = false
|
|
|
+ mount()
|
|
|
+ expect(window.performance.getEntries()).lengthOf(0)
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|