nwesterman / mochaExitCode_3893

Project to reproduce https://github.com/mochajs/mocha/issues/3893
0 stars 0 forks source link

Still WOMM using your GitLab repo... #3

Open plroebuck opened 5 years ago

plroebuck commented 5 years ago
npm test

> issue-3893@1.0.0 pretest /var/tmp/issue-3893
> /bin/echo -n 'Mocha v' && mocha --version

Mocha v6.1.4

> issue-3893@1.0.0 test /var/tmp/issue-3893
> mocha

  LinkListBuilder
    1) Guaranteed Error
    XSD Compliance

      2) Test 1

      3) Test 2

      4) Test 3

      5) Test 4
      6) Guaranteed Error

  LinkListBuilder 2
    7) Guaranteed Error
    XSD Compliance

      ✓ Test 1

      ✓ Test 2

      ✓ Test 3

      ✓ Test 4
      8) Guaranteed Error

  joi
    Joi.Validate()
      ✓ Doesn't set errors on expected values
      Required/Optional
        ✓ Notes an error if a required value is missing
        ✓ Does not set an error if an optional value is missing
        ✓ Defaults to optional
      Joi conversion
        ✓ Converts numeric strings to numbers
        ✓ Converts 'true'/'false' strings to bools
        ✓ Converts JSON strings to objects
        ✓ Converts a string containing an array to an actual array
      Joi.Number()
        ✓ Does set errors when given bools for numbers
        ✓ Does throw errors when given objects for numbers
        ✓ Does throw errors when given arrays for numbers
      Joi.String()
        ✓ Does throw errors when given numbers for strings
        ✓ Does throw errors when given objects for strings
        ✓ Does throw errors when given bools for strings
        ✓ Does throw errors when given arrays for strings
      Joi.Object()
        ✓ Does throw errors when given numbers for objects
        ✓ Does throw errors when given bools for objects
        ✓ Does throw errors when given arrays for objects
      Joi.Boolean()
        ✓ Does throw errors when given numbers for bools
        ✓ Does throw errors when given objects for bools
        ✓ Does throw errors when given arrays for bools
      Joi.Array()
        ✓ Does throw errors when given numbers for arrays
        ✓ Does throw errors when given objects for arrays
        ✓ Does throw errors when given booleans for arrays
      Max
        ✓ Accepts short enough values
        ✓ Rejects longer values
      Truncate
        ✓ Accepts short enough values
        ✓ Accepts longer values, returns truncated value
    Our Entity Application
      ✓ Stores any applied Joi conversions as proper values
      ✓ Truncates too long of strings
      Nested Entities
        ✓ Winds up with all values converted
        ✓ Rejects error in parent level
        ✓ Rejects error in child level

  Xmllint

    ✓ Test 1

    ✓ Test 2
(node:17218) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added. Use emitter.setMaxListeners() to increase limit
    9) Guaranteed Error

    ✓ Test 3
