fix(core): update
This commit is contained in:
		
							
								
								
									
										25
									
								
								test/test.ts
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								test/test.ts
									
									
									
									
									
								
							| @@ -1,8 +1,31 @@ | ||||
| import { expect, tap } from '@pushrocks/tapbundle'; | ||||
| import { Qenv } from '@pushrocks/qenv'; | ||||
| import * as smartmail from '@pushrocks/smartmail'; | ||||
|  | ||||
| const testQenv = new Qenv('./', './.nogit'); | ||||
|  | ||||
| import * as mailgun from '../ts/index'; | ||||
|  | ||||
|  | ||||
| let testMailgunAccount: mailgun.MailgunAccount; | ||||
| let testSmartmail: smartmail.Smartmail; | ||||
|  | ||||
| tap.test('first test', async () => { | ||||
|   console.log(mailgun.standardExport); | ||||
|   testMailgunAccount = new mailgun.MailgunAccount(testQenv.getEnvVarOnDemand('MAILGUN_API_TOKEN')); | ||||
|   expect(testMailgunAccount).to.be.instanceOf(mailgun.MailgunAccount); | ||||
| }); | ||||
|  | ||||
| tap.test('should create a smartmail', async () => { | ||||
|   testSmartmail = new smartmail.Smartmail({ | ||||
|     body: 'hi there. This is the body.', | ||||
|     from: 'noreply@mail.lossless.com', | ||||
|     subject: 'hi there. This is the subject' | ||||
|   }); | ||||
|   return testSmartmail; | ||||
| }); | ||||
|  | ||||
| tap.test('should send a smartmail', async () => { | ||||
|   testMailgunAccount.sendSmartMail(testSmartmail, 'phil@lossless.com'); | ||||
| }); | ||||
|  | ||||
| tap.start(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user