UNPKG

auth0-event-exporter

Version:

A Node.js module for making authenticated API calls using Auth0 Machine-to-Machine JWT tokens

22 lines (19 loc) 723 B
import { WebDataExporter, WebDataExporterConfig } from './index'; describe('WebDataExporter', () => { test('should throw error for missing config', () => { expect(() => { new WebDataExporter({} as WebDataExporterConfig); }).toThrow('Missing required configuration'); }); test('should create instance with valid config', () => { const config: WebDataExporterConfig = { auth0Domain: 'test.auth0.com', auth0ClientId: 'test-client-id', auth0ClientSecret: 'test-client-secret', auth0Audience: 'https://test-api', apiBaseUrl: 'https://api.example.com' }; const client = new WebDataExporter(config); expect(client).toBeInstanceOf(WebDataExporter); }); });