Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jasmine Adapter clean equality testers added in global scope #19

Open
volodymyr-mykhailyk opened this issue Dec 13, 2011 · 0 comments
Open

Comments

@volodymyr-mykhailyk
Copy link

Jasmine have ability to add custom equality testers. However when these testers added in global scope (e.g not during actual test run) using following syntax:

jasmine.getEnv().addEqualityTester(MyEqualityTester);

they will be cleaned by jasmine adapter. Reason is that adapter recreate environment before all test are executed in the JSTD register function:

jstestdriver.pluginRegistrar.register({

name: 'jasmine',

runTestConfiguration: function(config, onTestDone, onComplete){
    if (config.getTestCaseInfo().getType() != JASMINE_TYPE) return false;
    (jasmine.currentEnv_ = new Env(onTestDone, onComplete)).execute();
    return true;
},

onTestsFinish: function(){
    jasmine.currentEnv_ = null;
    collectMode = true;
}

});

line:

(jasmine.currentEnv_ = new Env(onTestDone, onComplete)).execute();

In order to fix this adapter should extend already instantiated environment instead of creating new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant