driver.js
511 Bytes
const axios = require('axios');
const caseLayout = require('./case-layout');
const {iosCaps, androidCaps, serverConfig, port} = require('../config.json');
const cases = [];
axios.defaults.baseURL = `http://127.0.0.1:${port}/`;
axios.defaults.responseType = 'json';
module.exports.describe = (scene, title, driverFn) => {
const caps = global.TEST_PLATFORM === 'ios' ? iosCaps : androidCaps;
cases.push({
scene,
title,
driverFn,
caps,
serverConfig
});
}
module.exports.cases = cases;