Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions lib/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ export class PlatformService implements IPlatformService {
}

// verify .xml files are well-formed
let validXmlFiles = this.checkXmlFiles(sourceFiles).wait();
if (!validXmlFiles) {
return false;
}
this.checkXmlFiles(sourceFiles).wait();

// Remove .ts and .js.map files
PlatformService.EXCLUDE_FILES_PATTERN.forEach(pattern => sourceFiles = sourceFiles.filter(file => !minimatch(file, pattern, {nocase: true})));
Expand Down
11 changes: 9 additions & 2 deletions test/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,17 @@ describe('Platform Service Tests', () => {
projectData.projectDir = tempFolder;

platformService = testInjector.resolve("platformService");
let result = platformService.preparePlatform("android").wait();
let oldLoggerWarner = testInjector.resolve("$logger").warn;
let warnings: string = "";
try {
testInjector.resolve("$logger").warn = (text: string) => warnings += text;
platformService.preparePlatform("android").wait();
} finally {
testInjector.resolve("$logger").warn = oldLoggerWarner;
}

// Asserts that prepare has caught invalid xml
assert.isFalse(result);
assert.isFalse(warnings.indexOf("has errors") !== -1);
});
});
});