Skip to content

Commit

Permalink
fix: remove axe ally imports when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 29, 2021
1 parent 6b262be commit fd295b0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
4 changes: 1 addition & 3 deletions plugins/axe-plugin/src/AllyBlock/AllyBlock.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as path from 'path';
import { run, AxeResults } from 'axe-core';
import { reactRunDOM } from '@component-controls/test-renderers';
import '@component-controls/jest-axe-matcher';

import { loadConfigurations } from '@component-controls/config';
import { renderDocument } from '@component-controls/test-renderers';
import { render, act } from '@testing-library/react';
Expand Down
1 change: 1 addition & 0 deletions plugins/cc-cli/src/document-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ describe('{{=it.name}}', () => {
bundle,
template,
vars,
ally,
...rest,
});
};
1 change: 1 addition & 0 deletions plugins/cc-cli/src/store-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('{{=it.name}}', () => {
bundle,
template,
vars,
ally,
...rest,
});
};
1 change: 1 addition & 0 deletions plugins/cc-cli/src/stories-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ describe('{{=it.name}}', () => {
bundle,
template,
vars,
ally,
...rest,
});
};
3 changes: 2 additions & 1 deletion plugins/cc-cli/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ export const createTemplate = (
config = path.resolve(process.cwd(), defaultConfigFolder),
output,
bundle,
ally,
vars: customVars,
} = options;
const topImports = dot.template(
fs.readFileSync(
path.resolve(__dirname, `../templates/top-imports/imports.${format}.js`),
'utf8',
),
)(accessibilityTemplate(format));
)(accessibilityTemplate(format, ally));
const importsPath = path.resolve(
__dirname,
`../templates/imports/${renderers[renderer]}.${format}.js`,
Expand Down

0 comments on commit fd295b0

Please sign in to comment.