Rewrite tests in TypeScript
See original GitHub issueRewriting the tests in TypeScript should help us further identify places where TypeScript support can be improved.
Steps
- Rename a single
.test.js
to.test.ts
- Run
npm test
to identify errors - Start fixing the errors, making minimal changes to get the tests passing
- Repeat step 2-3 until there are no more errors, or until you get stuck and want some extra eyes from someone else in the community
- Open a pull request with your changes.
See https://github.com/probot/probot/pull/541 as an example
TODO
- test/context.test.js (https://github.com/probot/probot/pull/541)
- test/application.test.js
- test/github.test.js
- test/github/graphql.test.js
- test/index.test.js
- test/logger.test.js
- test/middleware/logging.test.js
- test/apps/default.test.js
- test/apps/sentry.test.js
- test/apps/stats.test.js
- test/private-key.test.js
- test/resolver.test.js
- test/serializers.test.js
- test/server.test.js
- test/webhook-proxy.test.js
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Writing Unit Tests For A Rewrite: A Case Study - Medium
This blog post series will explore how to write unit tests specifically for rearchitecting or rewriting a project, how to create TypeScript ......
Read more >Write fewer tests by creating better TypeScript types
Learn how to write better TypeScript types and avoid maintenance and unnecessary changes to code as your app adapts to evolving ...
Read more >Rewrite in TypeScript #256 - jest-community/eslint-plugin-jest
I've done a first pass of no-mocks-import , which passes all the tests. So far, it seems to me like this'll be a...
Read more >Better unit tests with TypeScript - ecom.software
According to the results, only 59% of developers write unit tests. It means that a lot of apps we use is not tested...
Read more >Unit Testing in TypeScript Code | The .NET Tools Blog
Write Unit Tests in TypeScript ... The testing frameworks and the code you want to test must be imported. Import statements belong at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I’m not mistaken, all tests have been migrated to TypeScript or have a PR open to migrate them to TypeScript. 💯
🎉 This issue has been resolved in version 9.0.1 🎉
The release is available on:
Your semantic-release bot 📦🚀