> babel-plugin-jsdoc-closure@1.5.1 test /home/fredj/code/babel-plugin-jsdoc-closure
> npm run lint && mocha
> babel-plugin-jsdoc-closure@1.5.1 lint /home/fredj/code/babel-plugin-jsdoc-closure
> eslint index.js test/
babel-plugin-jsdoc-closure
✓ transforms a type with an imported module (86ms)
✓ transforms a type cast with an imported module in a return statement
✓ transforms an object property type cast with an imported module in a return statement
✓ transforms a type with an imported default export
✓ transforms a type with an imported named export
✓ transforms an enum imported as default export
✓ transforms a type with a JSDoc module path
✓ transforms a type with type application of module paths
✓ resolves path correctly for index.js files
✓ replaces module type in a compound type
✓ replaces module type in a nested type
✓ replaces module type in an optional param
✓ replaces module type in an non nullable param
1) exports typedefs
2) turns Object typedefs into structural interfaces
13 passing (195ms)
2 failing
1) babel-plugin-jsdoc-closure
exports typedefs:
AssertionError [ERR_ASSERTION]: '/** @module module2/types */\n/** @typedef {number} */\nexport let Foo;\n' == '/** @module module2/types */\n/** @typedef {number} */\nexport let Foo;'
+ expected - actual
/** @module module2/types */
/** @typedef {number} */
-export let Foo;
+export let Foo;
at test (test/test.js:24:12)
at Context.<anonymous> (test/test.js:203:5)
2) babel-plugin-jsdoc-closure
turns Object typedefs into structural interfaces:
AssertionError [ERR_ASSERTION]: '/** @module module2/types */\n/** @interface */\nexport function Foo() {}\n\n/** @type {(!../module1/Bar)} */\nFoo.prototype.ba == '/** @module module2/types */\n/** @interface */\nexport function Foo() {}\n\n/** @type {(!../module1/Bar)} */\nFoo.prototype.ba
+ expected - actual
/** @type {(!../module1/Bar)} */
Foo.prototype.bar;
/** @type {(undefined|number)} */
-Foo.prototype.baz;
+Foo.prototype.baz;
at test (test/test.js:24:12)
at Context.<anonymous> (test/test.js:216:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! babel-plugin-jsdoc-closure@1.5.1 test: `npm run lint && mocha`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the babel-plugin-jsdoc-closure@1.5.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/fredj/.npm/_logs/2018-06-12T07_24_05_022Z-debug.log
When updating recast to
^ 0.15.0
:The following error are raised ba
npm run test
: