'use strict'
-const expect = require('chai').expect
-const { wallet, block, tools, box } = require('../dist/index')
+const { expect } = await import('chai')
+const { wallet, block, tools, box } = await import('../dist/index.js')
// WARNING: Do not send any funds to the test vectors below
-describe('generate wallet test', () => {
+describe('generate wallet test', function () {
+ this.slow(0)
it('should generate wallet with random entropy', () => {
const result = wallet.generate()
})
// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere
-describe('import wallet with test vectors test', () => {
+describe('import wallet with test vectors test', function () {
+ this.slow(0)
it('should successfully import a wallet with the official Nano test vectors mnemonic', () => {
const result = wallet.fromMnemonic(
})
-describe('derive more accounts from the same seed test', () => {
+describe('derive more accounts from the same seed test', function () {
+ this.slow(0)
it('should derive accounts from the given seed', () => {
const result = wallet.accounts(
})
// Test vectors from https://docs.nano.org/integration-guides/key-management/
-describe('block signing tests using official test vectors', () => {
+describe('block signing tests using official test vectors', function () {
+ this.slow(0)
it('should create a valid signature for a receive block', () => {
const work = 'c5cf86de24b24419'
})
-describe('unit conversion tests', () => {
+describe('unit conversion tests', function () {
+ this.slow(0)
it('should convert nano to raw', () => {
const result = tools.convert('1', 'NANO', 'RAW')
})
-describe('Signer tests', () => {
+describe('Signer tests', function () {
+ this.slow(0)
before(() => {
this.testWallet = wallet.generate()
})
-describe('Box tests', () => {
+describe('Box tests', function () {
+ this.slow(0)
before(() => {
this.message = 'The quick brown fox jumps over the lazy dog 🔥'
expect(() => box.decrypt(encrypted, this.bob.accounts[0].address, aliceAccounts[0].privateKey)).to.throw()
})
-})
\ No newline at end of file
+})