Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove changes to tests related to PR #252 #292

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions modules/cmpapi/test/CmpApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ describe('CmpApi', (): void => {

});

const runContructionFail = (cmpId: any, cmpVersion: any, tcfPolicyVersion: any): void => {
const runContructionFail = (cmpId: any, cmpVersion: any): void => {

it(`should throw an error if cmpId=${cmpId} and cmpVersion=${cmpVersion} and tcfPolicyVersion=${tcfPolicyVersion}`, (done: () => void): void => {
it(`should throw an error if cmpId=${cmpId} and cmpVersion=${cmpVersion}`, (done: () => void): void => {

expect((): void => {

Expand All @@ -130,26 +130,20 @@ describe('CmpApi', (): void => {

};

runContructionFail(0, 2, 2);
runContructionFail(1, 2, 2);
runContructionFail(null, 2, 2);
runContructionFail('banana', 2, 2);
runContructionFail(0.234, 2, 2);
runContructionFail(-1, 2, 2);
runContructionFail('2', 2, 2);
runContructionFail('2.0', 2, 2);

runContructionFail(2, -1, 2);
runContructionFail(2, 2.02345, 2);
runContructionFail(2, '0', 2);
runContructionFail(2, 'banana', 2);
runContructionFail(2, null, 2);

runContructionFail(2, 2, 'pizza');
runContructionFail(2, 2, 0.4);
runContructionFail(2, 2, '2');
runContructionFail(2, 2, 0);
runContructionFail(2, 2, null);
runContructionFail(0, 2);
runContructionFail(1, 2);
runContructionFail(null, 2);
runContructionFail('banana', 2);
runContructionFail(0.234, 2);
runContructionFail(-1, 2);
runContructionFail('2', 2);
runContructionFail('2.0', 2);

runContructionFail(2, -1);
runContructionFail(2, 2.02345);
runContructionFail(2, '0');
runContructionFail(2, 'banana');
runContructionFail(2, null);

it('should pick up a queued stub function an excecute it if it can when tcModel is set', (done: () => void): void => {

Expand Down