#How to allow self signed certificates in integration tests that use HttpModule
2 messages · Page 1 of 1 (latest)
HttpModule is just a wrapper around the axios package, and its module registration options are pretty much the same
so I'm assuming you can overwrite the HTTPS agent like this while registering the module
import { Agent } from 'https';
const module: TestingModule = await Test.createTestingModule({
imports: [
HttpModule.register({
httpsAgent: new Agent({
rejectUnauthorized: false,
}),
}),
],
providers: [TestService],
}).compile();