Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15977

Code Processor: mocha is returning failures

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.2.0
    • Fix Version/s: None
    • Component/s: Code Processor
    • Labels:
    • Environment:

      TiSDK 3.2.0.v20131210191510
      CLI 3.2.0-beta
      Alloy 1.3.0-beta
      Titanium Code Processor 1.1.0-cr2
      Appcelerator Studio 3.2.0.201312101708

      Description

      Problem description

      Running 'mocha' tests in the titanium-code-processor folder, failures are returned.

      1. Install mocha in case is not already present

      sudo npm install -g mocha
      

      2. Go to the titanium code processor folder (by default /usr/local/lib/node_modules/titanium-code-processor) and run "mocha"

      Result:

      6 tests are passing, 7 are failing.

      fcasaliMBP:titanium-code-processor fcasali$ mocha
       
        ․․․․․․․․․․․․․
       
        6 passing (25ms)
        7 failing
       
        1) Cloning should clone an object:
           AssertionError: Cloned objects should have the same number of properties
            at compareValues (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:92:11)
            at compareValues (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:91:4)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:166:3)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        2) Cloning should clone a function:
           TypeError: Cannot read property 'enumerable' of undefined
            at Cloner.cloneDescriptor (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11875:26)
            at Cloner.cloneProperties (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11868:10)
            at Cloner.cloneFunction (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11927:7)
            at Cloner.cloneValue (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11790:18)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:179:19)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        3) Cloning should clone an array:
           TypeError: Cannot read property 'enumerable' of undefined
            at Cloner.cloneDescriptor (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11875:26)
            at Cloner.cloneProperties (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11868:10)
            at Cloner.cloneArray (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11938:7)
            at Cloner.cloneValue (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11793:18)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:191:19)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        4) Cloning should clone a regex:
           AssertionError: Cloned objects should have the same number of properties
            at compareValues (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:92:11)
            at compareValues (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:91:4)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:199:3)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        5) Cloning should clone an error:
           TypeError: Cannot read property 'enumerable' of undefined
            at Cloner.cloneDescriptor (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11875:26)
            at Cloner.cloneProperties (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11868:10)
            at Cloner.cloneFunction (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11927:7)
            at Cloner.cloneValue (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11790:18)
            at Cloner.cloneObject (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11895:61)
            at Cloner.cloneError (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11955:20)
            at Cloner.cloneValue (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11805:18)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:208:20)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        6) Cloning should clone a module context:
           AssertionError: Cloned objects should have the same number of properties
            at compareValues (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:92:11)
            at compareLexicalEnvironments (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:39:4)
            at compareContexts (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:47:3)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:224:3)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
        7) Cloning should clone a function context:
           TypeError: Cannot read property 'enumerable' of undefined
            at Cloner.cloneDescriptor (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11875:26)
            at Cloner.cloneProperties (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11868:10)
            at Cloner.cloneFunction (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11927:7)
            at Cloner.cloneValue (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11790:18)
            at Cloner.cloneDeclarativeEnvironment (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11721:16)
            at Cloner.cloneContext (/usr/local/lib/node_modules/titanium-code-processor/lib/Base.js:11692:9)
            at Context.<anonymous> (/usr/local/lib/node_modules/titanium-code-processor/test/cloning.js:235:20)
            at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:211:32)
            at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:372:10)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:448:12
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:297:14)
            at /usr/local/lib/node_modules/mocha/lib/runner.js:307:7
            at next (/usr/local/lib/node_modules/mocha/lib/runner.js:245:23)
            at Object._onImmediate (/usr/local/lib/node_modules/mocha/lib/runner.js:274:5)
            at processImmediate [as _immediateCallback] (timers.js:330:15)
       
       
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                fcasali Federico Casali
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18049
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration