Sha256: fc0a04511ddd6666d619e9acfd17df91c39d7d62c75c2f553a0a6724bc28b3ca
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
import { run } from '@ember/runloop'; import QUnitAdapter from '../../lib/adapters/qunit'; import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; var adapter; moduleFor( 'ember-testing QUnitAdapter: QUnit 2.x', class extends AbstractTestCase { constructor() { super(); this.originalStart = QUnit.start; this.originalStop = QUnit.stop; delete QUnit.start; delete QUnit.stop; adapter = new QUnitAdapter(); } teardown() { run(adapter, adapter.destroy); QUnit.start = this.originalStart; QUnit.stop = this.originalStop; } ['@test asyncStart waits for asyncEnd to finish a test'](assert) { adapter.asyncStart(); setTimeout(function() { assert.ok(true); adapter.asyncEnd(); }, 50); } ['@test asyncStart waits for equal numbers of asyncEnd to finish a test'](assert) { let adapter = QUnitAdapter.create(); adapter.asyncStart(); adapter.asyncStart(); adapter.asyncEnd(); setTimeout(function() { assert.ok(true); adapter.asyncEnd(); }, 50); } } );
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.5.1.1 | dist/es/ember-testing/tests/adapters/qunit_test.js |
discourse-ember-source-3.5.1.0 | dist/dist/es/ember-testing/tests/adapters/qunit_test.js |