Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
includedFiles returns an array in no particular order
Browse files Browse the repository at this point in the history
Fixes: #1123
  • Loading branch information
saper committed Sep 16, 2015
1 parent 7c919fe commit 0c9eb05
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var assert = require('assert'),
resolveFixture = path.resolve.bind(null, __dirname, 'fixtures');

describe('api', function() {

describe('.render(options, callback)', function() {
it('should compile sass to css with file', function(done) {
var expected = read(fixture('simple/expected.css'), 'utf8').trim();
Expand Down Expand Up @@ -1046,7 +1047,7 @@ describe('api', function() {
file: fixture('include-files/index.scss')
}, function(error, result) {
assert(!error);
assert.deepEqual(result.stats.includedFiles, expected);
assert.deepEqual(result.stats.includedFiles.sort(), expected.sort());
done();
});
});
Expand Down Expand Up @@ -1507,11 +1508,12 @@ describe('api', function() {
fixture('include-files/bar.scss').replace(/\\/g, '/'),
fixture('include-files/foo.scss').replace(/\\/g, '/'),
fixture('include-files/index.scss').replace(/\\/g, '/')
];
].sort();
var actual = result.stats.includedFiles.sort();

assert.equal(result.stats.includedFiles[0], expected[0]);
assert.equal(result.stats.includedFiles[1], expected[1]);
assert.equal(result.stats.includedFiles[2], expected[2]);
assert.equal(actual[0], expected[0]);
assert.equal(actual[1], expected[1]);
assert.equal(actual[2], expected[2]);
done();
});

Expand Down

0 comments on commit 0c9eb05

Please sign in to comment.