11'use strict' ;
22
3+ var path = require ( 'path' ) ;
4+
35var assert = require ( 'assert' ) ;
46
57describe ( 'grunt-lesshint' , function ( ) {
68 var spawnSync = require ( 'spawn-sync' ) ;
9+ var gruntPath = path . join ( __dirname + '/../node_modules/grunt/bin/grunt' ) ;
710
811 describe ( 'defaultOptions' , function ( ) {
9- var response = spawnSync ( 'grunt ' , [ 'lesshint' ] , {
12+ var response = spawnSync ( 'node ' , [ gruntPath , 'lesshint' ] , {
1013 encoding : 'utf8'
1114 } ) ;
1215
@@ -16,7 +19,7 @@ describe( 'grunt-lesshint', function(){
1619 } ) ;
1720
1821 describe ( 'defaultOptionsNoErrors' , function ( ) {
19- var response = spawnSync ( 'grunt ' , [ 'lesshint:noErrors' ] , {
22+ var response = spawnSync ( 'node ' , [ gruntPath , 'lesshint:noErrors' ] , {
2023 encoding : 'utf8'
2124 } ) ;
2225
@@ -26,7 +29,7 @@ describe( 'grunt-lesshint', function(){
2629 } ) ;
2730
2831 describe ( 'customOptionsNoErrors' , function ( ) {
29- var response = spawnSync ( 'grunt ' , [ 'lesshint:customOptions' ] , {
32+ var response = spawnSync ( 'node ' , [ gruntPath , 'lesshint:customOptions' ] , {
3033 encoding : 'utf8'
3134 } ) ;
3235
@@ -36,7 +39,7 @@ describe( 'grunt-lesshint', function(){
3639 } ) ;
3740
3841 describe ( 'lesshintRcNoErrors' , function ( ) {
39- var response = spawnSync ( 'grunt ' , [ 'lesshint:useLesshintRc' ] , {
42+ var response = spawnSync ( 'node ' , [ gruntPath , 'lesshint:useLesshintRc' ] , {
4043 encoding : 'utf8'
4144 } ) ;
4245
@@ -46,7 +49,7 @@ describe( 'grunt-lesshint', function(){
4649 } ) ;
4750
4851 describe ( 'withForce' , function ( ) {
49- var response = spawnSync ( 'grunt ' , [ 'lesshint:useForce' ] , {
52+ var response = spawnSync ( 'node ' , [ gruntPath , 'lesshint:useForce' ] , {
5053 encoding : 'utf8'
5154 } ) ;
5255
0 commit comments