<commit_before>var assert = require('assert');

describe('webdriver.io page', function() {

    it('should have the right title - the good old callback way', function(done) {

        browser
            .url('/')
            .getTitle(function(err, title) {
                assert.equal(err, undefined);
                assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');
            })
            .call(done);

    });

    it('should have the right title - the promise way', function() {

        return browser
            .url('/')
            .getTitle().then(function(title) {
                assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');
            });

    });

    it('should be a pending test');

    it('should have the right title - the fancy generator way', function* () {

        yield browser.url('/');
        var title = yield browser.getTitle();
        assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');

    });

    it('should be skippable (pending) from within a generator spec', function* () {
        yield browser.pause(100);
        this.skip();
        throw new Error("this should not be reached");
    });

});<commit_msg>add test for mocha’s normal `this` context inside generator<commit_after>var assert = require('assert');

describe('webdriver.io page', function() {

    it('should have the right title - the good old callback way', function(done) {

        browser
            .url('/')
            .getTitle(function(err, title) {
                assert.equal(err, undefined);
                assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');
            })
            .call(done);

    });

    it('should have the right title - the promise way', function() {

        return browser
            .url('/')
            .getTitle().then(function(title) {
                assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');
            });

    });

    it('should be a pending test');

    it('should have the right title - the fancy generator way', function* () {

        yield browser.url('/');
        var title = yield browser.getTitle();
        assert.equal(title, 'WebdriverIO - Selenium 2.0 javascript bindings for nodejs');

    });

    it('should have mocha’s normal `this` context within a generator spec', function* () {
        yield browser.pause(100);
        assert(this);
        assert(this.test);
        assert(this.test.title);
        assert(this.test.fullTitle());
    });

    it('should be skippable (pending) from within a generator spec', function* () {
        yield browser.pause(100);
        this.skip();
        throw new Error("this should not be reached");
    });

});
{'fraction_non_alphanumeric': 0.13119429590017825, 'fraction_numerical': 0.0074866310160427805, 'mean_word_length': 2.1958997722095672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1200851', 'n_tokens_mistral': 788, 'n_tokens_neox': 720, 'n_words': 229}