xero-hero
Version:
Heroic utilities to simplify and enable your progress with the [xero-node](https://www.npmjs.com/package/xero-node) SDK.
63 lines (55 loc) • 2.26 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/common/instance/operations.ts
var import_deep_cuts = require("deep-cuts");
// src/accounting/attachments/requests.ts
var import_tranquil_stream = require("tranquil-stream");
// src/accounting/contacts/links.ts
var import_qs = __toESM(require("qs"));
// src/accounting/invoices/lineItems.ts
var import_deep_cuts2 = require("deep-cuts");
// src/accounting/journals/links.ts
var import_qs2 = __toESM(require("qs"));
// src/projects/generators.ts
var generateProjectAmountUSD = (value) => {
const amount = {};
amount.currency = "USD";
amount.value = value;
return amount;
};
// src/projects/timeEntries.ts
var import_deep_cuts3 = require("deep-cuts");
// src/projects/__tests__/generators.test.ts
describe("projects/generators", () => {
describe("generateAmount()", () => {
it("should return an Amount object with the given value as the USD Currency", () => {
const amount = generateProjectAmountUSD(1e3);
expect(amount).toEqual({
currency: "USD",
value: 1e3
});
});
});
});
//# sourceMappingURL=generators.test.js.map