Refactor imports: use file extension, improve tree shaking, update tests

This commit is contained in:
Alex Gleason
2023-05-12 11:00:14 -05:00
committed by fiatjaf_
parent 9f896479d0
commit 08885ab8da
42 changed files with 244 additions and 212 deletions

View File

@@ -1,10 +1,11 @@
import fetch from 'node-fetch'
import {nip39} from '.'
import {useFetchImplementation, validateGithub} from './nip39.ts'
test('validate github claim', async () => {
nip39.useFetchImplementation(fetch)
useFetchImplementation(fetch)
let result = await nip39.validateGithub(
let result = await validateGithub(
'npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z',
'vitorpamplona',
'cf19e2d1d7f8dac6348ad37b35ec8421'