Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wix-jsdoc-babel

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wix-jsdoc-babel - npm Package Compare versions

Comparing version 1.3.4 to 1.3.9

test/box.js

6

package.json
{
"name": "wix-jsdoc-babel",
"version": "1.3.4",
"version": "1.3.9",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "babel src --out-dir dist & babel node_modules/jsdoc-babel/src --out-dir node_modules/jsdoc-babel/lib",
"build": "babel src --out-dir dist",
"prepublish": "babel src --out-dir dist",

@@ -27,5 +27,5 @@ "test": "babel src --out-dir dist & mocha --compilers js:babel-core/register ./test/**/*.spec.js"

"chai-subset": "^1.5.0",
"docworks-jsdoc2spec": "^1.3.2",
"docworks-jsdoc2spec": "^1.3.9",
"mocha": "^3.3.0"
}
}

@@ -51,3 +51,3 @@ import { assign, includes, get, last, omit } from 'lodash';

extensions: global.wixJsdocBabelExtensions,
filename: event.filename,
filename: event.filename
};

@@ -54,0 +54,0 @@

@@ -7,14 +7,14 @@ import runJsDoc from 'docworks-jsdoc2spec';

describe.only('ES6 Support', function() {
describe('ES6 Support', function() {
let jsDocRes;
beforeEach(() => {
jsDocRes = runJsDoc({
"include": [
"test/es6code.js"
]
},
"include": [
"test/es6code.js"
]
},
['.']);
});
afterEach(function(){
afterEach(function () {
if (this.currentTest.state == 'failed') {

@@ -26,7 +26,8 @@ console.log('the jsDocRes:');

it('should support async functions', function() {
it('should support async functions', function () {
expect(jsDocRes).to.containSubset({
services: [
{name: 'ES6Code', memberOf: 'aNamespace',
{
name: 'ES6Code', memberOf: 'aNamespace',
operations: [

@@ -40,12 +41,15 @@ {name: 'doSomething', nameParams: [], params: [], ret: {type: {name: 'Promise', typeParams: ['string']}}}

it('should support a function with spread operator ...', function() {
it('should support a function with spread operator ...', function () {
expect(jsDocRes).to.containSubset({
services: [
{name: 'ES6Code', memberOf: 'aNamespace',
{
name: 'ES6Code', memberOf: 'aNamespace',
operations: [
{name: 'concatArrays', nameParams: [], params: [
{
name: 'concatArrays', nameParams: [], params: [
{name: 'arr', type: 'Array'},
{name: 'arr2', type: 'Array'}
], ret: {type: 'Array'}}
], ret: {type: 'Array'}
}
]

@@ -56,3 +60,37 @@ }

});
});
describe('Class comments', function() {
let jsDocRes;
beforeEach(() => {
jsDocRes = runJsDoc({
"include": [
"test/box.js"
]
},
['.']);
});
afterEach(function(){
if (this.currentTest.state == 'failed') {
console.log('the jsDocRes:');
console.log(require('util').inspect(jsDocRes, {colors: true, depth: 9}));
}
});
// skipped because of a bug in Babel - Babel removes comments from a class body that is empty (except for the comments)
it.skip('should preserve comments in a class body even if the class body has no members', function() {
expect(jsDocRes).to.containSubset({
services: [
{name: 'Box', memberOf: '$w',
properties: [
{name: 'style'}
]
}
]
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc