iamchrismiller / grunt-casper

Run CasperJS Scripts/Functional Tests
Other
69 stars 38 forks source link

Dest with parallel to false pass Array #68

Open Herve-M opened 9 years ago

Herve-M commented 9 years ago

Hello,

Using Global options and custom destination with Parallel to false make input to be an Arrray.

casper: {
      options: {
        test: true,
        parallel : false,
        concurrency : 1,
        'log-level' : 'error',
        'fail-fast' : false,
        concise : false,
        engine : 'phantomjs'
      },
      advancedTest: {
        src: ['tests/test_*.js'],
        dest : function(input) {
          grunt.log.write(Array.isArray(input)); //Will log true
          str = input.replace('tests/', '');
          return 'tests/results/'+str.replace(/\.js$/,'phs.xml');
        }
      },
    },

Herve-M