Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Barrelsby(args as any);
console.log(`Running integration test in directory ${directory}`);
const outputDirectory = join(directory, "output");
const expectedDirectory = join(directory, "expected");
console.log("Output directory:", outputDirectory);
console.log("Expected directory:", expectedDirectory);
const comparison = dirCompare.compareSync(
outputDirectory,
expectedDirectory,
{
compareContent: true,
compareFileAsync:
dirCompare.fileCompareHandlers.lineBasedFileCompare
.compareAsync,
compareFileSync:
dirCompare.fileCompareHandlers.lineBasedFileCompare.compareSync,
ignoreLineEnding: true
}
);
if (comparison.differences && comparison.diffSet) {
comparison.diffSet
.filter(diff => diff.state !== "equal")
.map(diff => {
const state = ({
distinct: "<>",
equal: "==",
left: "->",
right: "<-"
} as any)[diff.state];
const name1 = diff.name1 ? diff.name1 : "";
const name2 = diff.name2 ? diff.name2 : "";
console.error(
() => {
Barrelsby(args as any);
console.log(`Running integration test in directory ${directory}`);
const outputDirectory = join(directory, "output");
const expectedDirectory = join(directory, "expected");
console.log("Output directory:", outputDirectory);
console.log("Expected directory:", expectedDirectory);
const comparison = dirCompare.compareSync(
outputDirectory,
expectedDirectory,
{
compareContent: true,
compareFileAsync:
dirCompare.fileCompareHandlers.lineBasedFileCompare
.compareAsync,
compareFileSync:
dirCompare.fileCompareHandlers.lineBasedFileCompare.compareSync,
ignoreLineEnding: true
}
);
if (comparison.differences && comparison.diffSet) {
comparison.diffSet
.filter(diff => diff.state !== "equal")
.map(diff => {
const state = ({
distinct: "<>",
equal: "==",
left: "->",
right: "<-"
} as any)[diff.state];