Open hexadecy opened 7 months ago
Error: Assertion Failed: Cannot create a new tag for <(unknown):ember922> after it has been destroyed.
<(unknown):ember922>
test:
import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import StorageObject from 'ember-local-storage/local/object'; import { _resetStorages } from 'ember-local-storage/helpers/storage'; module('Unit | Services | UserOptionsDestroyer', function (hooks) { setupTest(hooks); module('upon a successful user options object destruction', function (hooks) { hooks.beforeEach(function () { const mockStorage = StorageObject.extend(); mockStorage.reopenClass({ initialState() { return { userId: '1', }; }, }); this.owner.register('storage:userOptions', mockStorage); }); hooks.afterEach(function () { window.localStorage.clear(); _resetStorages(); }); test('should return a positive response', async function (assert) { assert.expect(1); const service = this.owner.lookup('service:destroyers/user-options-destroyer'); const response = await service.destroyOptions(); const expectedServiceResponse = { success: true, result: null }; assert.deepEqual(response, expectedServiceResponse); }); }); });
Related to https://github.com/funkensturm/ember-local-storage/pull/377
@hexadecy thanks for reporting. I'll try to add tests to cover that and to figure out what is going wrong.
I'm hitting the same issue.
Error: Assertion Failed: Cannot create a new tag for
<(unknown):ember922>
after it has been destroyed.test:
Related to https://github.com/funkensturm/ember-local-storage/pull/377