var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _taskRnvPlatform=_interopRequireDefault(require("../task.rnv.platform.list"));
var _taskRnvPlatform2=_interopRequireDefault(require("../task.rnv.platform.configure"));
var _taskRnvPlatform3=_interopRequireDefault(require("../task.rnv.platform.eject"));
var _taskRnvPlatform4=_interopRequireDefault(require("../task.rnv.platform.setup"));
var _configParser=require("../../core/configManager/configParser");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}

jest.mock('fs');

jest.mock("../../core/engineManager/index.js",function(){return{
executeTask:jest.fn()};});


jest.mock("../../core/configManager/config.js",function(){return{


getConfig:function getConfig(){
console.log('FFOFOFFO',new Error());
return null;
}};});




jest.mock("../../core/systemManager/logger.js",function(){
var _chalkCols={
white:function white(v){return v;},
green:function green(v){return v;},
red:function red(v){return v;},
yellow:function yellow(v){return v;},
default:function _default(v){return v;},
gray:function gray(v){return v;},
grey:function grey(v){return v;},
blue:function blue(v){return v;},
cyan:function cyan(v){return v;},
magenta:function magenta(v){return v;}};

_chalkCols.rgb=function(){return function(v){return v;};};
_chalkCols.bold=_chalkCols;
var _chalkMono=_objectSpread({},
_chalkCols);

return{
logToSummary:jest.fn(),
logTask:jest.fn(),
logDebug:jest.fn(),
chalk:function chalk(){return _chalkMono;}};

});

var c={
runtime:{
supportedPlatforms:[
{
engine:'engine-rn',
platform:'ios',
isConnected:true,
port:'0000',
isValid:true}]},



platform:'ios',
program:{
ci:false},

buildConfig:{
platforms:{
ios:{}}},




paths:{
rnv:{
pluginTemplates:{
configs:{}},

platformTemplates:{},
projectTemplates:{},
platformTemplate:{},
plugins:{},
engines:{},
projectTemplate:{}},

workspace:{
project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{},
appConfigsDirs:[],
appConfigsDirNames:[]},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]}},


defaultWorkspace:{
project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{},
appConfigsDirs:[],
appConfigsDirNames:[]},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]}},


project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{},
appConfigsDirs:[],
appConfigsDirNames:[]},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]},


GLOBAL_RNV_DIR:'',
buildHooks:{
dist:{}},

home:{},
template:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{}}},


files:{
rnv:{
pluginTemplates:{},
platformTemplates:{},
projectTemplates:{},
platformTemplate:{},
plugins:{},
engines:{},
projectTemplate:{}},

workspace:{
project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{}},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]}},


defaultWorkspace:{
project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{}},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]}},


project:{
appConfigBase:{},
builds:{},
assets:{},
platformTemplates:{}},

appConfig:{
configs:[],
configsPrivate:[],
configsLocal:[]}}};




var parentTask=null;
var originTask={};

beforeEach(function(){

});

afterEach(function(){

});

test('Execute task.rnv.platform.list',function _callee(){var engineManager;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:
engineManager=require("../../core/engineManager/index.js");_context.next=3;return _regenerator.default.awrap(
expect(_taskRnvPlatform.default.fn(c,null,originTask)).resolves.toEqual(true));case 3:
expect(engineManager.executeTask).toHaveBeenCalledWith(c,'project configure','platform list',originTask);case 4:case"end":return _context.stop();}}},null,null,null,Promise);});


test('Execute task.rnv.platform.configure',function _callee2(){var engineManager;return _regenerator.default.async(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:
engineManager=require("../../core/engineManager/index.js");_context2.next=3;return _regenerator.default.awrap(
_taskRnvPlatform2.default.fn(c,null,originTask));case 3:case"end":return _context2.stop();}}},null,null,null,Promise);});
//# sourceMappingURL=tasks.spec.js.map