Skip to content

Commit

Permalink
test(Added Fixtures): Extracted the fixtures from the api documentati…
Browse files Browse the repository at this point in the history
…on and added them to a file.
  • Loading branch information
simplyspoke committed Mar 18, 2018
1 parent 5dd2531 commit 9411cdc
Show file tree
Hide file tree
Showing 26 changed files with 1,340 additions and 1,803 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
testMatch: [
'<rootDir>/src/**/*.spec.ts'
'<rootDir>/src/**/*.spec.ts',
'<rootDir>/test/**/*.spec.ts'
],
transform: {
'.(ts|tsx)': '<rootDir>/node_modules/ts-jest/preprocessor.js'
Expand Down
10 changes: 10 additions & 0 deletions src/models/expenses.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ export interface Expense {
// An object containing the expense’s client id, name, and currency.
client: object;

// * Either units or total_cost is required. units is required if using a unit-based expense category. total_cost is required if not using a unit-based expense category.

// Date the expense occurred.
// Type: decimal
total_cost?: number;

// Date the expense occurred.
// Type: integer
units?: number;

// An object containing the expense’s project id, name, and code.
project: object;

Expand Down
7 changes: 7 additions & 0 deletions src/models/invoices.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export interface Invoice {
// Type: decimal
amount: number;

// The total amount due at this time for this invoice.
// Type: decimal
due_amount: number;

// This percentage is applied to the subtotal, including line items and discounts.
// Type: decimal
tax: number;
Expand Down Expand Up @@ -121,6 +125,9 @@ export interface InvoiceLineItem {
// integer Unique ID for the line item.
id: number;

// An object containing the associated project’s id, name, and code.
project: object;

// The name of an invoice item category.
kind: string;

Expand Down
2 changes: 1 addition & 1 deletion src/models/timeEntries.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface TimeEntry {

// Number of (decimal time) hours tracked in this time entry.
// Type: decimal
hours: object;
hours: number;

// Notes attached to the time entry.
notes: string;
Expand Down
Loading

0 comments on commit 9411cdc

Please sign in to comment.