Skip to content

Commit

Permalink
fix: array in files
Browse files Browse the repository at this point in the history
  • Loading branch information
forsti0506 committed May 17, 2021
1 parent 9709790 commit 0edd3e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/utils/save-results-to-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ export async function saveResultsToFile(config: Config, sitecheckerResult: A11yS
date: new Date(),
files: [fileToSave],
};
fileObject = [{ _id: id, url: url, filesByDate: [fileResult] }];
fileObject = new Array({ _id: id, url: url, filesByDate: [fileResult] });
}

const siteResult = setupSiteresult(id, sitecheckerResult);
fileObject = [];
defineExtraTags(sitecheckerResult, config);
fs.writeFileSync(fileToSave, JSON.stringify(siteResult, null, 4));
fs.writeFileSync(config.resultsPath + 'files.json', JSON.stringify({fileObject}, null, 4));
fs.writeFileSync(config.resultsPath + 'files.json', JSON.stringify(fileObject, null, 4));

const violationsPath =
config.resultsPathPerUrl +
Expand Down
2 changes: 1 addition & 1 deletion tests/a11y-sitechecker-bin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('a11y-sitechecker-bin', function () {
});

it('should exit with code 0', (done) => {
const url = 'www.forsti.eu';
const url = 'https://www.forsti.eu';
const jobSpawn = job.spawn('node', [
'./dist/bin/a11y-sitechecker.js',
url,
Expand Down

0 comments on commit 0edd3e1

Please sign in to comment.