forked from firka/flutter
Place existing dill into hot reload temp directory to boost initialization time (#40366)
This commit is contained in:
@@ -35,6 +35,9 @@ void main() {
|
||||
|
||||
setUp(() {
|
||||
testbed = Testbed(setup: () {
|
||||
fs.file(fs.path.join('build', 'app.dill'))
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('ABC');
|
||||
residentRunner = HotRunner(
|
||||
<FlutterDevice>[
|
||||
mockFlutterDevice,
|
||||
@@ -193,6 +196,10 @@ void main() {
|
||||
Usage: () => MockUsage(),
|
||||
}));
|
||||
|
||||
test('ResidentRunner copies dill file from build output into temp directory', () => testbed.run(() async {
|
||||
expect(residentRunner.artifactDirectory.childFile('app.dill').readAsStringSync(), 'ABC');
|
||||
}));
|
||||
|
||||
test('ResidentRunner can send target platform to analytics from hot reload', () => testbed.run(() async {
|
||||
when(mockDevice.sdkNameAndVersion).thenAnswer((Invocation invocation) async {
|
||||
return 'Example';
|
||||
|
||||
Reference in New Issue
Block a user