Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Prevent overriding of preconfigured casper instance in a test environment #728

Merged
merged 1 commit into from Nov 27, 2013

Conversation

n1k0
Copy link
Member

@n1k0 n1k0 commented Nov 27, 2013

This was a hard decision to make, but too many people just don't read the docs and create new casper instance(s) in a test env, overriding the preconfigured one, therefore creating cumbersome, hard to understand situations.

Hopefully this change will inform users right from the place they read docs the most, fatal error messages. So as of now you'll get this fatal error when creating a new casper instance in your test script:

Fatal: you can't override the preconfigured casper instance in a test environment.

Reminder: when using the casperjs test subcommand, you must not create a new casper instance, just use the provided one. You may argue it's always been a bad design decision, but that's the way it is. We'll change this for 2.0.

This was a hard decision to take, but too many people just don't
read the docs and create new casper instance in a test env,
overriding the preconfigured one which creates cumbersome and
hard to understand situation.

Hopefully this change will inform users right from the place they
read docs the most, fatal error messages.
n1k0 added a commit that referenced this pull request Nov 27, 2013
…-test-env

Prevent overriding of preconfigured casper instance in a test environment
@n1k0 n1k0 merged commit 69f9482 into master Nov 27, 2013
@n1k0 n1k0 deleted the prevent-casper-instance-creation-in-test-env branch November 27, 2013 00:09
n1k0 added a commit that referenced this pull request Nov 27, 2013
@mickaelandrieu
Copy link
Member

👍

@icoloma
Copy link

icoloma commented Nov 29, 2013

It's worth mentioning the error message Fatal: you can't override the preconfigured casper instance in a test environment.. Otherwise using Google to find this PR is tricky :)

@n1k0
Copy link
Member Author

n1k0 commented Nov 29, 2013

@icoloma sure, will add it to the description as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants