Skip to content

test: renable mutation tests #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2020

Conversation

rwalle61
Copy link
Collaborator

@rwalle61 rwalle61 commented May 30, 2020

This renables mutation tests in the PR build, and restores the mutation score of chai-openapi-response-validator to nearly 100%.

The mutation tests were skipped while stryker's subdependency run-async's subdependency is-promise was broken. I've updated our version of run-async, which no longer uses is-promise

There are 4 mutants remaining. I'm happy to leave the first 3 because they are about error cases that I don't know how to test usefully. The 4th should be killed when we complete #57

153. [Survived] StringLiteral
/Users/[email protected]/Documents/Projects/SideProjects/OpenApiChai/OpenAPIValidators/packages/chai-openapi-response-validator/lib/openapi-validator/lib/classes/AbstractOpenApiSpec.js:138:8
-           'INVALID_OBJECT',
+           "",

178. [Survived] StringLiteral
/Users/[email protected]/Documents/Projects/SideProjects/OpenApiChai/OpenAPIValidators/packages/chai-openapi-response-validator/lib/openapi-validator/lib/classes/AbstractOpenApiSpec.js:107:8
-           'INVALID_BODY',
+           "",

180. [Survived] ConditionalExpression
/Users/[email protected]/Documents/Projects/SideProjects/OpenApiChai/OpenAPIValidators/packages/chai-openapi-response-validator/lib/openapi-validator/lib/classes/AbstractOpenApiSpec.js:90:10
-         if (error instanceof ValidationError) {
+         if (true) {

308. [Survived] ConditionalExpression
/Users/[email protected]/Documents/Projects/SideProjects/OpenApiChai/OpenAPIValidators/packages/chai-openapi-response-validator/lib/openapi-validator/lib/classes/OpenApi3Spec.js:73:8
-       if (!matchingServerBasePaths.length) {
+       if (false) {

@rwalle61 rwalle61 force-pushed the tidy-code-kill-mutants branch from 0756c29 to 47c69f2 Compare May 30, 2020 14:54
@rwalle61 rwalle61 changed the title test, refactor: tidy code, kill mutants test, refactor: renable mutation testing May 30, 2020
@rwalle61 rwalle61 changed the title test, refactor: renable mutation testing test: renable mutation testing May 30, 2020
@rwalle61 rwalle61 changed the title test: renable mutation testing test: renable mutation tests May 30, 2020
@rwalle61 rwalle61 merged commit e691140 into openapi-library:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant