karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

Grunt karma-browserify #168

Open FadelChafai opened 9 years ago

FadelChafai commented 9 years ago

When I run grunt I have this error:

Running "simplemocha:all" (simplemocha) task 1..8 ok 1 Classe: maFonction Tester maFonction ok 2 Classe: maFonction Tester Division par 0 ok 3 Classe: maFonction Tester should ok 4 Classe: maFonction future test # SKIP - ok 5 Classe: wait should exist ok 6 Classe: wait Test asynchrone ok 7 Demo test: Fair un 1er test ok 8 Demo test: Fair un 2eme test tests 7 pass 7 fail 0

Running "karma:unit" (karma) task 21 10 2015 11:17:07.237:WARN [plugin]: Error during loading "karma-browserify" plugin: Cannot find module './lib/_stream_transform.js' 21 10 2015 11:17:10.231:WARN [preprocess]: Can not load "browserify", it is not registered! Perhaps you are missing some plugin? Warning: No provider for "framework:browserify"! (Resolving: framework:browserify) Use --force to continue.

this is my Gruntfile.js :

module.exports = function(grunt) {
    grunt.initConfig({
        simplemocha : {
            options : {
                globals : [ 'expect' ],
                timeout : 3000,
                ignoreLeaks : false,
                ui : 'bdd',
                reporter : 'tap'
            },
            all : {
                src : [ 'test/*Test.js' ]
            }
        },
        karma : {
            unit: {
                options: {
                    configFile : 'karma.conf.js'
                }

            }
        }
    });
    grunt.loadNpmTasks('grunt-simple-mocha');
    grunt.loadNpmTasks('grunt-karma');
    grunt.registerTask('default', [ 'simplemocha', 'karma' ]);
};

Thank you

dignifiedquire commented 9 years ago

Have you installed karma-browserify and added it to the devDependencies in package.json?

FadelChafai commented 9 years ago

Yes already done and this is the "karma start" result

21 10 2015 11:28:46.732:INFO [framework.browserify]: bundle built 21 10 2015 11:28:46.740:INFO [karma]: Karma v0.13.11 server started at http://localhost:9876/ 21 10 2015 11:28:46.745:INFO [launcher]: Starting browser PhantomJS 21 10 2015 11:28:47.289:INFO [PhantomJS 1.9.8 (Linux 0.0.0)]: Connected on socket 0f3LPIkVmBhzEleeAAAA with id 48327382 PhantomJS 1.9.8 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.804 secs / 0.007 secs)

zzo commented 9 years ago

so this is all working now?

FadelChafai commented 9 years ago

still not working, the problem is with Grunt because when I run Karma start or Mocha all works good