8000 Convert comments in "legal comments" format to jsdoc (#1598) · chaijs/chai@640d932 · GitHub
[go: up one dir, main page]

Skip to content

Commit 640d932

Browse files
author
Kristján Oddsson
authored
Convert comments in "legal comments" format to jsdoc (#1598)
See https://esbuild.github.io/api/#legal-comments
1 parent e7f768e commit 640d932

File tree

10 files changed

+40
-170
lines changed
  • 10 files changed

    +40
    -170
    lines changed

    lib/chai.js

    Lines changed: 7 additions & 29 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,10 +15,7 @@ import {assert} from './chai/interface/assert.js';
    1515

    1616
    const used = [];
    1717

    18-
    /*!
    19-
    * Assertion Error
    20-
    */
    21-
    18+
    // Assertion Error
    2219
    export {AssertionError};
    2320

    2421
    /**
    @@ -30,7 +27,6 @@ export {AssertionError};
    3027
    * @returns {this} for chaining
    3128
    * @api public
    3229
    */
    33-
    3430
    export function use(fn) {
    3531
    const exports = {
    3632
    AssertionError,
    @@ -50,38 +46,20 @@ export function use(fn) {
    5046
    return exports;
    5147
    };
    5248

    53-
    /*!
    54-
    * Utility Functions
    55-
    */
    56-
    49+
    // Utility Functions
    5750
    export {util};
    5851

    59-
    /*!
    60-
    * Configuration
    61-
    */
    62-
    52+
    // Configuration
    6353
    export {config};
    6454

    65-
    /*!
    66-
    * Primary `Assertion` prototype
    67-
    */
    68-
    55+
    // Primary `Assertion` prototype
    6956
    export * from './chai/assertion.js';
    7057

    71-
    /*!
    72-
    * Expect interface
    73-
    */
    74-
    58+
    // Expect interface
    7559
    export * from './chai/interface/expect.js';
    7660

    77-
    /*!
    78-
    * Should interface
    79-
    */
    80-
    61+
    // Should interface
    8162
    export * from './chai/interface/should.js';
    8263

    83-
    /*!
    84-
    * Assert interface
    85-
    */
    86-
    64+
    // Assert interface
    8765
    export * from './chai/interface/assert.js';

    lib/chai/assertion.js

    Lines changed: 2 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -9,7 +9,7 @@ import {config} from './config.js';
    99
    import {AssertionError} from 'assertion-error';
    1010
    import * as util from './utils/index.js';
    1111

    12-
    /*!
    12+
    /**
    1313
    * Assertion Constructor
    1414
    *
    1515
    * Creates object for chaining.
    @@ -147,14 +147,13 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
    147147
    }
    148148
    };
    149149

    150-
    /*!
    150+
    /**
    151151
    * ### ._obj
    152152
    *
    153153
    * Quick reference to stored `actual` value for plugin developers.
    154154
    *
    155155
    * @api private
    156156
    */
    157-
    158157
    Object.defineProperty(Assertion.prototype, '_obj',
    159158
    { get: function () {
    160159
    return util.flag(this, 'object');

    lib/chai/interface/assert.js

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -2761,7 +2761,7 @@ assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) {
    27612761
    .to.decrease(obj, prop).but.not.by(delta);
    27622762
    }
    27632763

    2764-
    /*!
    2764+
    /**
    27652765
    * ### .ifError(object)
    27662766
    *
    27672767
    * Asserts if value is not a false value, and throws if it is a true value.
    @@ -2953,7 +2953,7 @@ assert.isNotEmpty = function(val, msg) {
    29532953
    new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty;
    29542954
    };
    29552955

    2956-
    /*!
    2956+
    /**
    29572957
    * Aliases.
    29582958
    */
    29592959
    (function alias(name, as){

    lib/chai/utils/addChainableMethod.js

    Lines changed: 1 addition & 5 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,17 +4,13 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {Assertion} from '../assertion.js';
    128
    import {addLengthGuard} from './addLengthGuard.js';
    139
    import {flag} from './flag.js';
    1410
    import {proxify} from './proxify.js';
    1511
    import {transferFlags} from './transferFlags.js';
    1612

    17-
    /*!
    13+
    /**
    1814
    * Module variables
    1915
    */
    2016

    lib/chai/utils/compareByInspect.js

    Lines changed: 0 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,10 +4,6 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {inspect} from './inspect.js';
    128

    139
    /**

    lib/chai/utils/getMessage.js

    Lines changed: 0 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,10 +4,6 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {flag} from './flag.js';
    128
    import {getActual} from './getActual.js';
    139
    import {objDisplay} from './objDisplay.js';

    lib/chai/utils/getOwnEnumerableProperties.js

    Lines changed: 0 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,10 +4,6 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {getOwnEnumerablePropertySymbols} from './getOwnEnumerablePropertySymbols.js';
    128

    139
    /**

    lib/chai/utils/index.js

    Lines changed: 28 additions & 111 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,171 +4,88 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Dependencies that are used for multiple exports are required here only once
    9-
    */
    10-
    7+
    // Dependencies that are used for multiple exports are required here only once
    118
    import * as checkError from 'check-error';
    129

    13-
    /*!
    14-
    * test utility
    15-
    */
    16-
    10+
    // test utility
    1711
    export {test} from './test.js';
    1812

    19-
    /*!
    20-
    * type utility
    21-
    */
    22-
    13+
    // type utility
    2314
    export {type} from './type-detect.js';
    2415

    25-
    /*!
    26-
    * expectTypes utility
    27-
    */
    16+
    // expectTypes utility
    2817
    export {expectTypes} from './expectTypes.js';
    2918

    30-
    /*!
    31-
    * message utility
    32-
    */
    33-
    19+
    // message utility
    3420
    export {getMessage} from './getMessage.js';
    3521

    36-
    /*!
    37-
    * actual utility
    38-
    */
    39-
    22+
    // actual utility
    4023
    export {getActual} from './getActual.js';
    4124

    42-
    /*!
    43-
    * Inspect util
    44-
    */
    45-
    25+
    // Inspect util
    4626
    export {inspect} from './inspect.js';
    4727

    48-
    /*!
    49-
    * Object Display util
    50-
    */
    51-
    28+
    // Object Display util
    5229
    export {objDisplay} from './objDisplay.js';
    5330

    54-
    /*!
    55-
    * Flag utility
    56-
    */
    57-
    31+
    // Flag utility
    5832
    export {flag} from './flag.js';
    5933

    60-
    /*!
    61-
    * Flag transferring utility
    62-
    */
    63-
    34+
    // Flag transferring utility
    6435
    export {transferFlags} from './transferFlags.js';
    6536

    66-
    /*!
    67-
    * Deep equal utility
    68-
    */
    69-
    37+
    // Deep equal utility
    7038
    export {default as eql} from 'deep-eql';
    7139

    72-
    /*!
    73-
    * Deep path info
    74-
    */
    75-
    40+
    // Deep path info
    7641
    export {getPathInfo, hasProperty} from 'pathval';
    7742

    78-
    /*!
    79-
    * Function name
    80-
    */
    81-
    43+
    // Function name
    8244
    export function getName(fn) {
    8345
    return fn.name
    8446
    }
    8547

    86-
    /*!
    87-
    * add Property
    88-
    */
    89-
    48+
    // add Property
    9049
    export {addProperty} from './addProperty.js';
    9150

    92-
    /*!
    93-
    * add Method
    94-
    */
    95-
    51+
    // add Method
    9652
    export {addMethod} from './addMethod.js';
    9753

    98-
    /*!
    99-
    * overwrite Property
    100-
    */
    101-
    54+
    // overwrite Property
    10255
    export {overwriteProperty} from './overwriteProperty.js';
    10356

    104-
    /*!
    105-
    * overwrite Method
    106-
    */
    107-
    57+
    // overwrite Method
    10858
    export {overwriteMethod} from './overwriteMethod.js';
    10959

    110-
    /*!
    111-
    * Add a chainable method
    112-
    */
    113-
    60+
    // Add a chainable method
    11461
    export {addChainableMethod} from './addChainableMethod.js';
    11562

    116-
    /*!
    117-
    * Overwrite chainable method
    118-
    */
    119-
    63+
    // Overwrite chainable method
    12064
    export {overwriteChainableMethod} from './overwriteChainableMethod.js';
    12165

    122-
    /*!
    123-
    * Compare by inspect method
    124-
    */
    125-
    66+
    // Compare by inspect method
    12667
    export {compareByInspect} from './compareByInspect.js';
    12768

    128-
    /*!
    129-
    * Get own enumerable property symbols method
    130-
    */
    131-
    69+
    // Get own enumerable property symbols method
    13270
    export {getOwnEnumerablePropertySymbols} from './getOwnEnumerablePropertySymbols.js';
    13371

    134-
    /*!
    135-
    * Get own enumerable properties method
    136-
    */
    137-
    72+
    // Get own enumerable properties method
    13873
    export {getOwnEnumerableProperties} from './getOwnEnumerableProperties.js';
    13974

    140-
    /*!
    141-
    * Checks error against a given set of criteria
    142-
    */
    143-
    75+
    // Checks error against a given set of criteria
    14476
    export {checkError};
    14577

    146-
    /*!
    147-
    * Proxify util
    148-
    */
    149-
    78+
    // Proxify util
    15079
    export {proxify} from './proxify.js';
    15180

    152-
    /*!
    153-
    * addLengthGuard util
    154-
    */
    155-
    81+
    // addLengthGuard util
    15682
    export {addLengthGuard} from './addLengthGuard.js';
    15783

    158-
    /*!
    159-
    * isProxyEnabled helper
    160-
    */
    161-
    84+
    // isProxyEnabled helper
    16285
    export {isProxyEnabled} from './isProxyEnabled.js';
    16386

    164-
    /*!
    165-
    * isNaN method
    166-
    */
    167-
    87+
    // isNaN method
    16888
    export {isNaN} from './isNaN.js';
    16989

    170-
    /*!
    171-
    * getOperator method
    172-
    */
    173-
    90+
    // getOperator method
    17491
    export {getOperator} from './getOperator.js';

    lib/chai/utils/objDisplay.js

    Lines changed: 0 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,10 +4,6 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {inspect} from './inspect.js';
    128
    import {config} from '../config.js';
    139

    lib/chai/utils/test.js

    Lines changed: 0 additions & 4 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,10 +4,6 @@
    44
    * MIT Licensed
    55
    */
    66

    7-
    /*!
    8-
    * Module dependencies
    9-
    */
    10-
    117
    import {flag} from './flag.js';
    128

    139
    /**

    0 commit comments

    Comments
     (0)
    0