Uncaught Error: Assertion Failed: calling set on destroyed object

后端 未结 4 1249
旧巷少年郎
旧巷少年郎 2021-02-05 00:09

working in ember-cli testing. After all tests passed it returns extra two test with errors.

Uncaught Error: Assertion Failed: calling set on destroyed obj

4条回答
  •  眼角桃花
    2021-02-05 01:07

    The issue is related to a promise not completely resolving and another test getting run immediately after.

    You should give Ember Concurrency a try.

    import { task, timeout } from 'ember-concurrency';

    myFunction: task(function * () {
    
      // do somethinng
    
      yield timeout(1000); // wait for x milliseconds
    
      // do something else
    
    }).drop(),
    

提交回复
热议问题