1 | import {IFileFactory, RootFileFactory} from "../src/classLibrary/RootFileFactory";
|
2 | import * as path from 'path';
|
3 | import {should} from 'chai';
|
4 | import {Core, Kore} from "@kirinnee/core";
|
5 |
|
6 | should();
|
7 | let core: Core = new Kore();
|
8 | core.ExtendPrimitives();
|
9 |
|
10 | let from = '../target/InlineFlagResolver/testDir/';
|
11 | let to = '../target/InlineFlagResolver/newDir/';
|
12 | let fileFactory: IFileFactory = new RootFileFactory(core, __dirname, from, to);
|
13 |
|
14 | describe("RootFileFactory", () => {
|
15 | describe("FromRoot", () => {
|
16 | it("should return the absolute path to the from folder", () => {
|
17 | let expected = path.resolve(__dirname, from);
|
18 | fileFactory.FromRoot.should.equal(expected);
|
19 | });
|
20 | });
|
21 | describe("ToRoot", () => {
|
22 | it("should return the absolute path tot the to folder", () => {
|
23 | let expected = path.resolve(__dirname, to);
|
24 | fileFactory.ToRoot.should.equal(expected);
|
25 |
|
26 | });
|
27 | });
|
28 | });
|