Skip to content

Commit

Permalink
import globals (fixes tsc)
Browse files Browse the repository at this point in the history
  • Loading branch information
Egge21M committed Nov 26, 2024
1 parent 1e04953 commit a1e2d9f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/WSConnection.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WSConnection } from '../src/WSConnection';
import { Client, Server, WebSocket } from 'mock-socket';
import { injectWebSocketImpl } from '../src/ws';
import { vi } from 'vitest';
import { vi, test, describe, expect } from 'vitest';

injectWebSocketImpl(WebSocket);

Expand Down
1 change: 1 addition & 0 deletions test/base64.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
encodeJsonToBase64,
encodeUint8toBase64
} from '../src/base64.js';
import { test, describe, expect } from 'vitest';
describe('testing uint8 encoding', () => {
test('uint8 to base64', async () => {
const message = 'test';
Expand Down
1 change: 1 addition & 0 deletions test/cbor.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { decodeCBOR, encodeCBOR } from '../src/cbor';
import { bytesToHex, hexToBytes } from '@noble/curves/abstract/utils';
import { test, describe, expect } from 'vitest';

const tests = [
{
Expand Down
1 change: 1 addition & 0 deletions test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { CashuMint } from '../src/CashuMint.js';
import { CashuWallet } from '../src/CashuWallet.js';

import dns from 'node:dns';
import { test, describe, expect } from 'vitest';
import { vi } from 'vitest';
import { secp256k1 } from '@noble/curves/secp256k1';
import { bytesToHex } from '@noble/curves/abstract/utils';
Expand Down
7 changes: 1 addition & 6 deletions test/paymentRequests.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import nock from 'nock';
import { CashuMint } from '../src/CashuMint.js';
import { CashuWallet } from '../src/CashuWallet.js';
import { setGlobalRequestOptions } from '../src/request.js';
import { MeltQuoteResponse } from '../src/model/types/index.js';
import { test, describe, expect } from 'vitest';
import {
decodePaymentRequest,
PaymentRequest,
PaymentRequestPayload,
PaymentRequestTransport,
PaymentRequestTransportType
} from '../src/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/request.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import nock from 'nock';
import { beforeAll, beforeEach, test, describe, expect } from 'vitest';
import { CashuMint } from '../src/CashuMint.js';
import { CashuWallet } from '../src/CashuWallet.js';
import { setGlobalRequestOptions } from '../src/request.js';
Expand Down
1 change: 1 addition & 0 deletions test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
constructProofFromPromise,
serializeProof
} from '@cashu/crypto/modules/client';
import { test, describe, expect } from 'vitest';
import { Keys, Proof } from '../src/model/types/index.js';
import * as utils from '../src/utils.js';
import { PUBKEYS } from './consts.js';
Expand Down
2 changes: 1 addition & 1 deletion test/wallet.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nock from 'nock';
import { setupServer } from 'msw/node';
import { HttpResponse, http } from 'msw';
import { beforeAll, beforeEach, afterAll, afterEach, test, describe, expect } from 'vitest';

import { CashuMint } from '../src/CashuMint.js';
import { CashuWallet } from '../src/CashuWallet.js';
Expand Down

0 comments on commit a1e2d9f

Please sign in to comment.