Skip to content

Canary - windows tests failed because of path issues. #602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/test-file-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ describe('angular-fullstack generator', function () {
*
* @param {Array} expectedFiles - array of files
* @param {Function} done - callback(error{Error})
* @param {String} path - top level path to assert files at (optional)
* @param {String} topLevelPath - top level path to assert files at (optional)
* @param {Array} skip - array of paths to skip/ignore (optional)
*
*/
function assertOnlyFiles(expectedFiles, done, path, skip) {
path = path || './';
function assertOnlyFiles(expectedFiles, done, topLevelPath, skip) {
topLevelPath = topLevelPath || './';
skip = skip || ['node_modules', 'client/bower_components'];

recursiveReadDir(path, skip, function(err, actualFiles) {
recursiveReadDir(topLevelPath, skip, function(err, actualFiles) {
if (err) { return done(err); }
var files = actualFiles.concat();

expectedFiles.forEach(function(file, i) {
var index = files.indexOf(file);
var index = files.indexOf(path.normalize(file));
if (index >= 0) {
files.splice(index, 1);
}
});

if (files.length !== 0) {
err = new Error('unexpected files found');
err.expected = '';
err.expected = expectedFiles.join('\n');
err.actual = files.join('\n');
return done(err);
}
Expand Down