fix(config): release 构建自动使用生产环境
This commit is contained in:
1 parent
8ec6df2be5
commit
a3ac007759
2 files changed
+23
-5
No files matched your search
@@ -0,0 +1,18 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
// 应用环境选择测试。
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:fruitshorts/core/config/app_config.dart';
|
||||
import 'package:fruitshorts/core/config/dev_config.dart';
|
||||
import 'package:fruitshorts/core/config/prod_config.dart';
|
||||
|
||||
void main() {
|
||||
test('should_use_environment_matching_build_mode', () {
|
||||
expect(AppConfig.useDevConfig, !kReleaseMode);
|
||||
expect(
|
||||
AppConfig.baseUrl,
|
||||
kReleaseMode ? ProdConfig.baseUrl : DevConfig.baseUrl,
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user