ready for primetime
This commit is contained in:
24
test/test.ts
24
test/test.ts
@@ -0,0 +1,24 @@
|
||||
import "typings-test";
|
||||
import * as path from "path";
|
||||
import "should";
|
||||
import {Qenv} from "../dist/index";
|
||||
|
||||
process.cwd = () => {
|
||||
return path.join(__dirname,"./assets/");
|
||||
}
|
||||
|
||||
process.env["key1"] = "original"
|
||||
|
||||
let qenvTestObject:Qenv;
|
||||
describe("Qenv class",function(){
|
||||
it("should create a new class",function(){
|
||||
qenvTestObject = new Qenv(process.cwd(),process.cwd());
|
||||
});
|
||||
it("key1 should be not be overwritten since it is already present",function(){
|
||||
process.env.key1.should.equal("original");
|
||||
});
|
||||
it("key2 should be read from Yml",function(){
|
||||
process.env.key2.should.equal("fromYml");
|
||||
})
|
||||
|
||||
});
|
Reference in New Issue
Block a user