mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-23 17:13:54 +08:00
30 lines
624 B
Dart
30 lines
624 B
Dart
/*
|
|
* SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
import 'package:test/test.dart';
|
|
|
|
import 'package:gitjournal/core/processors/image_extractor.dart';
|
|
import '../lib.dart';
|
|
|
|
void main() {
|
|
setUpAll(gjSetupAllTests);
|
|
|
|
test('Should parse simple tags', () {
|
|
var body = """#hello Hi
|
|

|
|

|
|
""";
|
|
|
|
var p = ImageExtractor();
|
|
var images = p.extract(body);
|
|
|
|
expect(images, {
|
|
const NoteImage(alt: 'alt', url: '../final.img'),
|
|
const NoteImage(alt: 'alt2', url: '../final2.img'),
|
|
});
|
|
});
|
|
}
|