OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub_tests; | |
6 | |
7 import 'package:json_rpc_2/error_code.dart' as rpc_error_code; | 5 import 'package:json_rpc_2/error_code.dart' as rpc_error_code; |
8 import 'package:path/path.dart' as p; | 6 import 'package:path/path.dart' as p; |
9 | 7 |
10 import '../../descriptor.dart' as d; | 8 import '../../descriptor.dart' as d; |
11 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
12 import '../utils.dart'; | 10 import '../utils.dart'; |
13 | 11 |
14 main() { | 12 main() { |
15 // TODO(rnystrom): Split into independent tests. | 13 // TODO(rnystrom): Split into independent tests. |
16 integration("pathToUrls errors on bad inputs", () { | 14 integration("pathToUrls errors on bad inputs", () { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 expectNotServed(p.join("..", "foo", "web", "foo.txt")); | 51 expectNotServed(p.join("..", "foo", "web", "foo.txt")); |
54 | 52 |
55 endPubServe(); | 53 endPubServe(); |
56 }); | 54 }); |
57 } | 55 } |
58 | 56 |
59 void expectNotServed(String path) { | 57 void expectNotServed(String path) { |
60 expectWebSocketError("pathToUrls", {"path": path}, NOT_SERVED, | 58 expectWebSocketError("pathToUrls", {"path": path}, NOT_SERVED, |
61 'Asset path "$path" is not currently being served.'); | 59 'Asset path "$path" is not currently being served.'); |
62 } | 60 } |
OLD | NEW |