add start of tests

This commit is contained in:
Kyle Buzby
2018-02-27 22:26:30 -06:00
parent d7629ffffa
commit 63ca62a96b
@@ -1,7 +1,26 @@
import * as pmCollection from 'postman-collection';
/* Example https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base64-js/base64-js-tests.ts
base64js.byteLength(""); // $ExpectType number
base64js.toByteArray(""); // $ExpectType Uint8Array
base64js.fromByteArray(new Uint8Array(0)); // $ExpectType string
*/
const certificate = new pmCollection.Certificate({});
certificate.cert; // $ExpectType any
certificate.id; // $ExpectType string
certificate.key; // $ExpectType any
certificate.matches; // $ExpectType any[]
certificate.name; // $ExpectType string
certificate.passphrase; // $ExpectType string
certificate.auth; // $ExpectType RequestAuth
certificate.disabled; // $ExpectType boolean
certificate.canApplyTo("string"); // $ExpectType any
certificate.canApplyTo(new pmCollection.Url({})); // $ExpectType any
certificate.toJSON(); // $ExpectType CertificateDefinition
certificate.update({}); // $ExpectType void
certificate as pmCollection.Property; // $ExpectType Property
pmCollection.Certificate.isCertificate(certificate); // $ExpectType boolean
let collection: pmCollection.Collection;
collection = new pmCollection.Collection();
collection = new pmCollection.Collection({});
collection = new pmCollection.Collection({}, []);