fix(core): update

This commit is contained in:
2020-09-19 15:18:28 +00:00
parent dc9bb6a4a7
commit cf7e064074
6 changed files with 67 additions and 19 deletions

32
test/test.browser.ts Normal file
View File

@ -0,0 +1,32 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as webclient from '../ts/index';
let testClient: webclient.CsWebclient;
tap.test('should create an instance of webclient', async () => {
testClient = new webclient.CsWebclient();
expect(testClient).to.be.instanceOf(webclient.CsWebclient);
});
tap.test('should return false when asked for present settings', async () => {
const result = await testClient.isCookieLevelSet();
expect(result).to.be.false;
});
tap.test('should create a cookielevel setting', async () => {
await testClient.setCookieLevels(['functional']);
const result = await testClient.getCookieLevels();
expect(result).to.contain('functional');
});
tap.test('should return true when asked for present settings', async () => {
const result = await testClient.isCookieLevelSet();
expect(result).to.be.true;
});
tap.test('should validity for present settings', async () => {
const result = await testClient.isCookieLevelStillValid();
expect(result).to.be.true;
});
tap.start();

View File

@ -1,8 +0,0 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as webclient from '../ts/index';
tap.test('first test', async () => {
console.log(webclient.standardExport);
});
tap.start();