From 2640c3a805a60d978d48ef1c575f9f4c12b81934 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 26 Oct 2021 09:28:53 +0200 Subject: [PATCH] Update telemetry test --- test/integration/telemetry/test/index.test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/telemetry/test/index.test.js b/test/integration/telemetry/test/index.test.js index c0784d859e3099f..0a01e59be41ab8f 100644 --- a/test/integration/telemetry/test/index.test.js +++ b/test/integration/telemetry/test/index.test.js @@ -569,6 +569,12 @@ describe('Telemetry CLI', () => { }) const regex = /NEXT_BUILD_FEATURE_USAGE[\s\S]+?{([\s\S]+?)}/g regex.exec(stderr).pop() // optimizeCss + const swcLoader = regex.exec(stderr).pop() + expect(swcLoader).toContain(`"featureName": "swcLoader"`) + expect(swcLoader).toContain(`"invocationCount": 1`) + const swcMinify = regex.exec(stderr).pop() + expect(swcMinify).toContain(`"featureName": "swcMinify"`) + expect(swcMinify).toContain(`"invocationCount": 0`) const image = regex.exec(stderr).pop() expect(image).toContain(`"featureName": "next/image"`) expect(image).toContain(`"invocationCount": 1`)