MCPcopy Create free account
hub / github.com/ctrlplusb/react-injectables / assertIsValidInjectable

Function assertIsValidInjectable

test/Injectable.test.js:12–21  ·  view source on GitHub ↗
(injectableInstance)

Source from the content-addressed store, hash-verified

10
11 describe(`When creating an Injectable`, () => {
12 function assertIsValidInjectable(injectableInstance) {
13 const actual = typeof injectableInstance === `function` &&
14 !!injectableInstance.contextTypes &&
15 !!injectableInstance.contextTypes.registerInjectable &&
16 !!injectableInstance.contextTypes.removeInjectable;
17
18 const expected = true;
19
20 expect(actual).to.equal(expected, `Invalid Injectable created.`);
21 }
22
23 it(`It should allow use of a stateless component`, () => {
24 const StatelessComponent = () => <div>bar</div>;

Callers 1

Injectable.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected