adopted-ember-addons / adopted-ember-addons/ember-local-storage
Most test fails when updating from 2.0.6 to 2.0.7
- Langage dominant
- JavaScript
- Étoiles
- 220
- Forks
- 78
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Error: Assertion Failed: Cannot create a new tag for `<(unknown):ember922>` after it has been destroyed.
test:
```js
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 https://github.com/funkensturm/ember-local-storage/pull/377
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Run the Unit | Services | UserOptionsDestroyer test shown in the report and inspect the behavior around StorageObject, resetStorages, and the destroyOptions call. Compare the failure with PR #377 and the 2.0.6-to-2.0.7 upgrade context; done means the reported assertion no longer occurs and the test passes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- testing
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100