Sha256: 2a11cb1833c594fe40d59a4f460893d53ee288faa2c328c4ec2653eb85a77e03
Contents?: true
Size: 988 Bytes
Versions: 1
Compression:
Stored size: 988 Bytes
Contents
import { Container } from '@ember/-internals/container'; function ContainersAssert(env) { this.env = env; } const { _leakTracking: containerLeakTracking } = Container; ContainersAssert.prototype = { reset: function() {}, inject: function() {}, assert: function() { if (containerLeakTracking === undefined) return; let { config } = QUnit; let { testName, testId, module: { name: moduleName }, finish: originalFinish } = config.current; config.current.finish = function() { originalFinish.call(this); originalFinish = undefined; config.queue.unshift(function() { if (containerLeakTracking.hasContainers()) { containerLeakTracking.reset(); // eslint-disable-next-line no-console console.assert( false, `Leaked container after test ${moduleName}: ${testName} testId=${testId}` ); } }); }; }, restore: function() {}, }; export default ContainersAssert;
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.6.0.0 | dist/es/internal-test-helpers/lib/ember-dev/containers.js |