update changes
This commit is contained in:
47
test/test.ts
47
test/test.ts
@@ -1,25 +1,30 @@
|
||||
import "typings-test";
|
||||
import path = require("path");
|
||||
import "should";
|
||||
import 'typings-test'
|
||||
import path = require('path')
|
||||
import * as should from 'should'
|
||||
|
||||
import npmExtra = require("../dist/index");
|
||||
|
||||
describe("npmextra",function(){
|
||||
it("should read a config file",function(){
|
||||
|
||||
import npmExtra = require('../dist/index')
|
||||
|
||||
describe('npmextra',function(){
|
||||
it('should state wether a npmextra.json exists', function() {
|
||||
should(npmExtra.configFilePresent('./test/')).be.true()
|
||||
})
|
||||
it('should read a config file',function(){
|
||||
let testData = npmExtra.dataFor({
|
||||
toolName:"testTool",
|
||||
defaultSettings:{someKey2:"someValue2"},
|
||||
cwd: path.join(process.cwd(),"test/")
|
||||
});
|
||||
testData.should.have.ownProperty("someKey2");
|
||||
});
|
||||
it("should read a config file",function(){
|
||||
toolName: 'testTool',
|
||||
defaultSettings: {someKey2: 'someValue2'},
|
||||
cwd: path.join(process.cwd(),'./test/')
|
||||
})
|
||||
should(testData).have.ownProperty('someKey2')
|
||||
})
|
||||
it('should read a config file',function(){
|
||||
let testData = npmExtra.dataFor({
|
||||
toolName:"testTool",
|
||||
defaultSettings:{someKey2:"someValue2"},
|
||||
cwd: path.join(process.cwd(),"test/")
|
||||
});
|
||||
testData.should.have.ownProperty("someKey2");
|
||||
testData.testValue.should.equal(2);
|
||||
});
|
||||
});
|
||||
toolName: 'testTool',
|
||||
defaultSettings: {someKey2: 'someValue2'},
|
||||
cwd: path.join(process.cwd(),'test/')
|
||||
})
|
||||
should(testData).have.ownProperty('someKey2')
|
||||
should(testData.testValue).equal(2)
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user