BREAKING CHANGE(core): switch to esm and allow specification of redirect url

This commit is contained in:
2022-04-18 18:54:53 +02:00
parent bdd7419d3d
commit dca6f9ef0b
10 changed files with 5562 additions and 13937 deletions

View File

@ -3,7 +3,7 @@ import * as qenv from '@pushrocks/qenv';
const testQenv = new qenv.Qenv('./', './.nogit/');
import * as tink from '../ts/index';
import * as tink from '../ts/index.js';
let tinkTestAccount: tink.TinkAccount;
@ -20,18 +20,17 @@ tap.test('should report tink as healthy', async () => {
});
tap.test('should create a valid request', async (toolsArg) => {
const tinkuser: tink.TinkUser = await tinkTestAccount.getTinkUser("user_1234_abc");
const tinkuser: tink.TinkUser = await tinkTestAccount.getTinkUser('user_1234_abc');
console.log(tinkuser);
console.log(await tinkuser.getTinkLinkForMarket()); // defaults to 'DE';
console.log(await tinkuser.getProviderConsents())
console.log(await tinkuser.getProviderConsents());
await toolsArg.delayFor(10000);
})
});
tap.test('should delete existing users', async () => {
process.exit(0);
expect(tinkTestAccount).toBeInstanceOf(tink.TinkAccount);
const tinkUser = new tink.TinkUser(tinkTestAccount, null, 'user_1234_abc');
await tinkUser.delete();
})
});
tap.start();