{"size": 934, "ext": "js", "max_stars_repo_path": "public/bower_components/pubsub.js/spec/SpecPubSubEnvironments.js", "max_stars_repo_name": "aswinvk28/convert-drawing-prototype", "max_stars_repo_stars_event_min_datetime": "2015-01-06T15:53:42.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-19T18:21:19.000Z", "max_issues_repo_path": "public/bower_components/pubsub.js/spec/SpecPubSubEnvironments.js", "max_issues_repo_name": "aswinvk28/convert-drawing-prototype", "max_issues_repo_issues_event_min_datetime": "2015-09-18T20:10:54.000Z", "max_issues_repo_issues_event_max_datetime": "2015-09-18T20:10:54.000Z", "max_forks_repo_path": "public/bower_components/pubsub.js/spec/SpecPubSubEnvironments.js", "max_forks_repo_name": "aswinvk28/convert-drawing-prototype", "max_forks_repo_forks_event_min_datetime": "2015-01-07T05:17:09.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-18T10:44:16.000Z"}
{"max_stars_count": 51, "max_issues_count": 1, "max_forks_count": 14, "avg_line_length": 23.9487179487, "max_line_length": 65, "alphanum_fraction": 0.6670235546}
/*
 * pubsub.js environments support unit tests
 *
 * @author Federico "Lox" Lucignano
 * <https://plus.google.com/117046182016070432246>
 */

/*global describe, it, xit, expect, beforeEach, PubSub, require*/
var context = this;

describe("Supported environments", function () {
	'use strict';

	beforeEach(function () {
		this.addMatchers({
			toMatchImplementation: function () {
				var api = this.actual;
				return api &&
					(api.publish instanceof Function) &&
					(api.subscribe instanceof Function) &&
					(api.unsubscribe instanceof Function);
			}
		});
	});

	it("Should work as a traditional JS module", function () {
		expect(PubSub).toMatchImplementation();
	});

	xit("Should work as a CommonJS module", function () {
		expect(require('pubsub')).toMatchImplementation();
	});

	xit("Should work as an AMD module", function () {
		require('pubsub', function (p) {
			expect(p).toMatchImplementation();
		});
	});
});