mirror of
https://github.com/aljazceru/pubky-core.git
synced 2025-12-31 04:44:37 +01:00
27 lines
494 B
JavaScript
27 lines
494 B
JavaScript
import test from 'tape'
|
|
|
|
import { Client, Keypair, PublicKey } from '../index.cjs'
|
|
|
|
const TLD = '8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo';
|
|
|
|
// TODO: test HTTPs too somehow.
|
|
|
|
test.only("basic fetch", async (t) => {
|
|
let client = Client.testnet();
|
|
|
|
// Normal TLD
|
|
{
|
|
|
|
let response = await client.fetch(`http://relay.pkarr.org/`);
|
|
|
|
t.equal(response.status, 200);
|
|
}
|
|
|
|
|
|
// Pubky
|
|
let response = await client.fetch(`http://${TLD}/`);
|
|
|
|
t.equal(response.status, 200);
|
|
})
|
|
|