Skip to content

Commit

Permalink
files non blossom test
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Jan 20, 2025
1 parent b037488 commit cb81927
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/ndk/example/files/files_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:ndk/ndk.dart';
import 'package:test/test.dart';

void main() async {
test('download test', () async {
test('download test - blossom', () async {
final ndk = Ndk.defaultConfig();

final downloadResult = await ndk.files.download(
Expand All @@ -16,4 +16,16 @@ void main() async {

expect(downloadResult.data.length, greaterThan(0));
});

test('download test - non blossom', () async {
final ndk = Ndk.defaultConfig();

final downloadResult = await ndk.files
.download(url: "https://camelus.app/.well-known/nostr.json");

print(
"file of type: ${downloadResult.mimeType}, size: ${downloadResult.data.length}");

expect(downloadResult.data.length, greaterThan(0));
});
}

0 comments on commit cb81927

Please sign in to comment.