Sha256: 42cc9d7912682c10e16f505338056a76be0abea6f69b0a4fdc54b5cea10adf63
Contents?: true
Size: 1.12 KB
Versions: 1
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 = QUnitAdapter.create(); } 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.6.0.0 | dist/es/ember-testing/tests/adapters/qunit_test.js |