import { Injector } from '../../src/Injector' import { TestComponent } from './TestComponent' import { expect } from 'chai'; import { COMPONENT_A_VALUE, COMPONENT_B_VALUE, COMPONENT_C_VALUE } from '../CONSTANTS'; var should = require('chai').should(); var chai = require("chai"); var chaiAsPromised = require("chai-as-promised"); chai.use(chaiAsPromised); describe('BasicTest', () => { 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) expect(testComp.getFromC()).to.be.equal(COMPONENT_C_VALUE) }) })