message: test validate project name
diff: @@ -2,39 +2,50 @@ jest.mock('./validations');
  import { validateProjectName } from "./projectName";
  import { IprojectNameValidationConfig } from "../../reducers/wizardSelectionReducers/setValidations";
  import { IVSCodeObject } from "../../reducers/vscodeApiReducer";
  -import { addRequiredValidate, addExistingProjectNameValidate, addRegexValidate } from './validations';
  +import { addRequiredValidate, addExistingProjectNameValidate, addRegexValidate,
  + addReservedNameValidate } from './validations';
  +import { resolve } from "url";
  describe("validate", () => {
  - let validations:IprojectNameValidationConfig;
  +
  let mockVsCode:IVSCodeObject;
  beforeEach(()=>{
  - validations = {
  +
  + });
  +
  + describe("require", () => {
  + it("config validate",(resolve)=>{
  + let validations:IprojectNameValidationConfig = {
  regexs:[],
  reservedNames:[],
  validateEmptyNames:false,
  validateExistingNames:false
  }
  - });
  -
  - describe("require", () => {
  - it("config validate",()=>{
  - validateProjectName("dfgfd","sdfsdf",validations,mockVsCode);
  + validateProjectName("dfgfd","sdfsdf",validations,mockVsCode).then(()=>{
  expect(addRequiredValidate).toHaveBeenCalledTimes(0);
  expect(addExistingProjectNameValidate).toHaveBeenCalledTimes(0);
  expect(addRegexValidate).toHaveBeenCalledTimes(0);
  + expect(addReservedNameValidate).toHaveBeenCalledTimes(0);
  + resolve();
  + });
  +
  });
  it("config no validate",()=>{
  - validations.validateEmptyNames = true;
  - validations.validateExistingNames = true;
  - validations.regexs.push({
  + let validations:IprojectNameValidationConfig = {
  + regexs:[{
  "name" : "projectStartWith$",
  "pattern" : "^[^\\$]"
  - });
  - validateProjectName("dfg","sdfsdf",validations,mockVsCode);
  + }],
  + reservedNames:["111"],
  + validateEmptyNames:true,
  + validateExistingNames:true
  + }
  + validateProjectName("dfg","sdfsdf",validations,mockVsCode)
  expect(addRequiredValidate).toHaveBeenCalled();
  expect(addExistingProjectNameValidate).toHaveBeenCalled();
  //expect(addRegexValidate).toHaveBeenCalled();
  + //expect(addReservedNameValidate).toHaveBeenCalled();
  });
  });
  });
  \ No newline at end of file
  