Fix security check and remove obsolete tests
- Update security check to ignore environment variable references - Remove tests for Lambda and DynamoDB that no longer exist - Update tests to check for API service usage - Fix Amplify build failure
This commit is contained in:
@@ -13,17 +13,17 @@ describe('No Mock Data Tests', () => {
|
||||
|
||||
expect(pageContent).not.toContain('data.json');
|
||||
expect(pageContent).not.toContain("'/data.json'");
|
||||
expect(pageContent).toContain('API URL not configured');
|
||||
expect(pageContent).toContain('filamentService');
|
||||
});
|
||||
|
||||
it('should use NEXT_PUBLIC_API_URL in all components', () => {
|
||||
it('should use API service in all components', () => {
|
||||
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
||||
const adminPath = join(process.cwd(), 'app', 'upadaj', 'dashboard', 'page.tsx');
|
||||
|
||||
const pageContent = readFileSync(pagePath, 'utf-8');
|
||||
const adminContent = readFileSync(adminPath, 'utf-8');
|
||||
|
||||
expect(pageContent).toContain('process.env.NEXT_PUBLIC_API_URL');
|
||||
expect(adminContent).toContain('process.env.NEXT_PUBLIC_API_URL');
|
||||
expect(pageContent).toContain('filamentService');
|
||||
expect(adminContent).toContain('filamentService');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user