代码拉取完成,页面将自动刷新
同步操作将从 rsuite/rsuite 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/* eslint-disable @typescript-eslint/no-var-requires */
/**
* Run all tests: `npm run tdd`
* Run all styles tests: `M=styles npm run tdd`
* Run a component test: `M=Button npm run tdd`
* Run a test of a file: `src/Picker/test/PickerToggleSpec.js npm run tdd`
*/
const path = require('path');
const webpack = require('webpack');
const webpackConfig = {
output: {
pathinfo: true
},
mode: 'development',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
alias: {
'@test': path.resolve(__dirname, './test')
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
RUN_ENV: JSON.stringify(process.env.RUN_ENV)
}
})
],
module: {
rules: [
{
test: [/\.tsx?$/, /\.jsx?$/],
use: ['babel-loader?babelrc'],
exclude: /node_modules/
},
{
test: /\.(less|css)$/,
use: [
{
loader: 'style-loader' // creates style nodes from JS strings
},
{
loader: 'css-loader' // translates CSS into CommonJS
},
{
loader: 'less-loader', // compiles Less to CSS,
options: {
javascriptEnabled: true
}
}
]
}
]
}
};
module.exports = config => {
const { env } = process;
const { M, F } = env;
let testFile = 'test/index.js';
if (M) {
testFile = `src/${M}/test/*.js`;
} else if (F) {
testFile = F;
}
config.set({
basePath: '',
files: [testFile],
frameworks: ['mocha', 'sinon-chai'],
colors: true,
reporters: ['mocha', 'coverage'],
logLevel: config.LOG_INFO,
preprocessors: {
'test/*.js': ['webpack'],
'src/**/*.js': ['webpack']
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
browsers: env.BROWSER ? env.BROWSER.split(',') : ['Chrome'],
customLaunchers: {
ChromeCi: {
base: 'Chrome',
flags: ['--no-sandbox']
},
FirefoxAutoAllowGUM: {
base: 'Firefox',
prefs: {
'media.navigator.permission.disabled': true
}
}
},
coverageReporter: {
dir: 'coverage',
reporters: [
{ type: 'html' },
{ type: 'lcov', subdir: 'lcov' } // lcov
]
}
});
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。