Skip to content

Commit 714585b

Browse files
committed
chore(utils): update test names, fix snapshot
1 parent b2d4b3a commit 714585b

4 files changed

Lines changed: 6 additions & 83 deletions

File tree

packages/utils/src/lib/reports/__snapshots__/generate-md-report.integration.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`report-to-md > should contain all sections when using the fixture report 1`] = `
3+
exports[`generateMdReport > should contain all sections when using the fixture report 1`] = `
44
"# Code PushUp Report
55
66
|🏷 Category|⭐ Score|🛡 Audits|
@@ -437,7 +437,7 @@ The following plugins were run:
437437
Made with ❤ by [Code PushUp](https://github.com/flowup/quality-metrics-cli#readme)"
438438
`;
439439

440-
exports[`report-to-md > should not contain category sections when categories are empty 1`] = `
440+
exports[`generateMdReport > should not contain category sections when categories are empty 1`] = `
441441
"# Code PushUp Report
442442
443443
## 🛡️ Audits

packages/utils/src/lib/reports/__snapshots__/generate-stdout-summary.integration.test.ts.snap

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`report-to-stdout > should contain all sections when using the fixture report 1`] = `
3+
exports[`generateStdoutSummary > should contain all sections when using the fixture report 1`] = `
44
"Code PushUp Report - @code-pushup/core@0.0.1
55
66
@@ -89,84 +89,7 @@ Made with ❤ by code-pushup.dev
8989
"
9090
`;
9191

92-
exports[`report-to-stdout > should not contain category section when categories are empty 1`] = `
93-
"Code PushUp Report - @code-pushup/core@0.0.1
94-
95-
96-
ESLint audits
97-
98-
● Disallow missing props validation in a React component definition 6 warnings
99-
● Disallow variable declarations from shadowing variables declared 3 warnings
100-
in the outer scope
101-
● Require or disallow method and property shorthand syntax for 3 warnings
102-
object literals
103-
● verifies the list of dependencies for Hooks like useEffect and 2 warnings
104-
similar
105-
● Disallow missing \`key\` props in iterators/collection literals 1 warning
106-
● Disallow unused variables 1 warning
107-
● Enforce a maximum number of lines of code in a function 1 warning
108-
● Require \`const\` declarations for variables that are never 1 warning
109-
reassigned after declared
110-
● Require braces around arrow function bodies 1 warning
111-
● Require the use of \`===\` and \`!==\` 1 warning
112-
● Disallow \`target=\\"_blank\\"\` attribute without \`rel=\\"noreferrer\\"\` passed
113-
● Disallow assignment operators in conditional expressions passed
114-
● Disallow comments from being inserted as text nodes passed
115-
● Disallow direct mutation of this.state passed
116-
● Disallow duplicate properties in JSX passed
117-
● Disallow invalid regular expression strings in \`RegExp\` passed
118-
constructors
119-
● Disallow loops with a body that allows only one iteration passed
120-
● Disallow missing displayName in a React component definition passed
121-
● Disallow missing React when using JSX passed
122-
● Disallow negating the left operand of relational operators passed
123-
● Disallow passing of children as props passed
124-
● Disallow React to be incorrectly marked as unused passed
125-
● Disallow reassigning \`const\` variables passed
126-
● Disallow the use of \`debugger\` passed
127-
● Disallow the use of undeclared variables unless mentioned in passed
128-
\`/*global */\` comments
129-
● Disallow undeclared variables in JSX passed
130-
● Disallow unescaped HTML entities from appearing in markup passed
131-
● Disallow usage of deprecated methods passed
132-
● Disallow usage of findDOMNode passed
133-
● Disallow usage of isMounted passed
134-
● Disallow usage of the return value of ReactDOM.render passed
135-
● Disallow usage of unknown DOM property passed
136-
● Disallow use of optional chaining in contexts where the passed
137-
\`undefined\` value is not allowed
138-
● Disallow using Object.assign with an object literal as the first passed
139-
argument and prefer the use of object spread instead
140-
● Disallow using string references passed
141-
● Disallow variables used in JSX to be incorrectly marked as unused passed
142-
● Disallow when a DOM element is using both children and passed
143-
dangerouslySetInnerHTML
144-
● Enforce a maximum number of lines per file passed
145-
● Enforce camelcase naming convention passed
146-
● Enforce comparing \`typeof\` expressions against valid strings passed
147-
● Enforce consistent brace style for all control statements passed
148-
● Enforce ES5 or ES6 class for returning value in render function passed
149-
● enforces the Rules of Hooks passed
150-
● Require \`let\` or \`const\` instead of \`var\` passed
151-
● Require calls to \`isNaN()\` when checking for \`NaN\` passed
152-
● Require or disallow \\"Yoda\\" conditions passed
153-
● Require using arrow functions for callbacks passed
154-
155-
156-
Lighthouse audits
157-
158-
● First Contentful Paint 1.2 s
159-
● Largest Contentful Paint 1.5 s
160-
● Speed Index 1.2 s
161-
● Cumulative Layout Shift 0
162-
● Total Blocking Time 0 ms
163-
164-
165-
Made with ❤ by code-pushup.dev
166-
"
167-
`;
168-
169-
exports[`report-to-stdout > should not contain category sections when categories are empty 1`] = `
92+
exports[`generateStdoutSummary > should not contain category section when categories are empty 1`] = `
17093
"Code PushUp Report - @code-pushup/core@0.0.1
17194
17295

packages/utils/src/lib/reports/generate-md-report.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { generateMdReport } from './generate-md-report';
44
import { scoreReport } from './scoring';
55
import { sortReport } from './sorting';
66

7-
describe('report-to-md', () => {
7+
describe('generateMdReport', () => {
88
beforeEach(() => {
99
vi.useFakeTimers();
1010
vi.setSystemTime(new Date('2021-09-15'));

packages/utils/src/lib/reports/generate-stdout-summary.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { generateStdoutSummary } from './generate-stdout-summary';
44
import { scoreReport } from './scoring';
55
import { sortReport } from './sorting';
66

7-
describe('report-to-stdout', () => {
7+
describe('generateStdoutSummary', () => {
88
it('should contain all sections when using the fixture report', () => {
99
const logOutput = generateStdoutSummary(
1010
sortReport(scoreReport(reportMock())),

0 commit comments

Comments
 (0)