diff --git a/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts b/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts index f783ef33a..9109d5b87 100644 --- a/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts +++ b/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts @@ -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) + }) + }) })