v4 breaks on ember-source 4.4
ember-qunit 8.0.2 ember-source 4.4 @ember/test-helpers 5.1.0 ember-auto-import 2.10.0
failure can be seen here: https://github.com/emberjs/data/pull/9814
upgrade is from 3.1 => 4.1
both 3.28 and 4.4 fail, 3.28 is I think expected.
1. 0ms #?? Global error: Uncaught TypeError: _ember_test_adapter__WEBPACK_IMPORTED_MODULE_0___default(...).extend is not a function at webpack://__ember_auto_import__/../../node_modules/.pnpm/ember-q_11774d8fc95bb8513207a040e4dcbf0d/node_modules/ember-qunit/dist/adapter.js?, line 10
2. 0ms #?? Global error: Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:39479/267563525182/tests/index.html?hidepassed&loadBalance&browser=4, line 95
CI Passes: https://github.com/emberjs/ember-test-waiters/pull/514
tracked this down to a bug in ember-source versions <= 4.5.1 that was fixed when ember-source was converted to typescript (thanks @wagenet )
TL;DR in ember-source <= 4.5.1, the module @ember/test/adapter incorrectly did the following:
import { Test } from 'ember-testing';
export default Test.Adapter;
ember-qunit imports @ember/test/adapter to setup a testing adapter.
This is a bug because Test here is a re-export of ember-testing/lib/test which does not contain Adapter as part of what it exports. However, Ember.Test is a lazily reified property which mutates Test from import { Test } from 'ember-testing'; adding Adapter to it. So if Ember.Test happens to be accessed prior to @ember/test/adapter being loaded in these older versions, then things "just work".
@ember/test-waiters did just this in V3, it accessed Ember.Test to check if it should register support for legacy waiters. This support was dropped in V4, leading it to no longer cause Adapter to always be present for ember-qunit to receive.
For now, I've used pnpm patch to fix the export in ember-source in 4.4.5 and 3.28.12 for the ember-data test suite.