     next()
   'return files from "test" directory with trailing slash': (test) ->
     test.expect 1
-    test.deepEqual importless.findAll("test/files/"), ['test/files/imported.less', 'test/files/test.less', 'test/files/test2.css']
+    actual = _.sortBy importless.findAll("test/files/")
+    expected = _.sortBy ['test/files/imported.less', 'test/files/test.less', 'test/files/test2.css']
+    test.deepEqual actual, expected
     test.done()
 
 exports['rename'] =

exports['getImported'] =
  'returns array of imported filepaths': (test) ->
    test.expect 1
    test.deepEqual importless.getImported(['test/files/test.less']), ['test/files/whereever/someLessFile.less', 'test/files/imported.less', 'test/upperDir.less']
    test.done()

exports['stripImported'] = 
  'return array without imported filepaths': (test) ->
    test.expect 1
    files = importless.findAll 'test/files'
    test.deepEqual importless.stripImported(files, importless.getImported(files)), ['test/files/test.less', 'test/files/test2.css']
    test.done()

exports['setIgnored'] = 
  'ignore `ignore` directory when set': (test) ->
    test.expect 1
    importless.setIgnored '**/test2.*'
    files = importless.findAll 'test/files'
    test.deepEqual importless.stripIgnored(files, importless.getIgnored()), ['test/files/imported.less', 'test/files/test.less']
    importless.setIgnored []
    test.done()


exports['detectDependencies'] = 
  setUp: (next) ->
    next()
  tearDown: (next) ->

"use strict"
importless = require '../src/importless'
fs             = require 'fs'
_              =  require('grunt').util._


#
