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

Bug: unhandled node kind: 262 #25

Open
OmgImAlexis opened this issue May 18, 2020 · 8 comments
Open

Bug: unhandled node kind: 262 #25

OmgImAlexis opened this issue May 18, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@OmgImAlexis
Copy link

Describe the bug
While running typescript-coverage-report I get this error, the coverage report still gets generated though.

warning: unhandled node kind: 262

To Reproduce
typescript-coverage-report

Expected behaviour
No error.

Environment

  • Tool version: 0.1.3
  • OS: MacOS
  • Node version: 13

Additional context

➜  scratch git:(master) ✗ npm run coverage                                            

> [email protected] coverage /Users/xo/code/scratchdb/scratch
> typescript-coverage-report

warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
warning: unhandled node kind: 262
┌─────────────────────────────────────────┬──────────────────┬──────────────┬────────────────┬────────────────┐
│ filenames (43)                          │ percent (95.84%) │ total (2185) │ covered (2094) │ uncovered (91) │
│ ---                                     │              --- │          --- │            --- │            --- │
│ app/log/logger.ts                       │           95.86% │          169 │            162 │              7 │
│ app/log/logger-middleware.ts            │          100.00% │          121 │            121 │              0 │
│ app/log/index.ts                        │          100.00% │            0 │              0 │              0 │
│ app/utils/generate-relative-path.ts     │          100.00% │           15 │             15 │              0 │
│ app/utils/index.ts                      │          100.00% │            2 │              2 │              0 │
│ app/config.ts                           │           93.63% │          204 │            191 │             13 │
│ types.d.ts                              │          100.00% │          105 │            105 │              0 │
│ app/database.ts                         │           89.29% │           28 │             25 │              3 │
│ app/api/episode.ts                      │          100.00% │           28 │             28 │              0 │
│ app/api/history.ts                      │          100.00% │           28 │             28 │              0 │
│ app/api/show.ts                         │          100.00% │           28 │             28 │              0 │
│ app/api/index.ts                        │          100.00% │            0 │              0 │              0 │
│ app/errors/app-error.ts                 │          100.00% │           34 │             34 │              0 │
│ app/errors/invalid-result-type-error.ts │          100.00% │           15 │             15 │              0 │
│ app/errors/index.ts                     │          100.00% │            0 │              0 │              0 │
│ app/worker.ts                           │           91.06% │          246 │            224 │             22 │
│ app/workers.ts                          │           81.88% │          160 │            131 │             29 │
│ app/index.ts                            │          100.00% │           17 │             17 │              0 │
│ app/indexers/thetvdb.ts                 │          100.00% │           30 │             30 │              0 │
│ app/indexers/tvmaze.ts                  │          100.00% │            7 │              7 │              0 │
│ app/indexers/index.ts                   │          100.00% │            0 │              0 │              0 │
│ app/processors/music/song.ts            │          100.00% │           13 │             13 │              0 │
│ app/processors/music/index.ts           │          100.00% │            0 │              0 │              0 │
│ app/processors/show/episode.ts          │          100.00% │           47 │             47 │              0 │
│ app/processors/show/index.ts            │          100.00% │            0 │              0 │              0 │
│ app/processors/index.ts                 │          100.00% │            0 │              0 │              0 │
│ app/processors/movie/movie.ts           │          100.00% │           22 │             22 │              0 │
│ app/processors/movie/index.ts           │          100.00% │            0 │              0 │              0 │
│ app/routes/episode.ts                   │          100.00% │           16 │             16 │              0 │
│ app/routes/history.ts                   │          100.00% │           16 │             16 │              0 │
│ app/routes/search.ts                    │           95.45% │           66 │             63 │              3 │
│ app/routes/show.ts                      │           98.55% │           69 │             68 │              1 │
│ app/routes/worker.ts                    │           97.56% │           82 │             80 │              2 │
│ app/routes/index.ts                     │          100.00% │           10 │             10 │              0 │
│ app/router.ts                           │          100.00% │           20 │             20 │              0 │
│ app/routes/error-handler.ts             │          100.00% │           44 │             44 │              0 │
│ app/routes/not-found-handler.ts         │          100.00% │           23 │             23 │              0 │
│ app/workers/post-processor.ts           │           96.03% │          277 │            266 │             11 │
│ app/workers/show-update.ts              │          100.00% │           32 │             32 │              0 │
│ app/workers/web-server.ts               │          100.00% │          147 │            147 │              0 │
│ test/app.test.ts                        │          100.00% │            7 │              7 │              0 │
│ test/log.test.ts                        │          100.00% │           46 │             46 │              0 │
│ types/index.ts                          │          100.00% │           11 │             11 │              0 │
└─────────────────────────────────────────┴──────────────────┴──────────────┴────────────────┴────────────────┘
View generated HTML Report at /Users/xo/code/scratchdb/scratch/coverage-ts/index.html
@OmgImAlexis OmgImAlexis added the bug Something isn't working label May 18, 2020
@alexcanessa
Copy link
Owner

Interesting. I'll have a look :) Thanks for reporting.

@alexcanessa alexcanessa added this to the v0.2.0 milestone May 18, 2020
@OmgImAlexis
Copy link
Author

If there's anything I can do to provide better logs let me know.

@alexcanessa alexcanessa removed this from the v0.2.0 milestone Nov 8, 2020
@alexcanessa
Copy link
Owner

@OmgImAlexis I'm struggling to replicate this bug.

Are you able to provide a link to your repo or create a sandbox that replicates this?

@OmgImAlexis
Copy link
Author

I think this is the same issue as before. I've actually got a decent log this time though and it pointed me to this line.

this.lock ??= new Mutex();

More specifically the ??= part which I'm guessing this doesn't support yet?

@alexcanessa
Copy link
Owner

@OmgImAlexis where is that line?

@OmgImAlexis
Copy link
Author

Make a new file. Add anything using the ??= operator and run it. You'll see the issue.

@OmgImAlexis
Copy link
Author

Getting the same issue but with a different code this time. 76 instead of 262.

warning: unhandled node kind: 76 in app/core/api-manager.ts:372:13

The offending line.

	private async getLock() {
		this.lock ??= new Mutex();
		return this.lock;
	}

@OmgImAlexis
Copy link
Author

@alexcanessa can we get type-coverage updated to v2.18.2?

plantain-00/type-coverage#99 (comment) shows it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants