Laika testing really slow #70

Open
rickihastings opened this Issue Nov 19, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Hi, I'm getting really slow test times, no idea whats causing it. My code runs instantly in meteor. I'm pretty sure I'm doing these right (well hopefully I am) but my tests are posted below.

var assert = require('assert');

suite('Client user forms', function() {
    test('register a user through signup form', function(done, server, client) {
        client.eval(function() {
            var homeModule = Object.create(HomeModule);
                homeModule.init();

            homeModule.signupFormSubmit({
                'your-name': 'John Smith',
                'irc-nickname': 'john',
                'email-address': 'john.smith@aol.com',
                'password': '123456',
                'confirm-password': '123456'
            }, function() {
                emit('ready', Session.get('signup.errors'));
            });

        }).once('ready', function(errors) {
            assert.equal(errors, '');
            done();
        });
    });

    test('register a user on the server and attempt to login through form', function(done, server, client) {
        server.eval(function() {
            var output = Meteor.call('registerUser', 'John Smith', 'john', 'john.smith@aol.com', '123456', '123456');
        });

        client.eval(function() {
            var homeModule = Object.create(HomeModule);
                homeModule.init();

            homeModule.loginFormSubmit({'login-email': 'john.smith@aol.com', 'login-password': '123456'}, function() {
                emit('ready', Session.get('login.errors'));
            });

        }).once('ready', function(errors) {
            assert.equal(errors, '');
            done();
        });
    });
});

You can see the homeModule in question here https://github.com/ircanywhere/ircanywhere/blob/0.2.0/client/js/home/module.js if necessary.

Owner

arunoda commented Jan 12, 2014

Tell me more about the slowness.
It is acceptable to take 800ms - 2000ms.
But if more than that, your app initializing db at startup or downloading something (webfonts or something similar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment