didomi-iabtcf-testing
Shared testing utilities
Last updated 2 months ago by kemalmustafic .
Apache-2.0 · Repository · Original npm · Tarball · package.json
$ cnpm install didomi-iabtcf-testing 
SYNC missed versions from official npm registry.

didomi-iabtcf-testing

Testing tools to generate randomized input/output

Installation

npm

npm install didomi-iabtcf-testing --save-dev

yarn

yarn add -D didomi-iabtcf-testing

Utilities

TCModelFactory

Generate random TCModel with GVL

import { TCModelFactory } from "didomi-iabtcf-testing";

const tcModel = TCModelFactory.withGVL();

Generate random TC string

import { TCString } from "didomi-iabtcf-core";
import { TCModelFactory } from "didomi-iabtcf-testing";

console.log(TCString.decode(TCModelFactory.noGVL()));
// ... random tc string

Add publisher restrictions

import { TCModelFactory } from "didomi-iabtcf-testing";
let tcModel = TCModelFactory.withGVL();
tcModel = TCModelFactory.addPublisherRestrictions(tcModel);
// now has random publisher restrictions

GVLFactory

Get latest GVL

import { GVLFactory } from "didomi-iabtcf-testing";
import { GVL } from "didomi-iabtcf-core";

const gvl = GVLFactory.getLatest();

Get version of GVL

import { GVLFactory } from "didomi-iabtcf-testing";
import { GVL } from "didomi-iabtcf-core";

const gvl = GVLFactory.getVersion(10);

Current Tags

  • 1.1.0-2                                ...           latest (2 months ago)

2 Versions

  • 1.1.0-2                                ...           2 months ago
  • 1.1.0-1                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |