Shared testing utilities
npm install @cookiehub/iabtcf-testing


Testing tools to generate randomized input/output
#### Installation
npm
```
npm install @cookiehub/iabtcf-testing --save-dev
yarn
``
yarn add -D @cookiehub/iabtcf-testing
#### Utilities
TCModelFactory
Generate random TCModel with GVL
`typescript
import {TCModelFactory} from '@cookiehub/iabtcf-testing';
const tcModel = TCModelFactory.withGVL();
`
Generate random TC string
`typescript
import {TCString} from '@cookiehub/iabtcf-core';
import {TCModelFactory} from '@cookiehub/iabtcf-testing';
console.log(TCString.encode(TCModelFactory.noGVL()));
// ... random tc string
`
Add publisher restrictions
`typescript
import {TCModelFactory} from '@cookiehub/iabtcf-testing';
let tcModel = TCModelFactory.withGVL();
tcModel = TCModelFactory.addPublisherRestrictions(tcModel);
// now has random publisher restrictions
`
Get latest GVL
`typescript
import {GVLFactory} from '@cookiehub/iabtcf-testing';
import {GVL} from '@cookiehub/iabtcf-core';
const gvl = GVLFactory.getLatest();
`
Get version of GVL
`typescript
import {GVLFactory} from '@cookiehub/iabtcf-testing';
import {GVL} from '@cookiehub/iabtcf-core';
const gvl = GVLFactory.getVersion(10);
``