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

Most test fails when updating from 2.0.6 to 2.0.7 #379

Open
hexadecy opened this issue Feb 20, 2024 · 3 comments
Open

Most test fails when updating from 2.0.6 to 2.0.7 #379

hexadecy opened this issue Feb 20, 2024 · 3 comments

Comments

@hexadecy
Copy link

hexadecy commented Feb 20, 2024

Error: Assertion Failed: Cannot create a new tag for <(unknown):ember922> after it has been destroyed.

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/test-support/reset-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 #377

@fsmanuel
Copy link
Member

@hexadecy thanks for reporting. I'll try to add tests to cover that and to figure out what is going wrong.

@RobbieTheWagner
Copy link

I'm hitting the same issue.

@hexadecy
Copy link
Author

I just noticed that the readme still mentions ember-mocha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants