| 42 | // developer's time. This is why we should not rely on such global objects |
| 43 | // if possible. |
| 44 | function clearPromptInjection(position: string): void { |
| 45 | if (!prompt || !prompt._injected) return |
| 46 | |
| 47 | const count = prompt._injected.length |
| 48 | if (!count) return |
| 49 | |
| 50 | process.stdout.write( |
| 51 | `WARNING: Clearing ${count} prompt injection(s) ${position} test case\n: ${prompt._injected.join(', ')}`, |
| 52 | ) |
| 53 | |
| 54 | prompt._injected.splice(0, count) |
| 55 | } |
| 56 | |
| 57 | describe('prisma.config.ts', () => { |
| 58 | it('should require a datasource in the config', async () => { |