Mocha-web client-side tests not running with Velocity for Meteor application -


i have 2 samples mocha web tests i'm trying run using velocity.

for reason, client-side tests under /tests/mocha/client folder never executed, whereas server side tests under /tests/mocha/server folder run fine.

here structure of project todos (meteor example project)

  • client
  • lib
  • packages
  • server
  • tests
    • mocha
      • client
      • server

thoughts ?

i ran problem , related having browser-policy package installed.

what need in javascript console, e.g. in chrome developer tools, @ console tab. (apple key + option key + i). should see errors this:

refused frame 'http://localhost:5000/?mocha=true' because violates following content security policy directive: "default-src 'self'". note 'frame-src' not explicitly set, 'default-src' used fallback.

you should still have package installed security purposes, test following:

meteor remove browser-policy meteor 

i guess see client tests running now? in case saw them removed browser-policy package. need @ point tweak browser policy settings application allow iframe mocha, e.g. http://localhost:5000, development environment.

before changing code put browser-policy package.

meteor add browser-policy 

now make changes browser policy settings:

  // browser policy settings, e.g.   // browserpolicy.content...    // need run @ end overrides normal broswer policy settings.   if (process.env.node_env === "development")   {     console.log("in development mode. allowing framing mocha-web can run tests.");     this.browserpolicy.content.alloworiginforall("localhost:*");     this.browserpolicy.content.allowconnectorigin("ws://localhost:5000");     this.browserpolicy.content.allowconnectorigin("ws://localhost:3000");   } 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -