feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
const { spawn } = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
const PLAYWRIGHT_CONFIG = path.join(__dirname, '../../playwright.miniprogram.config.ts');
|
||||
|
||||
function runTests() {
|
||||
console.log('Starting mini program tests...');
|
||||
console.log(`Using Playwright config: ${PLAYWRIGHT_CONFIG}`);
|
||||
|
||||
const playwright = spawn('npx', ['playwright', 'test', '--config', PLAYWRIGHT_CONFIG], {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
});
|
||||
|
||||
playwright.on('close', (code) => {
|
||||
if (code === 0) {
|
||||
console.log('Mini program tests passed!');
|
||||
process.exit(0);
|
||||
} else {
|
||||
console.error(`Mini program tests failed with code ${code}`);
|
||||
process.exit(code);
|
||||
}
|
||||
});
|
||||
|
||||
playwright.on('error', (error) => {
|
||||
console.error('Failed to start Playwright:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
runTests();
|
||||
}
|
||||
|
||||
module.exports = { runTests };
|
||||
Reference in New Issue
Block a user