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

Returns done instantly before any tests are ran #81

Open
mikemellor11 opened this issue Jun 22, 2016 · 0 comments
Open

Returns done instantly before any tests are ran #81

mikemellor11 opened this issue Jun 22, 2016 · 0 comments

Comments

@mikemellor11
Copy link

Using on Windows, v2.2.0, node v5.5.0.

Running "casperjs:local" (casperjs) task
Command: ./node_modules/.bin/casperjs.cmd

Running tests from "_Test/casperjs/index.js":

Done, without errors.

mmellor@mmellor2-w7 MINGW64 ~/Desktop/Sites/portfolio (development)
$ Test file: _Test/casperjs/index.js
# Testing index
PASS Testing index (NaN test)
FAIL HTTP status code is: 200
#    type: assertHttpStatus
#    file: _Test/casperjs/index.js
#    subject: false
#    current: null
#    expected: 200
PASS All resources found
FAIL 2 tests executed in 2.421s, 1 passed, 1 failed, 0 dubious, 0 skipped.

This is my test file which does execute but after grunt has ended so the servers closed so it fails.

casper.test.begin('Testing index', function suite(test) {
    require('./modules/include.js')(test);

    casper.start(url + 'index.html', function(){
        test.assertHttpStatus(200);
    });

    casper.then(function() {
        checkAllResourcesFound();
    });

    casper.run(function () {
        test.done();
    });
});
@mikemellor11 mikemellor11 changed the title Returns done instantly before any tasks are ran Returns done instantly before any tests are ran Jun 22, 2016
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