jsdoc icon indicating copy to clipboard operation
jsdoc copied to clipboard

npm run test fails

Open JJ opened this issue 4 years ago • 1 comments

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

JJ avatar Jan 15 '22 08:01 JJ

This can probably be closed out https://github.com/jsdoc/jsdoc/commit/a0240542cfbb8ee1cdc1f0770d584872915193f1

81reap avatar May 06 '25 03:05 81reap