nathanboktae / mocha-phantomjs-core

Easiest way to run client-side Mocha tests in PhantomJS or SlimerJS :ghost:
MIT License
34 stars 11 forks source link

Call any phantom action from test suites #19

Closed maxim-grishaev closed 8 years ago

maxim-grishaev commented 8 years ago

I need to delete server-side (http-only) cookies in tests. This PR makes it able with

window.callPhantom({
  phantom: { name: 'deleteCookie', args:['cookieName'], }
// or
  hook: { name: 'delCookie', args: ['cookieName'] },
// or
  require: { id: 'cookie-deleter', name: 'clear', args: ['cookieName'],
})
nathanboktae commented 8 years ago

If you need to work outside the browser sandbox, you should write tests outside the browser sandbox.

Tests are failing, and you didn't write any for this feature.

maxim-grishaev commented 8 years ago

:+1: