fix(core): update

This commit is contained in:
2022-08-01 18:02:06 +02:00
parent 1e90ec38e4
commit 14616a8cc8
6 changed files with 13597 additions and 8616 deletions

View File

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