Skip to content

Commit

Permalink
Merge pull request #286 from ember-a11y/drewlee/mwreport
Browse files Browse the repository at this point in the history
Prevent deletion of a11y audit reports
  • Loading branch information
Andrew A Lee authored Jul 21, 2021
2 parents ce6fa5f + d774b12 commit 3e36d5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ This addon provides middleware - code that allows the browser to talk to the nod

The middleware reporter writes the results containing all violations detected in all tests to a JSON file stored in a directory, `ember-a11y-report`, in your application or addon's root directory.

:warning: **Audit report files get generated in an additive manner, typically resulting in the `a11y-audit-report` directory growing in size as subsequent test suites are run. Environments with specific space size restrictions will require an explicit strategy to manage the deletion of older reports, as this addon no longer does so.**

To use the middleware reporter, import `setupMiddlewareReporter` and invoke in your `tests/test-helper.js` file:

```js
Expand Down
3 changes: 1 addition & 2 deletions setup-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const bodyParser = require('body-parser').json({ limit: '50mb' });
const path = require('path');
const date = require('date-and-time');
const { ensureDirSync, writeJsonSync, emptyDirSync } = require('fs-extra');
const { ensureDirSync, writeJsonSync } = require('fs-extra');

let outputDir;

Expand All @@ -29,7 +29,6 @@ function setupMiddleware(app, options) {
outputDir = path.join(options.root, 'ember-a11y-report');

ensureDirSync(outputDir);
emptyDirSync(outputDir);

app.post(
'/report-violations',
Expand Down

0 comments on commit 3e36d5f

Please sign in to comment.