From dbaab326c3eee5dcda4e9c643aa41e02f4da1e8c Mon Sep 17 00:00:00 2001 From: cenfun Date: Fri, 12 Jul 2024 08:45:33 +0800 Subject: [PATCH] add snapshot for tsx --- test/mcr.config.tsx.js | 5 +++++ test/snapshot/tsx.snapshot.json | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/snapshot/tsx.snapshot.json diff --git a/test/mcr.config.tsx.js b/test/mcr.config.tsx.js index 44cc1eef..0c80e4e7 100644 --- a/test/mcr.config.tsx.js +++ b/test/mcr.config.tsx.js @@ -1,3 +1,4 @@ +const checkSnapshot = require('./check-snapshot.js'); module.exports = { // logging: 'debug', @@ -12,6 +13,10 @@ module.exports = { entryFilter: { '**/test/specs/**': true + }, + + onEnd: function(coverageResults) { + checkSnapshot(coverageResults); } }; diff --git a/test/snapshot/tsx.snapshot.json b/test/snapshot/tsx.snapshot.json new file mode 100644 index 00000000..0305d88f --- /dev/null +++ b/test/snapshot/tsx.snapshot.json @@ -0,0 +1,21 @@ +{ + "type": "v8", + "summary": { + "bytes": "57.93 %", + "statements": "66.67 %", + "branches": "100.00 %", + "functions": "66.67 %", + "lines": "57.14 %" + }, + "files": { + "test/specs/tsx.test.ts": { + "functions": "66.67 %", + "branches": "100.00 %", + "statements": "66.67 %", + "lines": "57.14 %", + "bytes": "57.93 %", + "uncoveredLines": "5-7", + "extras": "4b,8b,9b" + } + } +} \ No newline at end of file