ember-a11y / ember-a11y-testing

A suite of accessibility tests that can be run within the Ember testing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`setup-middleware-reporter.d.ts` is causing typescript errors in consuming apps when updating to v5.2.0

robostheimer opened this issue · comments

My team recently updated ember-a11y-testing to v 5.2.0 and we began to see typescript errors emanating from ember-a11y-testing/test-support/setup-middleware-reporter.d.ts

node_modules/ember-a11y-testing/test-support/setup-middleware-reporter.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ember__test-helpers'.

1 /// <reference types="ember__test-helpers" />

In our tests, rolling back to v5.1.0 solves the issue.

It appears to have something to do with the use of currentRouteName in v5.1.0...v5.2.0#diff-2b7b86d547afb814ffca762b5a1162f99ed0f3fbf12e23bd59ed82343d6270e4R48

Thanks for reporting this! This package needs to update to use the official types from that package rather than shipping its own! I think it should be more or less just a matter of making sure this library is using the latest version of @ember/test-helpers and then removing the custom definition I linked there, but I have not checked out the repo to confirm that.

That's what we thought was going on given that ember__test-helpers is deprecated and essentially just a placeholder.

Wondering if we can get an update on this. Starting to block a migration I'm working on.

PR to fix: #503

This is pretty much a duplicate of issue #498, which hinges on a new release of @ember/test-helpers which incorporates the changes in PR #1344.

This issue and likely #498 are fixed now. Closing this issue now.