OLD | NEW |
(Empty) | |
| 1 import 'package:scheduled_test/scheduled_test.dart'; |
| 2 import '../../lib/src/entrypoint.dart'; |
| 3 import '../../lib/src/validator.dart'; |
| 4 import '../../lib/src/validator/compiled_dartdoc.dart'; |
| 5 import '../descriptor.dart' as d; |
| 6 import '../test_pub.dart'; |
| 7 import 'utils.dart'; |
| 8 Validator compiledDartdoc(Entrypoint entrypoint) => |
| 9 new CompiledDartdocValidator(entrypoint); |
| 10 main() { |
| 11 initConfig(); |
| 12 group('should consider a package valid if it', () { |
| 13 setUp(d.validPackage.create); |
| 14 integration('looks normal', () => expectNoValidationError(compiledDartdoc)); |
| 15 integration('has most but not all files from compiling dartdoc', () { |
| 16 d.dir( |
| 17 appPath, |
| 18 [ |
| 19 d.dir( |
| 20 "doc-out", |
| 21 [ |
| 22 d.file("nav.json", ""), |
| 23 d.file("index.html", ""), |
| 24 d.file("styles.css", ""), |
| 25 d.file("dart-logo-small.png", "")])]).create(); |
| 26 expectNoValidationError(compiledDartdoc); |
| 27 }); |
| 28 integration('contains compiled dartdoc in a hidden directory', () { |
| 29 ensureGit(); |
| 30 d.dir( |
| 31 appPath, |
| 32 [ |
| 33 d.dir( |
| 34 ".doc-out", |
| 35 [ |
| 36 d.file('nav.json', ''), |
| 37 d.file('index.html', ''), |
| 38 d.file('styles.css', ''), |
| 39 d.file('dart-logo-small.png', ''), |
| 40 d.file('client-live-nav.js', '')])]).create(); |
| 41 expectNoValidationError(compiledDartdoc); |
| 42 }); |
| 43 integration('contains compiled dartdoc in a gitignored directory', () { |
| 44 ensureGit(); |
| 45 d.git( |
| 46 appPath, |
| 47 [ |
| 48 d.dir( |
| 49 "doc-out", |
| 50 [ |
| 51 d.file('nav.json', ''), |
| 52 d.file('index.html', ''), |
| 53 d.file('styles.css', ''), |
| 54 d.file('dart-logo-small.png', ''), |
| 55 d.file('client-live-nav.js', '')]), |
| 56 d.file(".gitignore", "/doc-out")]).create(); |
| 57 expectNoValidationError(compiledDartdoc); |
| 58 }); |
| 59 }); |
| 60 group("should consider a package invalid if it", () { |
| 61 integration('contains compiled dartdoc', () { |
| 62 d.validPackage.create(); |
| 63 d.dir( |
| 64 appPath, |
| 65 [ |
| 66 d.dir( |
| 67 'doc-out', |
| 68 [ |
| 69 d.file('nav.json', ''), |
| 70 d.file('index.html', ''), |
| 71 d.file('styles.css', ''), |
| 72 d.file('dart-logo-small.png', ''), |
| 73 d.file('client-live-nav.js', '')])]).create(); |
| 74 expectValidationWarning(compiledDartdoc); |
| 75 }); |
| 76 integration( |
| 77 'contains compiled dartdoc in a non-gitignored hidden ' 'directory', |
| 78 () { |
| 79 ensureGit(); |
| 80 d.validPackage.create(); |
| 81 d.git( |
| 82 appPath, |
| 83 [ |
| 84 d.dir( |
| 85 '.doc-out', |
| 86 [ |
| 87 d.file('nav.json', ''), |
| 88 d.file('index.html', ''), |
| 89 d.file('styles.css', ''), |
| 90 d.file('dart-logo-small.png', ''), |
| 91 d.file('client-live-nav.js', '')])]).create(); |
| 92 expectValidationWarning(compiledDartdoc); |
| 93 }); |
| 94 }); |
| 95 } |
OLD | NEW |