JSFiddle - React, Tailwind, and code Playground

by adelura

JavaScript

let $rootScope,
	$compile,
    $document;

beforeEach(inject(function (_$compile_, $document, _$rootScope_) {
    $rootScope = _$rootScope_;
    $compile = _$compile_;
    $document = _$document_;
}));

describe("shomething", function () {
	it("should", function () {
    	console.log($rootScope);
    });
});

// vs
let injected = {};

beforeEach(penInject('$compile', '$document', '$rootScope', injected));

describe("shomething", function () {
	it("should", function () {
    	console.log(injected.$rootScope);
    });
});