Sha256: b99ed5a96565118913ec4fc6b4b13e4719fe46e6bdf2315bdeab0597ac8f916a
Contents?: true
Size: 900 Bytes
Versions: 2
Compression:
Stored size: 900 Bytes
Contents
import { run } from '@ember/runloop'; import { NAMESPACES, NAMESPACES_BY_ID } from 'ember-metal'; function NamespacesAssert(env) { this.env = env; } NamespacesAssert.prototype = { reset: function() {}, inject: function() {}, assert: function() { let { assert } = QUnit.config.current; if (NAMESPACES.length > 0) { assert.ok(false, 'Should not have any NAMESPACES after tests'); run(() => { let namespaces = NAMESPACES.slice(); for (let i = 0; i < namespaces.length; i++) { namespaces[i].destroy(); } }); } let keys = Object.keys(NAMESPACES_BY_ID); if (keys.length > 0) { assert.ok(false, 'Should not have any NAMESPACES_BY_ID after tests'); for (let i = 0; i < keys.length; i++) { delete NAMESPACES_BY_ID[keys[i]]; } } }, restore: function() {}, }; export default NamespacesAssert;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.5.1.1 | dist/es/internal-test-helpers/lib/ember-dev/namespaces.js |
discourse-ember-source-3.5.1.0 | dist/dist/es/internal-test-helpers/lib/ember-dev/namespaces.js |