You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/07/25 19:53:44 UTC
[GitHub] Antonio-Maranhao opened a new pull request #938: WIP: Refactor CORS tests to run with Jest
Antonio-Maranhao opened a new pull request #938: WIP: Refactor CORS tests to run with Jest
URL: https://github.com/apache/couchdb-fauxton/pull/938
## Overview
Moved addons/cors tests to run with Jest instead of Mocha
**NOTE: Need help with components.test.js throwing error (see below)**
## Testing recommendations
Run `npm run jest`
```
Summary of all failing tests
FAIL app/addons/cors/__tests__/components.test.js
? CORS Components ? CorsController ? does not confirm for selected origins are emtpy for disabled cors change
Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
at invariant (node_modules/fbjs/lib/invariant.js:44:15)
at Dispatcher.dispatch (node_modules/flux/lib/Dispatcher.js:167:69)
at Object.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Object.addNotification (app/core/base.js:41:16)
at Object.<anonymous> (app/addons/cors/actions.js:173:47)
at Object.<anonymous> (node_modules/jquery/dist/jquery.js:3366:33)
at fire (node_modules/jquery/dist/jquery.js:3187:31)
at Object.add [as fail] (node_modules/jquery/dist/jquery.js:3246:7)
at Array.<anonymous> (node_modules/jquery/dist/jquery.js:3365:30)
at Function.each (node_modules/jquery/dist/jquery.js:365:19)
at Object.<anonymous> (node_modules/jquery/dist/jquery.js:3361:14)
at Function.Deferred (node_modules/jquery/dist/jquery.js:3427:9)
at Object.then (node_modules/jquery/dist/jquery.js:3360:20)
at Object.saveCors (app/addons/cors/actions.js:162:60)
at save (app/addons/cors/components.js:277:49)
at componentDidUpdate (app/addons/cors/components.js:259:12)
at measureLifeCyclePerf (node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
at node_modules/react-dom/lib/ReactCompositeComponent.js:729:11
at CallbackQueue.notifyAll (node_modules/react-dom/lib/CallbackQueue.js:76:22)
at ReactReconcileTransaction.close (node_modules/react-dom/lib/ReactReconcileTransaction.js:80:26)
at ReactReconcileTransaction.closeAll (node_modules/react-dom/lib/Transaction.js:206:25)
at ReactReconcileTransaction.perform (node_modules/react-dom/lib/Transaction.js:153:16)
at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/Transaction.js:140:20)
at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/ReactUpdates.js:89:32)
at Object.flushBatchedUpdates (node_modules/react-dom/lib/ReactUpdates.js:172:19)
at ReactDefaultBatchingStrategyTransaction.closeAll (node_modules/react-dom/lib/Transaction.js:206:25)
at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-dom/lib/Transaction.js:153:16)
at Object.batchedUpdates (node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:62:26)
at Object.enqueueUpdate (node_modules/react-dom/lib/ReactUpdates.js:200:22)
at enqueueUpdate (node_modules/react-dom/lib/ReactUpdateQueue.js:24:16)
at Object.enqueueSetState (node_modules/react-dom/lib/ReactUpdateQueue.js:209:5)
at Object.<anonymous>.ReactComponent.setState (node_modules/react/lib/ReactComponent.js:63:16)
at onChange (app/addons/cors/components.js:264:10)
at triggerEvents (node_modules/backbone/backbone.js:368:57)
at triggerApi (node_modules/backbone/backbone.js:356:19)
at eventsApi (node_modules/backbone/backbone.js:155:16)
at child.Events.trigger (node_modules/backbone/backbone.js:346:5)
at child.wrapper (node_modules/lodash/index.js:3095:19)
at child.triggerChange (app/core/store.js:25:398)
at child.wrapper [as triggerChange] (node_modules/lodash/index.js:3095:19)
at child.dispatch (app/addons/cors/stores.js:178:10)
at child.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Dispatcher._invokeCallback (node_modules/flux/lib/Dispatcher.js:198:24)
at Dispatcher.dispatch (node_modules/flux/lib/Dispatcher.js:174:14)
at Object.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Object.toggleEnableCors (app/addons/cors/actions.js:38:45)
at enableCorsChange (app/addons/cors/components.js:273:49)
at Object.<anonymous> (app/addons/cors/__tests__/components.test.js:68:14)
? CORS Components ? CorsController ? does not confirm all origins change if selected origins are emtpy
Invariant Violation: Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
at invariant (node_modules/fbjs/lib/invariant.js:44:15)
at Dispatcher.dispatch (node_modules/flux/lib/Dispatcher.js:167:69)
at Object.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Object.addNotification (app/core/base.js:41:16)
at Object.<anonymous> (app/addons/cors/actions.js:173:47)
at Object.<anonymous> (node_modules/jquery/dist/jquery.js:3366:33)
at fire (node_modules/jquery/dist/jquery.js:3187:31)
at Object.add [as fail] (node_modules/jquery/dist/jquery.js:3246:7)
at Array.<anonymous> (node_modules/jquery/dist/jquery.js:3365:30)
at Function.each (node_modules/jquery/dist/jquery.js:365:19)
at Object.<anonymous> (node_modules/jquery/dist/jquery.js:3361:14)
at Function.Deferred (node_modules/jquery/dist/jquery.js:3427:9)
at Object.then (node_modules/jquery/dist/jquery.js:3360:20)
at Object.saveCors (app/addons/cors/actions.js:162:60)
at save (app/addons/cors/components.js:277:49)
at componentDidUpdate (app/addons/cors/components.js:259:12)
at measureLifeCyclePerf (node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
at node_modules/react-dom/lib/ReactCompositeComponent.js:729:11
at CallbackQueue.notifyAll (node_modules/react-dom/lib/CallbackQueue.js:76:22)
at ReactReconcileTransaction.close (node_modules/react-dom/lib/ReactReconcileTransaction.js:80:26)
at ReactReconcileTransaction.closeAll (node_modules/react-dom/lib/Transaction.js:206:25)
at ReactReconcileTransaction.perform (node_modules/react-dom/lib/Transaction.js:153:16)
at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/Transaction.js:140:20)
at ReactUpdatesFlushTransaction.perform (node_modules/react-dom/lib/ReactUpdates.js:89:32)
at Object.flushBatchedUpdates (node_modules/react-dom/lib/ReactUpdates.js:172:19)
at ReactDefaultBatchingStrategyTransaction.closeAll (node_modules/react-dom/lib/Transaction.js:206:25)
at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-dom/lib/Transaction.js:153:16)
at Object.batchedUpdates (node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:62:26)
at Object.enqueueUpdate (node_modules/react-dom/lib/ReactUpdates.js:200:22)
at enqueueUpdate (node_modules/react-dom/lib/ReactUpdateQueue.js:24:16)
at Object.enqueueSetState (node_modules/react-dom/lib/ReactUpdateQueue.js:209:5)
at Object.<anonymous>.ReactComponent.setState (node_modules/react/lib/ReactComponent.js:63:16)
at onChange (app/addons/cors/components.js:264:10)
at triggerEvents (node_modules/backbone/backbone.js:368:57)
at triggerApi (node_modules/backbone/backbone.js:356:19)
at eventsApi (node_modules/backbone/backbone.js:155:16)
at child.Events.trigger (node_modules/backbone/backbone.js:346:5)
at child.wrapper (node_modules/lodash/index.js:3095:19)
at child.triggerChange (app/core/store.js:25:398)
at child.wrapper [as triggerChange] (node_modules/lodash/index.js:3095:19)
at child.dispatch (app/addons/cors/stores.js:178:10)
at child.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Dispatcher._invokeCallback (node_modules/flux/lib/Dispatcher.js:198:24)
at Dispatcher.dispatch (node_modules/flux/lib/Dispatcher.js:174:14)
at Object.wrapper [as dispatch] (node_modules/lodash/index.js:3095:19)
at Object.originChange (app/addons/cors/actions.js:51:45)
at originChange (app/addons/cors/components.js:292:49)
at Object.<anonymous> (app/addons/cors/__tests__/components.test.js:88:14)
Test Suites: 1 failed, 50 passed, 51 total
Tests: 2 failed, 328 passed, 330 total
Snapshots: 0 total
Time: 8.3s
Ran all test suites.
```
## GitHub issue number
n/a
## Related Pull Requests
n/a
## Checklist
- [x] Code is written and works correctly;
- [x] Changes are covered by tests;
- [x] Documentation reflects the changes;
- [ ] Update [rebar.config.script](https://github.com/apache/couchdb/blob/master/rebar.config.script) with the correct tag once a new Fauxton release is made
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services