(node:17218) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit

  Once more Xmllint

    10) Test 1

    11) Test 2
    12) Guaranteed Error

    13) Test 3

  highest-random-weight
    hrw
      ✓ returns expected values
    choose
      ✓ chooses among the various values
      14) Guaranteed Error
      ✓ is not affected by order
      ✓ Does not error an empty array

  test it again highest-random-weight
    hrw
      ✓ returns expected values
    choose
      ✓ chooses among the various values
      15) Guaranteed Error
      ✓ is not affected by order
      ✓ Does not error an empty array

  and again highest-random-weight
    hrw
      ✓ returns expected values
    choose
      ✓ chooses among the various values
      16) Guaranteed Error
      ✓ is not affected by order
      ✓ Does not error an empty array

  boundary
    17) should use error status code, if ones provided
    ✓ should return a 500 if a node-error.code is generated
    ✓ should return 500 if a >599 error code is set
    ✓ should return 500 if a <500 error code is set
    ✓ should return a 500 if no error info is provided
    ✓ request body is returned in _object, if one was sent
    ✓ returns json via res.json
    ✓ error stacks are returned as an array

  boundary-joi-errors
    18) should return a 400 for Joi Validation errors
    19) should return a 400 if any error is Joi

  59 passing (1s)
  19 failing

  1) LinkListBuilder
       Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/1taskdataLinklist.test.js:40:41)

  2) LinkListBuilder
       XSD Compliance
         Test 1:

      Test 1
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:1: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'DataTransferOrigin' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/1taskdataLinklist.test.js:47:20)

  3) LinkListBuilder
       XSD Compliance
         Test 2:

      Test 2
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:1: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'DataTransferOrigin' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/1taskdataLinklist.test.js:55:20)

  4) LinkListBuilder
       XSD Compliance
         Test 3:

      Test 3
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:1: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'VersionMajor' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/1taskdataLinklist.test.js:63:20)

  5) LinkListBuilder
       XSD Compliance
         Test 4:

      Errors in main file
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:1: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'VersionMajor' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/1taskdataLinklist.test.js:71:20)

  6) LinkListBuilder
       XSD Compliance
         Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/1taskdataLinklist.test.js:73:45)

  7) LinkListBuilder 2
       Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/1taskdataLinklist.test.js:79:41)

  8) LinkListBuilder 2
       XSD Compliance
         Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/1taskdataLinklist.test.js:112:45)

  9) Xmllint
       Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/3xmllint.test.js:53:41)

  10) Once more Xmllint
       Test 1:

      AssertionError: expected { Object (errors) } to deeply equal { errors: [ 'something or another' ] }
      + expected - actual

       {
         "errors": [
      -    "file_0.xml:1: element TEST: Schemas validity error : Element 'TEST': No matching global declaration available for the validation root."
      +    "something or another"
         ]
       }

      at Context.it (test/3xmllint.test.js:70:16)

  11) Once more Xmllint
       Test 2:

      AssertionError: expected { Object (errors) } to deeply equal { errors: null }
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:1: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'DataTransferOrigin' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/3xmllint.test.js:77:16)

  12) Once more Xmllint
       Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/3xmllint.test.js:79:41)

  13) Once more Xmllint
       Test 3:

      AssertionError: expected { Object (errors) } to deeply equal { errors: null }
      + expected - actual

       {
      -  "errors": [
      -    "file_0.xml:2: element Taskdata: Schemas validity error : Element 'Taskdata': The attribute 'VersionMajor' is required but missing."
      -  ]
      +  "errors": [null]
       }

      at Context.it (test/3xmllint.test.js:86:16)

  14) highest-random-weight
       choose
         Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/4highest-random-weight.test.js:58:45)

  15) test it again highest-random-weight
       choose
         Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/4highest-random-weight.test.js:111:45)

  16) and again highest-random-weight
       choose
         Guaranteed Error:

      AssertionError: expected true to be false
      + expected - actual

      -true
      +false

      at Context.it (test/4highest-random-weight.test.js:164:45)

  17) boundary
       should use error status code, if ones provided:

      AssertionError: expected 500 to equal 418
      + expected - actual

      -500
      +418

      at Context.it (test/5errorFormat.test.js:74:16)

  18) boundary-joi-errors
       should return a 400 for Joi Validation errors:
     ReferenceError: Joi is not defined
      at Context.it (test/5errorFormat.test.js:184:21)

  19) boundary-joi-errors
       should return a 400 if any error is Joi:
     ReferenceError: Joi is not defined
      at Context.it (test/5errorFormat.test.js:194:13)

npm ERR! Test failed.  See above for more details.
plroebuck commented 5 years ago

Used same setup as before. Copied your updated tests to my "test" directory and reran. Now outputs 19 errors rather than 12.

Note MaxListenersExceededWarning for your Xmllint Test 2 & 3.