Ember-cli-typescript: Tests failing on ember-cli 3.10.0-beta.1

Created on 10 Apr 2019  ·  8Comments  ·  Source: typed-ember/ember-cli-typescript

Tests are failing against ember-cli- 3.10.0-beta.1, with this error:

indexDeclarations is not defined (Error in blueprint template: /home/vsts/work/1/s/node_modules/ember-cli-typescript/blueprint-files/ember-cli-typescript/types/__app_name__/index.d.ts)

I.e. Ember CLI appears to no longer correctly resolve our helpers returned from locals().

The full set of changes between 3.9.0 and 3.10.0-beta.1 is here. (Most are dependency updates.)

bug other-package

Most helpful comment

All 8 comments

Some observations from testing locally:

  1. The tests begin failing in local execution with the changes introduced in ember-cli/ember-cli#8469. That uses resolve-package-path to make sure all the pieces of the CLI tooling "have the same behavior and potentially the same cache", and I expect that's related to the failure, but I haven't been able to identify how yet.

  2. That also causes a failure when attempting to use ts-node with the mocha invocation we currently use for our test:node script—I suspect it's a matter of the order in which the ts-node and resolve-package-path packages respectively are able to do whatever it is they're doing with the package resolution process, but that's speculation.

  3. As a workaround for (2), I ran yarn ci:prepare && yarn ci:test:node, hoping this would let me get at the actual issue in (1). Unfortunately… I actually cannot reproduce the errors we're seeing on CI at all when doing this, and I have no idea why the CI environment would behave differently in this specific way.

  4. I've tested this in an app locally, and none of the failures our tests demonstrate are reproducible in an actual app! So this is not an actual failure of ember-cli-typescript with ember-cli 3.10, only a test failure. This concerns me quite a bit: it means our tests don't accurately reflect reality.

I'm also out of time to poke at this for the moment, and need to get back to some other work I'm assigned to. If no one else picks it up, I'll try to poke at it again in a week or two.

cc. @dfreeman @mike-north @jamescdavis

☝️ this should fix this issue. Apparently, we depend on these caches (specifically the cache used by getRealDirectoryPath) being reset between tests.

Thanks so much for getting that sorted out!

https://github.com/ember-cli/ember-cli/pull/8650 has been merged, so ember-cli beta tests should start passing once 3.11.0-beta.2 is cut. It was not back-ported and included in 3.10.1, though. Not sure if 3.10 will get patched? @rwjblue?

@jamescdavis - I can, didn't realize that it needed to be in 3.10. Sorry about that, I should have asked in the PR.

@rwjblue no worries. The only thing that we know this is affecting is ember-cli-typescript's tests, but we are blocking PRs until tests pass with ember-cli@latest, so a patched ver would be ❤️

I'm going to close this one out as we're back to having green CI again 🎉

Was this page helpful?
0 / 5 - 0 ratings