OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import 'package:scheduled_test/scheduled_test.dart'; |
| 3 import '../../descriptor.dart' as d; |
| 4 import '../../test_pub.dart'; |
| 5 import '../utils.dart'; |
| 6 main() { |
| 7 initConfig(); |
| 8 integration( |
| 9 "binds a directory to a new port and immediately requests an " |
| 10 "asset URL from that server", |
| 11 () { |
| 12 d.dir( |
| 13 appPath, |
| 14 [ |
| 15 d.appPubspec(), |
| 16 d.dir("test", [d.file("index.html", "<test body>")]), |
| 17 d.dir("web", [d.file("index.html", "<body>")])]).create(); |
| 18 pubServe(args: ["web"]); |
| 19 expect(webSocketRequest("serveDirectory", { |
| 20 "path": "test" |
| 21 }), completes); |
| 22 expectWebSocketResult("pathToUrls", { |
| 23 "path": "test/index.html" |
| 24 }, { |
| 25 "urls": [endsWith("/index.html")] |
| 26 }); |
| 27 endPubServe(); |
| 28 }); |
| 29 } |
OLD | NEW |