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("uses appropriate mime types", () { |
| 9 d.dir( |
| 10 appPath, |
| 11 [ |
| 12 d.appPubspec(), |
| 13 d.dir( |
| 14 "web", |
| 15 [ |
| 16 d.file("index.html", "<body>"), |
| 17 d.file("file.dart", "main() => print('hello');"), |
| 18 d.file("file.js", "console.log('hello');"), |
| 19 d.file("file.css", "body {color: blue}")])]).create(); |
| 20 pubServe(); |
| 21 requestShouldSucceed( |
| 22 "index.html", |
| 23 anything, |
| 24 headers: containsPair('content-type', 'text/html')); |
| 25 requestShouldSucceed( |
| 26 "file.dart", |
| 27 anything, |
| 28 headers: containsPair('content-type', 'application/dart')); |
| 29 requestShouldSucceed( |
| 30 "file.js", |
| 31 anything, |
| 32 headers: containsPair('content-type', 'application/javascript')); |
| 33 requestShouldSucceed( |
| 34 "file.css", |
| 35 anything, |
| 36 headers: containsPair('content-type', 'text/css')); |
| 37 endPubServe(); |
| 38 }); |
| 39 } |
OLD | NEW |