Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes duplicate identifier issue by ignoring type checking of .d.ts files in node_modules #298

Merged
merged 6 commits into from
Oct 18, 2021
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
8 changes: 5 additions & 3 deletions addon-test-support/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ function logHtml(node: NodeResult | RelatedNode): void {
function logFailureMessage(node: NodeResult, key: AxeCoreNodeResultKey): void {
// this exists on axe but we don't export it as part of the typescript
// namespace, so just let me use it as I need
const message: string = ((axeCore as unknown) as AxeWithAudit)._audit.data.failureSummaries[
key
].failureMessage(node[key].map((check) => check.message || ''));
const message: string = (
axeCore as unknown as AxeWithAudit
)._audit.data.failureSummaries[key].failureMessage(
node[key].map((check) => check.message || '')
);

console.error(message);
}
Expand Down
12 changes: 12 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ module.exports = async function () {
{
name: 'ember-release',
npm: {
dependencies: {
'ember-auto-import': '^2.2.0',
webpack: '^5.0.0',
},
devDependencies: {
'ember-source': await getChannelURL('release'),
},
Expand All @@ -70,6 +74,10 @@ module.exports = async function () {
{
name: 'ember-beta',
npm: {
dependencies: {
'ember-auto-import': '^2.2.0',
webpack: '^5.0.0',
},
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
Expand All @@ -78,6 +86,10 @@ module.exports = async function () {
{
name: 'ember-canary',
npm: {
dependencies: {
'ember-auto-import': '^2.2.0',
webpack: '^5.0.0',
},
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
Expand Down
27 changes: 14 additions & 13 deletions node-tests/setup-middleware-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,20 @@ QUnit.module('setupMiddleware', function (hooks) {
server.close();
});

QUnit.test('can respond to requests to report violations', async function (
assert
) {
let data = [buildResult(violationsFixture)];
QUnit.test(
'can respond to requests to report violations',
async function (assert) {
let data = [buildResult(violationsFixture)];

let json = await fetch('http://localhost:3000/report-violations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
}).then((res) => res.json());
let json = await fetch('http://localhost:3000/report-violations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
}).then((res) => res.json());

assert.deepEqual(readJSONSync(json.outputPath), data);
});
assert.deepEqual(readJSONSync(json.outputPath), data);
}
);
});
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:ts": "tsc --noEmit",
"start": "ember serve",
"test": "npm-run-all lint:* test:*",
"test:node": "qunit node-tests",
Expand Down Expand Up @@ -132,6 +133,9 @@
"tokenRef": "GITHUB_AUTH"
}
},
"resolutions": {
"socket.io": "^4.3.1"
},
"contributors": [
"Trent Willis <[email protected]>",
"Andrew A Lee <[email protected]>",
Expand Down Expand Up @@ -164,4 +168,4 @@
"node": "12.22.1",
"yarn": "1.22.10"
}
}
}
27 changes: 14 additions & 13 deletions tests/acceptance/setup-global-a11y-hooks-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,24 @@ module('setupGlobalA11yHooks with invokeAll', function (hooks) {
});

getRange(TEST_INVOCATIONS_COUNT).forEach((num) => {
test(getTestName(num, TEST_INVOCATIONS_COUNT, 'invokeAll'), async function (
assert
) {
assert.expect(0);
test(
getTestName(num, TEST_INVOCATIONS_COUNT, 'invokeAll'),
async function (assert) {
assert.expect(0);

await visit('/');
await visit('/');

numInvoked++;
numInvoked++;

if (numInvoked === TEST_INVOCATIONS_COUNT) {
assert.expect(1);
assert.equal(
actualAuditInvocationsCount,
EXPECTED_AUDIT_INVOCATIONS_COUNT
);
if (numInvoked === TEST_INVOCATIONS_COUNT) {
assert.expect(1);
assert.equal(
actualAuditInvocationsCount,
EXPECTED_AUDIT_INVOCATIONS_COUNT
);
}
}
});
);
});
});

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/format-violation-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ module('Unit | Utils | formatViolation', function () {
],
};

let expected = /formatViolation called with improper structure of parameter: violation. Required properties: impact, help, helpUrl./;
let expected =
/formatViolation called with improper structure of parameter: violation. Required properties: impact, help, helpUrl./;

assert.throws(function () {
formatViolation(violation, [violation.nodes[0].html]);
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"alwaysStrict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
Loading