Skip to content

Commit 3445f43

Browse files
committed
revert styling changes
1 parent 5df92cb commit 3445f43

File tree

2 files changed

+52
-53
lines changed

2 files changed

+52
-53
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- run: node --version
1514
- run: npm ci
1615
- run: npm test
1716

index.test.js

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,108 @@
1-
const process = require('process');
2-
const cp = require('child_process');
3-
const path = require('path');
4-
const { fail } = require('assert');
1+
const process = require("process");
2+
const cp = require("child_process");
3+
const path = require("path");
4+
const { fail } = require("assert");
55

66
const getErrorOutput = (error) => {
77
const output = Array(...error.output)
88
.filter((line) => !!line)
9-
.map((line) => line.toString().replace(/%0A/g, '\n'))
9+
.map((line) => line.toString().replace(/%0A/g, "\n"))
1010
.filter((line) => line.trim().length > 0)
11-
.join('\n');
11+
.join("\n");
1212
return output;
1313
};
1414

15-
test('invalid LCOV format throws an error', () => {
16-
const lcovPath = './fixtures/lcov.error.info';
17-
process.env['INPUT_PATH'] = lcovPath;
18-
const ip = path.join(__dirname, 'index.js');
15+
test("invalid LCOV format throws an error", () => {
16+
const lcovPath = "./fixtures/lcov.error.info";
17+
process.env["INPUT_PATH"] = lcovPath;
18+
const ip = path.join(__dirname, "index.js");
1919
try {
2020
cp.execSync(`node ${ip}`, { env: process.env }).toString();
21-
fail('this code should fail');
21+
fail("this code should fail");
2222
} catch (err) {
2323
expect(err).toBeDefined();
2424
}
2525
});
2626

27-
test('completes when the coverage is 100 and min_coverage is not provided', () => {
28-
const lcovPath = './fixtures/lcov.100.info';
29-
process.env['INPUT_PATH'] = lcovPath;
30-
const ip = path.join(__dirname, 'index.js');
27+
test("completes when the coverage is 100 and min_coverage is not provided", () => {
28+
const lcovPath = "./fixtures/lcov.100.info";
29+
process.env["INPUT_PATH"] = lcovPath;
30+
const ip = path.join(__dirname, "index.js");
3131
cp.execSync(`node ${ip}`, { env: process.env }).toString();
3232
});
3333

34-
test('completes when the coverage is higher than the threshold after excluding files', () => {
35-
const lcovPath = './fixtures/lcov.100.info';
36-
const exclude = '**/*_observer.dart';
37-
process.env['INPUT_PATH'] = lcovPath;
38-
process.env['INPUT_EXCLUDE'] = exclude;
39-
const ip = path.join(__dirname, 'index.js');
34+
test("completes when the coverage is higher than the threshold after excluding files", () => {
35+
const lcovPath = "./fixtures/lcov.100.info";
36+
const exclude = "**/*_observer.dart";
37+
process.env["INPUT_PATH"] = lcovPath;
38+
process.env["INPUT_EXCLUDE"] = exclude;
39+
const ip = path.join(__dirname, "index.js");
4040
cp.execSync(`node ${ip}`, { env: process.env }).toString();
4141
});
4242

43-
test('fails when the coverage is not 100 and min_coverage is not provided', () => {
44-
const lcovPath = './fixtures/lcov.95.info';
45-
process.env['INPUT_PATH'] = lcovPath;
46-
const ip = path.join(__dirname, 'index.js');
43+
test("fails when the coverage is not 100 and min_coverage is not provided", () => {
44+
const lcovPath = "./fixtures/lcov.95.info";
45+
process.env["INPUT_PATH"] = lcovPath;
46+
const ip = path.join(__dirname, "index.js");
4747
try {
4848
cp.execSync(`node ${ip}`, { env: process.env }).toString();
49-
fail('this code should fail');
49+
fail("this code should fail");
5050
} catch (err) {
5151
expect(err).toBeDefined();
5252
}
5353
});
5454

55-
test('fails when the coverage is below the min_coverage, even if we exclude files', () => {
56-
const lcovPath = './fixtures/lcov.100.info';
57-
const exclude = '**/does_not_exist.dart';
58-
process.env['INPUT_PATH'] = lcovPath;
59-
process.env['INPUT_EXCLUDE'] = exclude;
60-
const ip = path.join(__dirname, 'index.js');
55+
test("fails when the coverage is below the min_coverage, even if we exclude files", () => {
56+
const lcovPath = "./fixtures/lcov.100.info";
57+
const exclude = "**/does_not_exist.dart";
58+
process.env["INPUT_PATH"] = lcovPath;
59+
process.env["INPUT_EXCLUDE"] = exclude;
60+
const ip = path.join(__dirname, "index.js");
6161
try {
6262
cp.execSync(`node ${ip}`, { env: process.env }).toString();
63-
fail('this code should fail');
63+
fail("this code should fail");
6464
} catch (err) {
6565
expect(err).toBeDefined();
6666
}
6767
});
6868

69-
test('completes when the coverage is above the given min_threshold', () => {
70-
const lcovPath = './fixtures/lcov.95.info';
69+
test("completes when the coverage is above the given min_threshold", () => {
70+
const lcovPath = "./fixtures/lcov.95.info";
7171
const minCoverage = 80;
72-
process.env['INPUT_PATH'] = lcovPath;
73-
process.env['INPUT_MIN_COVERAGE'] = minCoverage;
74-
const ip = path.join(__dirname, 'index.js');
72+
process.env["INPUT_PATH"] = lcovPath;
73+
process.env["INPUT_MIN_COVERAGE"] = minCoverage;
74+
const ip = path.join(__dirname, "index.js");
7575
cp.execSync(`node ${ip}`, { env: process.env }).toString();
7676
});
7777

78-
test('fails when the coverage is below the given min_threshold', () => {
79-
const lcovPath = './fixtures/lcov.95.info';
78+
test("fails when the coverage is below the given min_threshold", () => {
79+
const lcovPath = "./fixtures/lcov.95.info";
8080
const minCoverage = 98;
81-
process.env['INPUT_PATH'] = lcovPath;
82-
process.env['INPUT_MIN_COVERAGE'] = minCoverage;
83-
const ip = path.join(__dirname, 'index.js');
81+
process.env["INPUT_PATH"] = lcovPath;
82+
process.env["INPUT_MIN_COVERAGE"] = minCoverage;
83+
const ip = path.join(__dirname, "index.js");
8484
try {
8585
cp.execSync(`node ${ip}`, { env: process.env }).toString();
86-
fail('this code should fail');
86+
fail("this code should fail");
8787
} catch (err) {
8888
expect(err).toBeDefined();
8989
}
9090
});
9191

92-
test('shows lines that are missing coverage when failure occurs', () => {
93-
const lcovPath = './fixtures/lcov.95.info';
92+
test("shows lines that are missing coverage when failure occurs", () => {
93+
const lcovPath = "./fixtures/lcov.95.info";
9494
const minCoverage = 100;
95-
process.env['INPUT_PATH'] = lcovPath;
96-
process.env['INPUT_MIN_COVERAGE'] = minCoverage;
97-
const ip = path.join(__dirname, 'index.js');
95+
process.env["INPUT_PATH"] = lcovPath;
96+
process.env["INPUT_MIN_COVERAGE"] = minCoverage;
97+
const ip = path.join(__dirname, "index.js");
9898
try {
9999
cp.execSync(`node ${ip}`, { env: process.env }).toString();
100-
fail('this code should fail');
100+
fail("this code should fail");
101101
} catch (err) {
102102
const output = getErrorOutput(err);
103-
expect(output).toContain('Lines not covered');
103+
expect(output).toContain("Lines not covered");
104104
expect(output).toContain(
105-
'/Users/felix/Development/github.com/felangel/bloc/packages/bloc/lib/src/bloc_observer.dart: 20, 27, 36, 43, 51'
105+
"/Users/felix/Development/github.com/felangel/bloc/packages/bloc/lib/src/bloc_observer.dart: 20, 27, 36, 43, 51"
106106
);
107107
}
108108
});

0 commit comments

Comments
 (0)