Skip to content

Commit 6c82e70

Browse files
Matthew-Mallimo10xLaCroixDrinker
authored andcommitted
fix(node): fix node versions. Fix issue with node16
1 parent e300a41 commit 6c82e70

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v1
2525
with:
26-
node-version: 12
26+
node-version: 16
2727
- name: Install dependencies
2828
run: npm ci
2929
- name: Release

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node: [ '10.x', '12.x', '14.x' ]
13+
node: [ '12.x', '14.x', '16.x' ]
1414
name: Node ${{ matrix.node }}
1515
steps:
1616
- uses: actions/checkout@v2

__tests__/html-report-creator.spec.js

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ const merge = require('lodash/merge');
1616
const mkdirp = require('mkdirp');
1717
const fs = require('fs');
1818

19-
function prettyPrintHtml(rawHtml) {
20-
return rawHtml.end({
21-
pretty: true,
22-
indent: ' ',
23-
newline: '\n',
24-
allowEmpty: false,
25-
});
26-
}
27-
2819
function buildMockResult(mockResult = {}) {
2920
const defaultMockResult = {
3021
numFailedTestSuites: 0,
@@ -97,7 +88,7 @@ describe('html-report-creator', () => {
9788

9889
createHtmlReport(mockResult);
9990
expect(
100-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
91+
fs.writeFileSync.mock.calls[0][1]
10192
).toMatchSnapshot();
10293
});
10394

@@ -119,7 +110,7 @@ describe('html-report-creator', () => {
119110

120111
createHtmlReport(mockResult);
121112
expect(
122-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
113+
fs.writeFileSync.mock.calls[0][1]
123114
).toMatchSnapshot();
124115
});
125116

@@ -129,7 +120,7 @@ describe('html-report-creator', () => {
129120

130121
createHtmlReport(mockResult);
131122
expect(
132-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
123+
fs.writeFileSync.mock.calls[0][1]
133124
).toMatchSnapshot();
134125
});
135126

@@ -151,7 +142,7 @@ describe('html-report-creator', () => {
151142

152143
createHtmlReport(mockResult);
153144
expect(
154-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
145+
fs.writeFileSync.mock.calls[0][1]
155146
).toMatchSnapshot();
156147
});
157148

@@ -173,7 +164,7 @@ describe('html-report-creator', () => {
173164

174165
createHtmlReport(mockResult);
175166
expect(
176-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
167+
fs.writeFileSync.mock.calls[0][1]
177168
).toMatchSnapshot();
178169
});
179170

@@ -195,7 +186,7 @@ describe('html-report-creator', () => {
195186

196187
createHtmlReport(mockResult);
197188
expect(
198-
prettyPrintHtml(fs.writeFileSync.mock.calls[0][1])
189+
fs.writeFileSync.mock.calls[0][1]
199190
).toMatchSnapshot();
200191
});
201192

html-report-creator.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,16 @@ module.exports = (result) => {
9292
});
9393
}
9494
});
95-
writeFile(process.env.JEST_TEST_REPORT_PATH || path.join(process.cwd(), 'test-results/test-report.html'), htmlOutput);
95+
writeFile(
96+
process.env.JEST_TEST_REPORT_PATH || path.join(process.cwd(),
97+
'test-results/test-report.html'),
98+
htmlOutput.end({
99+
pretty: true,
100+
indent: ' ',
101+
newline: '\n',
102+
allowEmpty: false,
103+
})
104+
);
96105

97106
return result;
98107
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
],
5050
"contributors": [
5151
"Andres Escobar",
52-
"Jimmy King"
52+
"Jamie King"
5353
],
5454
"author": "Andres Escobar <andres.escobar@aexp.com> (https://github.com/anescobar1991)",
5555
"license": "Apache-2.0",

0 commit comments

Comments
 (0)