fix(core): update
This commit is contained in:
25
test/test.ts
25
test/test.ts
@ -1,8 +1,21 @@
|
||||
import { expect, tap } from 'tapbundle'
|
||||
import * as ppal from '../ts/index'
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as paypal from '../ts/index';
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(ppal.standardExport)
|
||||
})
|
||||
import { Qenv } from '@pushrocks/qenv';
|
||||
const testQenv = new Qenv('./', './.nogit/');
|
||||
|
||||
tap.start()
|
||||
let testPayPalInstance: paypal.PayPal;
|
||||
|
||||
tap.test('should create a valid paypal instance', async () => {
|
||||
testPayPalInstance = new paypal.PayPal({
|
||||
clientId: testQenv.getEnvVarOnDemand('PAYPAL_CLIENT_ID'),
|
||||
clientSecret: testQenv.getEnvVarOnDemand('PAYPAL_CLIENT_SECRET'),
|
||||
});
|
||||
expect(testPayPalInstance).to.be.instanceOf(paypal.PayPal);
|
||||
});
|
||||
|
||||
tap.test('should get an access token', async () => {
|
||||
await testPayPalInstance.request();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user