Using Testem In Grunt(grunt-testem)

25 views
Skip to first unread message

Darin Hensley

unread,
Sep 22, 2014, 5:19:11 PM9/22/14
to testem...@googlegroups.com
I am using the npm package grunt-testem on a headless system. When I run 'grunt testem' I get:

Running "testem:main" (testem) task
Now testing...
# Executing spec/other.js
>> 0 assertions passed

Done, without errors.

This test should pass...I have ran it before in lineman(that uses testem) but I want to run this on my own generator. 

Here is my grunt file:

module.exports = function(grunt) {
   
require('load-grunt-tasks')(grunt);
    grunt
.initConfig({
        pkg
: grunt.file.readJSON('package.json'),


        express
: {
           prod
: {
               options
: {
                   port
: 9000,
                   script
: 'app.js',
               
}
           
}
       
},
        testem
: {
          options
: {
           
"framework": "jasmine",
           
"url" : "http://10.14.213.161:7357",
           
"src_files" : [
             
"spec/*.js",
             
"app/scripts/**/*.js"
           
],
            launch_in_ci
: [
             
"PhantomJS",
           
],
            launch_in_dev
: [
             
"PhantomJS",
           
]
         
},
            main
: {
              src
: [
             
"spec/*.js",
           
]
         
},
       
},


I guess for starters do I need to have it load all the bower components? Right now I am using src_files to load the web app files(not the test file) but I don't think it is doing so. I can't place the web apps files in main : {} because then it runs them as if they were test files. Not sure what to do. 

Reply all
Reply to author
Forward
0 new messages