[examples] Typescript #97
-
A thread where we can discuss the set up in the can you review the node-ts example and let me know your first impressions. Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Checked it out and took it for a spin. 🙂 Regarding Also regarding Regarding The majority of real-world projects generally use As far as I know, almost nobody uses the I'm honestly an idiot when it comes to bundlers. I always end up with something weird and messy that just barely holds together with duct tape. (Maybe that's just the bundler experience? haha.) With regards to
I don't know why it's reporting coverage of the test-files themselves, and I was unable to configure it's filter settings to work around this. My only clue was this issue, which seems to suggest it just doesn't work like you might expect:
That fix didn't work for me though. I think maybe Regarding Also regarding
This could be due to the fact I haven't updated my Oh man, I feel like I'm dumping a ton of work on you. This stuff is so hard to set up. I'm on vacation right now, but I might be able to jump in and try to help next week, maybe we can figure it all out together. I'll be honest, I've never even seen a On top of that, now I would love to solve this. I'm sure it must be possible, but dang this stuff is complicated. 😅 |
Beta Was this translation helpful? Give feedback.
-
oh, thanks for the feedbacks !
Do not know about that one. It seems, starting tsc in watch mode clear the console first (you can try by running
Ok switched to
Not sure that would be relevant for a non browser project like this one (simple node library written in TS), but that could be a new recipe.
That is actually the correct output: import isEven from 'is-even';
export default isEven as (input: number) => boolean; If you wish to see a difference, you'd better comment out the The declaration is indeed ran but not the implementation. I have fixed the command to measure the source files only 👍 ------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
is-even.ts | 100 | 100 | 100 | 100 |
is-odd.ts | 100 | 100 | 100 | 100 |
------------|---------|----------|---------|---------|-------------------
That would be a good idea anyway to use
That is just an alternative test runner to node itself. It used to require syntax adaptation but that is not the case anymore so that is basically an alternative on how to run the test suite:
Are all different ways to run the same test suite. The beauty of the UNIX philosophy :) (I have added it to the other recipes as well)
This is correct (node v15 at least is required). Thanks for the feedbacks, I'll add new recipes for the browser pretty soon |
Beta Was this translation helpful? Give feedback.
oh, thanks for the feedbacks !
Do not know about that one. It seems, starting tsc in watch mode clear the console first (you can try by running
npm run build:watch
alone). I have not much control on that one: