Skip to content
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

Merged
merged 10 commits into from
Oct 3, 2016
Merged

feat(ts2.0): Migrate to typescript 2.0 #154

merged 10 commits into from
Oct 3, 2016

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Sep 30, 2016

No description provided.

nicojs and others added 8 commits September 10, 2016 21:04
* 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
@nicojs
Copy link
Member Author

nicojs commented Oct 1, 2016

Build error is because we first need to release a new version of stryker-karma-runner. The module integration test is depended on it.

@simondel
Copy link
Member

simondel commented Oct 1, 2016

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.

@nicojs
Copy link
Member Author

nicojs commented Oct 1, 2016

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 :)

@bkimminich
Copy link

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! 😀

@nicojs
Copy link
Member Author

nicojs commented Oct 2, 2016

@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.

Copy link
Member Author

@nicojs nicojs left a 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));
Copy link
Member Author

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 [email protected] by removing the import of the new `'stryker-api/estree'`
@simondel simondel merged commit 1c5db5c into master Oct 3, 2016
@simondel simondel deleted the typescript-2.0 branch October 3, 2016 15:27
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.

3 participants