// import * as chai from 'chai'; // import * as chaiAsPromised from 'chai-as-promised'; // chai.use(chaiAsPromised); // import * as sinon from 'sinon'; // const reservation = require('../../api/reservation'); // const expect = chai.expect; // const proxyquire = require('proxyquire').noCallThru(); // describe('Reservation', () => { // let Reservations, reservations, facilityId, loginName; // let FacilityProxyMock, facilityItemMock; // beforeEach(() => { // facilityItemMock = {}; // FacilityProxyMock = {Proxy: {Items: sinon.stub().returns(facilityItemMock)}}; // Reservations = proxyquire('../../lib/reservation.ts', { '@labshare/facility': FacilityProxyMock}).Reservations; // }); // describe('add()', () => { // const item = { // data: { // "ID": null, // "LsID": null, // "Title": null, // "Status": null, // "DataUrl": null, // "BackupDataUrl": null, // "LocalDataUrl": null, // "SubmittedDate": null, // "CreatedDate": null, // "Lab": null, // "AccNum": null, // "OwnerRef": null, // "Owner": null, // "PiRef": null, // "Pi": null, // "AssignedToRef": null, // "Instruments": [{ "Id": 39, "Value": "Leica SP39 X-WLL @ Bldg 2"}, // { "Id": 40, "Value": "Leica SP40 @ Twinbrook 3" }, // { "Id": 41, "Value": "Leica SP41 X-WLL @ Bldg 4" }], // "AssignedTo": null, // "ImageUrl": null, // "Properties": [ // { // "choices": [], // "defaultChoice": "[today]", // "internalName": "EventDate", // "isExcluded": false, // "isReadOnly": false, // "isRequired": true, // "isStaffOnly": false, // "lsInternal": false, // "isInternal": false, // "label": "Start", // "type": "DateTime", // "value": null, // "guid": "64cd368d-2f95-4bfc-a1f9-8d4324ecb007", // "description": "", // "displayFormat": 1 // }, // { // "choices": [], // "defaultChoice": null, // "internalName": "Title", // "isExcluded": false, // "isReadOnly": false, // "isRequired": true, // "isStaffOnly": false, // "lsInternal": false, // "isInternal": false, // "label": "Title", // "type": "Text", // "value": null, // "guid": "fa564e0f-0c70-4ab9-b863-0177e6ddd247", // "description": "", // "displayFormat": null // }, // { // "choices": [], // "defaultChoice": null, // "internalName": "Location", // "isExcluded": false, // "isReadOnly": false, // "isRequired": false, // "isStaffOnly": false, // "lsInternal": false, // "isInternal": false, // "label": "Location", // "type": "Text", // "value": null, // "guid": "288f5f32-8462-4175-8f09-dd7ba29359a9", // "description": "", // "displayFormat": null // }, // { // "choices": [], // "defaultChoice": null, // "internalName": "Instrument", // "isExcluded": false, // "isReadOnly": false, // "isRequired": false, // "isStaffOnly": false, // "lsInternal": false, // "isInternal": false, // "label": "Instrument", // "type": "Lookup", // "value": { // "Refs": [ // null // ] // }, // "guid": "7bd720cc-9370-449e-a812-90cde8260117", // "description": "", // "displayFormat": null // } // ], // "relatedItems": [] // } // }; // let response; // beforeEach(() => { // reservations.add = sinon.stub().resolves(item.data); // }); // beforeEach(async () => { // response = await reservations.add([ { "id": 36743 }, { "id": 36745 }, { "id": 36744} ]); // }); // }); // });