error: Target of URI doesn't exist: 'test/test.dart'.

1,008 views
Skip to first unread message

Andreas Sumerauer

unread,
Nov 8, 2018, 8:44:31 AM11/8/18
to Flutter Dev
Where has the test framework gone?
Answer: it has been renamed to test_api

I had some serious trouble finding that out.
Is there a mailing list or group to observe where these changes are announced?
(I thought that this group would be the one.)
Thanks!

Andreas

Ryan Gonzalez

unread,
Nov 8, 2018, 10:51:27 AM11/8/18
to Andreas Sumerauer, Flutter Dev
Uhh, it's still test... I think now you just need to manually add it to your pubspec's dev_dependencies.

--
Ryan (ライアン)
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
https://refi64.com/

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonah Williams

unread,
Nov 8, 2018, 10:59:09 AM11/8/18
to Ryan Gonzalez, Andreas Sumerauer, Flutter Dev
To use test, you need to add a dependency on package:test 1.5.1. If you're only importing package:flutter_test, then you don't need test.


See: https://github.com/flutter/flutter/wiki/Changelog

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

Andreas Sumerauer

unread,
Nov 9, 2018, 2:28:59 AM11/9/18
to Flutter Dev
I am afraid I stll don't get it.
For the following test to work, how would I have to set up my flutter environment?
(pubspec.yaml, whatever)
Please provide actual code snippets.
Thanks for your patience.

import 'package:test/test.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

void main() {
group('LatLngBounds.isEmpty()', () {
test('empty.', () {
final LatLngBounds bounds = LatLngBounds();
final bool res = bounds.isEmpty();
expect(res, true);
});
test('not empty.', () {
final LatLngBounds bounds = LatLngBounds(
southwest: LatLng(10.0, 20.0),
northeast: LatLng(30.0, 40.0),
);
final bool res = bounds.isEmpty();
expect(res, false);
});
});
}




On Thursday, 8 November 2018 16:59:09 UTC+1, Jonah Williams wrote:
To use test, you need to add a dependency on package:test 1.5.1. If you're only importing package:flutter_test, then you don't need test.


See: https://github.com/flutter/flutter/wiki/Changelog
On Thu, Nov 8, 2018 at 7:51 AM, Ryan Gonzalez <rym...@gmail.com> wrote:
Uhh, it's still test... I think now you just need to manually add it to your pubspec's dev_dependencies.

--
Ryan (ライアン)
Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
https://refi64.com/
On Thu, Nov 8, 2018, 7:44 AM Andreas Sumerauer <sume...@kanzlei-wmv.de wrote:
Where has the test framework gone?
Answer: it has been renamed to test_api

I had some serious trouble finding that out.
Is there a mailing list or group to observe where these changes are announced?
(I thought that this group would be the one.)
Thanks!

Andreas

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

Jonah Williams

unread,
Nov 9, 2018, 2:43:03 AM11/9/18
to Andreas Sumerauer, Flutter Dev
Your pubspec.yaml should contain a dependency on test

```
# normal stuff here
dev_dependencies:
  flutter_test:
    sdk: flutter
  test: ^1.5.1
```

And you'll need to run `flutter packages get` to make sure you pull in the updated version.

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

Andreas Sumerauer

unread,
Nov 9, 2018, 2:52:36 AM11/9/18
to Flutter Dev

That solved it. Had already tried that but for some reason packages get
did not update the ides dart analysis result immediately. So I thought I had it wrong again.
Thanks again!
Reply all
Reply to author
Forward
0 new messages