-
Notifications
You must be signed in to change notification settings - Fork 250
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
feat(ts2.0): Migrate to typescript 2.0 #154
Conversation
* Using @types dev dependencies * Update estree node structure in mutator module * Remove dependency on typings
* Make use of ts2 type narrowing * Rename module 'stryker-api/estree' back to 'estree'
* Update mutators by injecting the new signature of the copy function. This allows us to remove most of the type castings.
Mostely: * Semicolon * Whitespaces * double quotes <> single quotes
* Removed unused other stryker dependencies
Build error is because we first need to release a new version of stryker-karma-runner. The module integration test is depended on it. |
So far it looks good to me. I still have to update the README to show the new mutators, or shall we just post them on the website once we release a new Stryker version? I think it's a good idea to use a proper project to see if we generate the same mutants (or at least get the same score and amount of generated mutants). We could use the Juice Shop by @bkimminich. |
Sounds good to me! A sanity check on the juice shop is a good idea. I'll do it tomorrow. Did the mutators change much? Indeed just update once its merged and released. Oh yeah, typescript 2 is awesome :) |
Woot! Now that https://github.com/bkimminich/juice-shop is the almost-official-migration-guinea-pig of Stryker, I can offer to trade some Juice Shop stickers for a Stryker-T-Shirt with you guys! 😀 |
@bkimminich Of course you can! And you most certainly deserve a T-shirt 😄. Please send me a PM on twitter (@_nicojs) or an email with the details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a test and fix the bug
this.mutateTestExpression(mutatedFalseNode, false); | ||
nodes.push(mutatedFalseNode); | ||
let nodes: estree.Node[] = []; | ||
nodes.push(this.booleanLiteralNode(node.nodeID, false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in fact incorrect. We should not replace the current node with a false
/true
but the test expression.
* Use the nodeID of the test expression wrather than the if-expression itself. * Add Ternary operator `true` mutation
* Make stryker backward compatible with stryker-api@0.2.0 by removing the import of the new `'stryker-api/estree'`
No description provided.