Skip to content

Commit 00b4dda

Browse files
authored
BREAKING CHANGE: enforce code coverage and test suite failures (#729)
* BREAKING CHANGE: enforce code coverage Previously code coverage seems to have not been enforced. To add to the hilarity, no one seems to have caught on, or cared. Maybe they are wiser than me, because code coverage seems to be a very blunt tool which forces people to care about its letter rather than the intent, and usually makes people write silly pointless tests, probably because the coverage numbers are set too high. Anyway, more to the point, runCLI is an undocumented API. Hence this is not even the right fix. The right fix would be to stop using an undocumented API, and instead use it as it was designed, which I think means via shell script. I'm not pursuing that out of time constraints, but I see it as far superior. Using undocumented features makes it more likely that they will be used incorrectly (as was being done here.). Also -- why wasn't this ever tested to see that it worked? Maybe I'm missing something super obvious here :| I did not rely on any documentation for this fix, because there are no official docs, but it seems like this is the right solution, and it was very easy to test. This is a breaking change because any repo which is using ds-cli and ignoring code coverage -- probably most of them -- will stop working once this change is made. If ds-cli were not in use by anyone, I would call it a patch update, but as it is, this instantly breaks any consumers that think their coverage is working and never looked at their logs. So I think a major version update is warranted, as a warning. * feat: ignore .idea; specify that node-gyp errors are not blocking -Ignore JetBrains IDE-specific files -Specify that even if Node-gyp throws out errors (... errors that do not end in "ok" :/ ), the build may still work.
1 parent 5cd4892 commit 00b4dda

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.idea/**
2+
13
# These files are generated
24
packages/docs/src/generated
35

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Ensure you have the following softwares installed:
5151
* `Node >= 10.18.1` - [Installation guide](https://nodejs.org/en/download/)
5252
* `Yarn` - [Installation guide](https://classic.yarnpkg.com/en/docs/install)
5353

54+
If node-gyp throws errors during installation, installation may still be successful
55+
5456
### To get started:
5557

5658
To get set up, fork and clone the project then run the following command:

plugins/test/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default class TestPlugin implements Plugin<TestArgs> {
5555
await createJestAnnotations(results);
5656
}
5757

58-
if (results.numFailedTests > 0) {
58+
if (!results.success) {
5959
process.exit(1);
6060
}
6161
} catch (e) {

0 commit comments

Comments
 (0)