12345678910111213141516171819202122 |
- import { Injector } from '../../src/Injector'
- import { TestComponent } from './TestComponent'
- import { assert, expect } from 'chai';
- import { COMPONENT_A_VALUE, COMPONENT_B_VALUE } from '../CONSTANTS';
-
- var should = require('chai').should();
- var chai = require("chai");
- var chaiAsPromised = require("chai-as-promised");
-
- chai.use(chaiAsPromised);
-
- describe('dependjs', () => {
- it('is able to resolve linear dependencies', () => {
-
- const testComp = Injector.resolve(TestComponent)
-
- expect(testComp.getFromA()).to.be.equal(COMPONENT_A_VALUE)
- expect(testComp.getAThroughB()).to.be.equal(COMPONENT_A_VALUE)
- expect(testComp.getFromB()).to.be.equal(COMPONENT_B_VALUE)
-
- })
- })
|