Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

generated-constants.test.ts 865 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  1. import { readFileSync } from 'fs';
  2. import { join } from 'path';
  3. describe('generated-constants.ts', () => {
  4. const EXPECTED_CONTENT = `// This file is a placeholder for development.
  5. // During build, it gets overwritten with the actual PostHog key.
  6. // DO NOT edit this file manually - changes will be lost during build.
  7. export const POSTHOG_KEY = process.env.PROMPTFOO_POSTHOG_KEY || '';
  8. `;
  9. it('should remain unchanged from the placeholder version', () => {
  10. const filePath = join(process.cwd(), 'src', 'generated-constants.ts');
  11. const actualContent = readFileSync(filePath, 'utf-8');
  12. // Normalize line endings for cross-platform compatibility
  13. const normalizedActual = actualContent.replace(/\r\n/g, '\n');
  14. const normalizedExpected = EXPECTED_CONTENT.replace(/\r\n/g, '\n');
  15. expect(normalizedActual).toBe(normalizedExpected);
  16. });
  17. });
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...