Comments (6)
Saving the Mutant JIT in the correct folder seems like a good idea to me :)
The API has to be extended in order for this to work. The Mutant has to know its original location, so it can overwrite the correct file.
I would suggest changing the save method of Mutant to accept a parameter foldername
so the mutant knows where to save the mutated code. I think a revertOriginalCode
method could also be a part of the Mutant class.
The Mutant also has to have knowledge of the Mutation which has been applied for the reporter.
from stryker-js.
I would like that saving of the mutant to disk is not the responsibility of
the mutant anymore. I think separation of concerns is in order here. The
figuring out which folder/file to save to should be coordinated by the same
class that is responsible for copying the files per test runner.
On Tue, Mar 8, 2016 at 8:54 AM, Simon de Lang [email protected]
wrote:
Saving the Mutant JIT in the correct folder seems like a good idea to me :)
The API has to be extended in order for this to work. The Mutant has to
know its original location, so it can overwrite the correct file.I would suggest changing the save method of Mutant to accept a parameter
foldername so the mutant knows where to save the mutated code. I think a
revertOriginalCode method could also be a part of the Mutant class.The Mutant also has to have knowledge of the Mutation which has been
applied for the reporter.—
Reply to this email directly or view it on GitHub
#42 (comment).
from stryker-js.
I'm fine with some other class saving/restoring the code as long as the Mutant knows the (origina realtive) path to the file for which it has the mutated code
from stryker-js.
How about this api:
interface MutantInfo {
location: ESTree.SourceLocation;
fileName: string;
mutatedNode: ESTree.Node;
status?: MutantStatus;
substitution?: string;
}
The idea is that a Mutation only has to set the location, filename and the mutatedNode. The Stryker framework will than go on and set the status and substitution.
The positive thing is that we can reuse this object for reporting as well as creating mutants. The bad thing is that it could be unclear for mutation plugin developers in the future. But i guess we could split it when we want to in the future.
from stryker-js.
I removed the milestone, as we agree to not put this new API in the v1 release
from stryker-js.
https://github.com/stryker-mutator/stryker-api/blob/master/src/report/MutantResult.ts
from stryker-js.
Related Issues (20)
- missing vitest option in `stryker init` command HOT 7
- running with vitest not setting the `NODE_ENV` to `test` HOT 2
- Remove `lerna bootstrap` in favor of "workspaces"
- Allowing to ignore mutation for specifc code with some pattern HOT 3
- Export `PartialStrykerOptions` in `@stryker-mutator/core` HOT 3
- [Vitest] Survived mutants for use cases covered on the tests HOT 6
- @stryker-mutator/core peerDependency is still on v6.4.2 HOT 1
- Potential Memory Leak HOT 3
- Limit memory pressure of error messages and failure messages
- Tap runner should correctly report time spent when tap output lacks time HOT 1
- Using stryker & vitest runner & JSDOM in UI test cannot PASS dry run HOT 9
- Improve mutation operator utility by making harder-to-kill mutants HOT 1
- False positive: Stryker changes the code in a way that the lines do not match anymore. HOT 4
- Adding an option to rerun static mutants in Incremental Mode HOT 1
- Humans and mutants are friends, not enemies! HOT 1
- Possibility to mutate string nodes in JSX/TSX HOT 4
- Stryker copies binary file incorrectly : a pptx file (during initial test run) HOT 8
- Invalid CEN header
- Support pnpm HOT 1
- Taking long time to show estimated time in progress report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stryker-js.