lkaric/nestjs-twilio

testing

guiaramos opened this issue · 1 comments

How to testing with this module? I am using like this:

  beforeEach(async () => {
    const module: TestingModule = await Test.createTestingModule({
      imports: [
        CacheModule.register(),
        TwilioModule.forRoot({
          accountSid: process.env.TEST_ACCOUNT_SID,
          authToken: process.env.TEST_VERIFICATION_SID,
        }),
      ],
      providers: [
        AuthService,
        AuthResolver,
        AuthConfig,
        CookieService,
        JwtStrategy,
        UserService,
        {
          provide: getModelToken('UserDto'),
          useValue: fakeUsersModel,
        },
      ],
    }).compile();

    service = module.get<AuthService>(AuthService);
  });

I think you can get a lot of useful things in the https://github.com/rejvban/nestjs-twilio/tree/master/lib/__tests__, and it would be much easier if you were to share what would you exactly like to test.