jsdoc / jsdoc/jsdoc

npm run test fails

Open
#1,968 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
15.5k
Forks
1.5k
Avg merge
10d 23h
Merged PRs (30d)
1

Description

Following instructions for installation and testing, npm run test (or simply gulp) fails.

JSDoc debug output

First it fails because yargs-parser is missing. After installing yargs-parser, it fails with:

[09:57:15] Using gulpfile ~/progs/forks/jsdoc/gulpfile.js
[09:57:15] Starting 'default'...
[09:57:15] Starting 'lint'...
[09:57:20] Finished 'lint' after 5.44 s
[09:57:20] Starting 'test'...
[09:57:23] Finished 'test' after 2.91 s
[09:57:23] Finished 'default' after 8.35 s

Executing 1420 defined specs...

>> Done!


Failed Specs:

1. trailing comment : should not ignore trailing comments in an empty source file with a `use strict` declaration
   Expected [  ] to be array of size 1.
       at <Jasmine>
       at UserContext.<anonymous> /home/jmerelo/progs/forks/jsdoc/packages/jsdoc/test/specs/documentation/trailingcomment.js:20:19
       at <Jasmine>
       at processImmediate node:internal/timers:464:21

2. @generator tag : should mark the symbol as a generator function
   TypeError: Cannot read properties of undefined (reading 'generator')
       at UserContext.<anonymous> /home/jmerelo/progs/forks/jsdoc/packages/jsdoc/test/specs/tags/generatortag.js:6:20
       at <Jasmine>
       at processImmediate node:internal/timers:464:21

Summary:

❌  Failed
Suites:  516 of 516
Specs:   1407 of 1420 (13 pending)
Expects: 2767 (2 failures)
Finished in 1.599 seconds


DEPRECATION: Jasmine#onComplete is deprecated. Instead of calling onComplete, set the Jasmine instance's exitOnCompletion property to false and use the promise returned from the execute method.
    at <Jasmine>
    at Jasmine.onComplete (/home/jmerelo/progs/forks/jsdoc/node_modules/jasmine/lib/jasmine.js:474:12)
    at module.exports (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc/test/index.js:47:11)
    at module.exports.cli.runTests (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc/cli.js:193:41)
    at Object.module.exports.cli.runCommand (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc/cli.js:174:12)
    at /home/jmerelo/progs/forks/jsdoc/packages/jsdoc/jsdoc.js:32:13
    at Object.<anonymous> (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc/jsdoc.js:33:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Note: This message will be shown only once. Set the verboseDeprecations config property to true to see every occurrence.
DEPRECATION: describe with no children (describe() or it()) is deprecated and will be removed in a future version of Jasmine. Please either remove the describe or add children to it.
    at <Jasmine>
    at Proxy.<anonymous> (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc-core/test/specs/lib/name.js:179:3)
    at <Jasmine>
    at Object.<anonymous> (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc-core/test/specs/lib/name.js:1:227)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Object.load (/home/jmerelo/progs/forks/jsdoc/packages/jsdoc/node_modules/requizzle/lib/loader.js:105:18)
Note: This message will be shown only once. Set the verboseDeprecations config property to true to see every occurrence.
Expected behavior

Same result as GitHub actions

Current behavior

Described above

Your environment
Software Version
JSDoc HEAD
Node.js v16.13.2
npm 8.1.2
Operating system Ubuntu 20.04

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running npm run test or gulp from the repository and inspect gulpfile.js, then review the failing specs at packages/jsdoc/test/specs/documentation/trailingcomment.js and packages/jsdoc/test/specs/tags/generatortag.js. Done means the missing dependency issue is resolved and the test run matches GitHub Actions without these two failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.