bexio 0.7.2 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +20 -119
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +146 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/jest-html-reporters-attach/index.js +58 -0
- package/jest-html-reporters-attach/result.js +1 -0
- package/jest_html_reporters.html +1 -0
- package/junit.xml +155 -0
- package/lib/index.d.ts +9 -103
- package/lib/index.js +55 -237
- package/lib/index.js.map +1 -1
- package/lib/interfaces/BillsStatic.js +1 -0
- package/lib/interfaces/BillsStatic.js.map +1 -1
- package/lib/interfaces/BusinessActivitiesStatic.js +1 -0
- package/lib/interfaces/BusinessActivitiesStatic.js.map +1 -1
- package/lib/interfaces/CalendarStatic.js +1 -0
- package/lib/interfaces/CalendarStatic.js.map +1 -1
- package/lib/interfaces/ContactGroupsStatic.js +1 -0
- package/lib/interfaces/ContactGroupsStatic.js.map +1 -1
- package/lib/interfaces/ContactRelationsStatic.js +1 -0
- package/lib/interfaces/ContactRelationsStatic.js.map +1 -1
- package/lib/interfaces/ContactSectorsStatic.js +1 -0
- package/lib/interfaces/ContactSectorsStatic.js.map +1 -1
- package/lib/interfaces/ContactTypesStatic.js +1 -0
- package/lib/interfaces/ContactTypesStatic.js.map +1 -1
- package/lib/interfaces/ContactsStatic.js +1 -0
- package/lib/interfaces/ContactsStatic.js.map +1 -1
- package/lib/interfaces/ExpensesStatic.js +1 -0
- package/lib/interfaces/ExpensesStatic.js.map +1 -1
- package/lib/interfaces/InvoicesStatic.d.ts +100 -0
- package/lib/interfaces/InvoicesStatic.js +25 -0
- package/lib/interfaces/InvoicesStatic.js.map +1 -0
- package/lib/interfaces/ItemsStatic.d.ts +120 -0
- package/lib/interfaces/ItemsStatic.js +47 -0
- package/lib/interfaces/ItemsStatic.js.map +1 -0
- package/lib/interfaces/NotesStatic.js +1 -0
- package/lib/interfaces/NotesStatic.js.map +1 -1
- package/lib/interfaces/OrdersStatic.js +1 -0
- package/lib/interfaces/OrdersStatic.js.map +1 -1
- package/lib/interfaces/PositionStatic.d.ts +35 -0
- package/lib/interfaces/PositionStatic.js +3 -0
- package/lib/interfaces/PositionStatic.js.map +1 -0
- package/lib/interfaces/ProjectStatusesStatic.js +1 -0
- package/lib/interfaces/ProjectStatusesStatic.js.map +1 -1
- package/lib/interfaces/ProjectTypesStatic.js +1 -0
- package/lib/interfaces/ProjectTypesStatic.js.map +1 -1
- package/lib/interfaces/ProjectsStatic.js +1 -0
- package/lib/interfaces/ProjectsStatic.js.map +1 -1
- package/lib/interfaces/SalesOrderManagementStatic.js +1 -0
- package/lib/interfaces/SalesOrderManagementStatic.js.map +1 -1
- package/lib/interfaces/TimetrackingStatusesStatic.js +1 -0
- package/lib/interfaces/TimetrackingStatusesStatic.js.map +1 -1
- package/lib/interfaces/TimetrackingsStatic.js +1 -0
- package/lib/interfaces/TimetrackingsStatic.js.map +1 -1
- package/lib/interfaces/UsersStatic.js +1 -0
- package/lib/interfaces/UsersStatic.js.map +1 -1
- package/lib/resources/BaseCrud.d.ts +13 -24
- package/lib/resources/BaseCrud.js +37 -44
- package/lib/resources/BaseCrud.js.map +1 -1
- package/lib/resources/Bills.d.ts +5 -6
- package/lib/resources/Bills.js +14 -17
- package/lib/resources/Bills.js.map +1 -1
- package/lib/resources/BusinessActivities.d.ts +1 -2
- package/lib/resources/BusinessActivities.js +2 -3
- package/lib/resources/BusinessActivities.js.map +1 -1
- package/lib/resources/ContactGroups.d.ts +1 -2
- package/lib/resources/ContactGroups.js +3 -4
- package/lib/resources/ContactGroups.js.map +1 -1
- package/lib/resources/ContactRelations.d.ts +1 -2
- package/lib/resources/ContactRelations.js +2 -3
- package/lib/resources/ContactRelations.js.map +1 -1
- package/lib/resources/ContactSectors.d.ts +1 -2
- package/lib/resources/ContactSectors.js +6 -7
- package/lib/resources/ContactSectors.js.map +1 -1
- package/lib/resources/ContactTypes.d.ts +1 -2
- package/lib/resources/ContactTypes.js +6 -7
- package/lib/resources/ContactTypes.js.map +1 -1
- package/lib/resources/Contacts.d.ts +1 -2
- package/lib/resources/Contacts.js +2 -3
- package/lib/resources/Contacts.js.map +1 -1
- package/lib/resources/Expenses.d.ts +2 -3
- package/lib/resources/Expenses.js +4 -5
- package/lib/resources/Expenses.js.map +1 -1
- package/lib/resources/Invoices.d.ts +6 -0
- package/lib/resources/Invoices.js +27 -0
- package/lib/resources/Invoices.js.map +1 -0
- package/lib/resources/Items.d.ts +5 -0
- package/lib/resources/Items.js +13 -0
- package/lib/resources/Items.js.map +1 -0
- package/lib/resources/Orders.d.ts +1 -2
- package/lib/resources/Orders.js +2 -3
- package/lib/resources/Orders.js.map +1 -1
- package/lib/resources/Payments.d.ts +1 -2
- package/lib/resources/Payments.js +2 -11
- package/lib/resources/Payments.js.map +1 -1
- package/lib/resources/ProjectStatuses.d.ts +1 -2
- package/lib/resources/ProjectStatuses.js +2 -3
- package/lib/resources/ProjectStatuses.js.map +1 -1
- package/lib/resources/ProjectTypes.d.ts +1 -2
- package/lib/resources/ProjectTypes.js +6 -7
- package/lib/resources/ProjectTypes.js.map +1 -1
- package/lib/resources/Projects.d.ts +1 -2
- package/lib/resources/Projects.js +2 -3
- package/lib/resources/Projects.js.map +1 -1
- package/lib/resources/TimetrackingStatuses.d.ts +1 -2
- package/lib/resources/TimetrackingStatuses.js +2 -3
- package/lib/resources/TimetrackingStatuses.js.map +1 -1
- package/lib/resources/Timetrackings.d.ts +1 -2
- package/lib/resources/Timetrackings.js +2 -3
- package/lib/resources/Timetrackings.js.map +1 -1
- package/lib/resources/Users.d.ts +1 -2
- package/lib/resources/Users.js +2 -3
- package/lib/resources/Users.js.map +1 -1
- package/lib/tests/BaseCrud.test.js +290 -0
- package/lib/tests/BaseCrud.test.js.map +1 -0
- package/lib/tests/Bills.test.js +93 -143
- package/lib/tests/Bills.test.js.map +1 -1
- package/lib/tests/BusinessActivities.test.js +14 -85
- package/lib/tests/BusinessActivities.test.js.map +1 -1
- package/lib/tests/ContactGroups.test.js +14 -92
- package/lib/tests/ContactGroups.test.js.map +1 -1
- package/lib/tests/ContactRelations.test.js +14 -87
- package/lib/tests/ContactRelations.test.js.map +1 -1
- package/lib/tests/ContactSectors.test.js +14 -124
- package/lib/tests/ContactSectors.test.js.map +1 -1
- package/lib/tests/ContactTypes.test.js +14 -118
- package/lib/tests/ContactTypes.test.js.map +1 -1
- package/lib/tests/Contacts.test.js +23 -0
- package/lib/tests/Contacts.test.js.map +1 -0
- package/lib/tests/Expenses.test.js +14 -98
- package/lib/tests/Expenses.test.js.map +1 -1
- package/lib/tests/Invoices.test.d.ts +1 -0
- package/lib/tests/Invoices.test.js +23 -0
- package/lib/tests/Invoices.test.js.map +1 -0
- package/lib/tests/Items.test.d.ts +1 -0
- package/lib/tests/Items.test.js +23 -0
- package/lib/tests/Items.test.js.map +1 -0
- package/lib/tests/Orders.test.js +14 -127
- package/lib/tests/Orders.test.js.map +1 -1
- package/lib/tests/Payments.test.js +15 -90
- package/lib/tests/Payments.test.js.map +1 -1
- package/lib/tests/ProjectStatuses.test.js +14 -123
- package/lib/tests/ProjectStatuses.test.js.map +1 -1
- package/lib/tests/ProjectTypes.test.js +14 -119
- package/lib/tests/ProjectTypes.test.js.map +1 -1
- package/lib/tests/Projects.test.js +14 -91
- package/lib/tests/Projects.test.js.map +1 -1
- package/lib/tests/TimetrackingStatuses.test.js +14 -123
- package/lib/tests/TimetrackingStatuses.test.js.map +1 -1
- package/lib/tests/Timetrackings.test.js +14 -102
- package/lib/tests/Timetrackings.test.js.map +1 -1
- package/lib/tests/Users.test.js +14 -125
- package/lib/tests/Users.test.js.map +1 -1
- package/package.json +45 -29
- package/lib/constants/Scopes.d.ts +0 -32
- package/lib/constants/Scopes.js +0 -36
- package/lib/constants/Scopes.js.map +0 -1
- package/lib/libs/OAuth2.d.ts +0 -122
- package/lib/libs/OAuth2.js +0 -202
- package/lib/libs/OAuth2.js.map +0 -1
- package/lib/tests/Authentication.test.js +0 -83
- package/lib/tests/Authentication.test.js.map +0 -1
- package/lib/tests/Contact.test.js +0 -103
- package/lib/tests/Contact.test.js.map +0 -1
- /package/lib/tests/{Authentication.test.d.ts → BaseCrud.test.d.ts} +0 -0
- /package/lib/tests/{Contact.test.d.ts → Contacts.test.d.ts} +0 -0
|
@@ -1,128 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
12
|
-
if (mod && mod.__esModule) return mod;
|
|
13
|
-
var result = {};
|
|
14
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
15
|
-
result["default"] = mod;
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
4
|
};
|
|
21
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const
|
|
23
|
-
const
|
|
6
|
+
const BaseCrud_1 = __importDefault(require("../resources/BaseCrud"));
|
|
7
|
+
const utils_1 = require("ts-jest/utils");
|
|
24
8
|
const ProjectTypes_1 = __importDefault(require("../resources/ProjectTypes"));
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
!BEXIO_CLIENTSECRET ||
|
|
38
|
-
!HOSTNAME ||
|
|
39
|
-
!BEXIO_USERNAME ||
|
|
40
|
-
!BEXIO_PASSWORD)
|
|
41
|
-
throw new Error("not all necessary variables defined");
|
|
42
|
-
api = new __1.default(BEXIO_CLIENTID, BEXIO_CLIENTSECRET, `http://${HOSTNAME}/callback`, [__1.Scopes.PROJECT_SHOW, __1.Scopes.PROJECT_EDIT]);
|
|
43
|
-
yield api.fakeLogin(BEXIO_USERNAME, BEXIO_PASSWORD);
|
|
44
|
-
}));
|
|
45
|
-
it("init ProjectTypes object", () => {
|
|
46
|
-
moduleToTest = new ProjectTypes_1.default(api["bexioAuth"]);
|
|
9
|
+
const chance_1 = __importDefault(require("chance"));
|
|
10
|
+
jest.mock("../resources/BaseCrud");
|
|
11
|
+
const mockedBase = (0, utils_1.mocked)(BaseCrud_1.default, true);
|
|
12
|
+
const seedgenerator = new chance_1.default();
|
|
13
|
+
const seed = seedgenerator.hash();
|
|
14
|
+
console.log(`using chance seed ${seed}`);
|
|
15
|
+
const chance = new chance_1.default(seed);
|
|
16
|
+
describe("ProjectTypes", () => {
|
|
17
|
+
it("Should use init the base correctly", () => {
|
|
18
|
+
const token = chance.string();
|
|
19
|
+
new ProjectTypes_1.default(token);
|
|
20
|
+
expect(mockedBase).toHaveBeenCalledWith(token, `/pr_project_type`);
|
|
47
21
|
});
|
|
48
|
-
it.skip("create new project type (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
projectType = yield moduleToTest.create({ name: `type-${Date.now()}` });
|
|
50
|
-
chai_1.expect(projectType.name).include("type-");
|
|
51
|
-
}));
|
|
52
|
-
it("should return a not implemented error on creation", () => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
try {
|
|
54
|
-
projectType = yield moduleToTest.create({ name: `type-${Date.now()}` });
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
58
|
-
}
|
|
59
|
-
}));
|
|
60
|
-
it("list project types", () => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const list = yield moduleToTest.list({});
|
|
62
|
-
chai_1.expect(list.map(el => el.id)).includes(projectType.id);
|
|
63
|
-
}));
|
|
64
|
-
// search is currently broken on bexio side
|
|
65
|
-
it.skip("search project type", () => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const searchResult = yield moduleToTest.search({}, [
|
|
67
|
-
{
|
|
68
|
-
field: ProjectTypesStatic_1.ProjectTypesStatic.ProjectTypeSearchParameters.project_type,
|
|
69
|
-
value: projectType.name,
|
|
70
|
-
criteria: "="
|
|
71
|
-
}
|
|
72
|
-
]);
|
|
73
|
-
chai_1.expect(searchResult.length).to.be.eq(1);
|
|
74
|
-
chai_1.expect(searchResult[0].id).to.be.eq(projectType.id);
|
|
75
|
-
}));
|
|
76
|
-
it("show project type", () => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const show = yield moduleToTest.show({}, projectType.id);
|
|
78
|
-
chai_1.expect(show.id).to.be.eq(projectType.id);
|
|
79
|
-
chai_1.expect(show.name).to.be.eq(projectType.name);
|
|
80
|
-
}));
|
|
81
|
-
it.skip("overwrite project type (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
const overwritten = yield moduleToTest.overwrite(projectType.id, {
|
|
83
|
-
name: `overwritten-${Date.now()}`,
|
|
84
|
-
id: 1
|
|
85
|
-
});
|
|
86
|
-
chai_1.expect(overwritten.name).include("overwritten");
|
|
87
|
-
}));
|
|
88
|
-
it("should return a not implemented error on overwrite", () => __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
try {
|
|
90
|
-
const overwritten = yield moduleToTest.overwrite(projectType.id, {
|
|
91
|
-
name: `overwritten-${Date.now()}`,
|
|
92
|
-
id: 1
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
catch (err) {
|
|
96
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
it.skip("edit project type (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
const edited = yield moduleToTest.edit(projectType.id, {
|
|
101
|
-
name: `edited-${Date.now()}`
|
|
102
|
-
});
|
|
103
|
-
chai_1.expect(edited.name).include("edited-");
|
|
104
|
-
}));
|
|
105
|
-
it("should return a not implemented error on edit", () => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
try {
|
|
107
|
-
const edited = yield moduleToTest.edit(projectType.id, {
|
|
108
|
-
name: `edited-${Date.now()}`
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
113
|
-
}
|
|
114
|
-
}));
|
|
115
|
-
it.skip("delete project type (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
const result = yield moduleToTest.delete(projectType.id);
|
|
117
|
-
chai_1.expect(result).to.be.true;
|
|
118
|
-
}));
|
|
119
|
-
it("should return a not implemented error on delete", () => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
try {
|
|
121
|
-
const result = yield moduleToTest.delete(projectType.id);
|
|
122
|
-
}
|
|
123
|
-
catch (err) {
|
|
124
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
125
|
-
}
|
|
126
|
-
}));
|
|
127
22
|
});
|
|
128
23
|
//# sourceMappingURL=ProjectTypes.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectTypes.test.js","sourceRoot":"","sources":["../../src/tests/ProjectTypes.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectTypes.test.js","sourceRoot":"","sources":["../../src/tests/ProjectTypes.test.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAC7C,yCAAuC;AACvC,6EAAqD;AACrD,oDAA4B;AAE5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,kBAAQ,EAAE,IAAI,CAAC,CAAC;AAE1C,MAAM,aAAa,GAAG,IAAI,gBAAM,EAAE,CAAC;AACnC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;AAClC,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,sBAAY,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,100 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
12
|
-
if (mod && mod.__esModule) return mod;
|
|
13
|
-
var result = {};
|
|
14
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
15
|
-
result["default"] = mod;
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
4
|
};
|
|
21
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const
|
|
23
|
-
const
|
|
6
|
+
const BaseCrud_1 = __importDefault(require("../resources/BaseCrud"));
|
|
7
|
+
const utils_1 = require("ts-jest/utils");
|
|
24
8
|
const Projects_1 = __importDefault(require("../resources/Projects"));
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
!BEXIO_CLIENTSECRET ||
|
|
38
|
-
!HOSTNAME ||
|
|
39
|
-
!BEXIO_USERNAME ||
|
|
40
|
-
!BEXIO_PASSWORD)
|
|
41
|
-
throw new Error("not all necessary variables defined");
|
|
42
|
-
api = new __1.default(BEXIO_CLIENTID, BEXIO_CLIENTSECRET, `http://${HOSTNAME}/callback`, [__1.Scopes.PROJECT_SHOW, __1.Scopes.PROJECT_EDIT]);
|
|
43
|
-
yield api.fakeLogin(BEXIO_USERNAME, BEXIO_PASSWORD);
|
|
44
|
-
}));
|
|
45
|
-
it("init Projects object", () => {
|
|
46
|
-
moduleToTest = new Projects_1.default(api["bexioAuth"]);
|
|
9
|
+
const chance_1 = __importDefault(require("chance"));
|
|
10
|
+
jest.mock("../resources/BaseCrud");
|
|
11
|
+
const mockedBase = (0, utils_1.mocked)(BaseCrud_1.default, true);
|
|
12
|
+
const seedgenerator = new chance_1.default();
|
|
13
|
+
const seed = seedgenerator.hash();
|
|
14
|
+
console.log(`using chance seed ${seed}`);
|
|
15
|
+
const chance = new chance_1.default(seed);
|
|
16
|
+
describe("Projects", () => {
|
|
17
|
+
it("Should use init the base correctly", () => {
|
|
18
|
+
const token = chance.string();
|
|
19
|
+
new Projects_1.default(token);
|
|
20
|
+
expect(mockedBase).toHaveBeenCalledWith(token, `/pr_project`);
|
|
47
21
|
});
|
|
48
|
-
it("create new project", () => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const name = `test-${Date.now()}`;
|
|
50
|
-
project = yield moduleToTest.create({
|
|
51
|
-
contact_id: 1,
|
|
52
|
-
pr_project_type_id: 1,
|
|
53
|
-
pr_state_id: 1,
|
|
54
|
-
user_id: 1,
|
|
55
|
-
name: name
|
|
56
|
-
});
|
|
57
|
-
chai_1.expect(project.name).to.be.eq(name);
|
|
58
|
-
}));
|
|
59
|
-
it("list projects", () => __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
const list = yield moduleToTest.list({});
|
|
61
|
-
chai_1.expect(list.map(el => el.id)).includes(project.id);
|
|
62
|
-
}));
|
|
63
|
-
it("search project", () => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const searchResult = yield moduleToTest.search({}, [
|
|
65
|
-
{
|
|
66
|
-
field: ProjectsStatic_1.ProjectsStatic.ProjectSearchParameters.name,
|
|
67
|
-
value: project.name,
|
|
68
|
-
criteria: "="
|
|
69
|
-
}
|
|
70
|
-
]);
|
|
71
|
-
chai_1.expect(searchResult.length).to.be.eq(1);
|
|
72
|
-
chai_1.expect(searchResult[0].id).to.be.eq(project.id);
|
|
73
|
-
chai_1.expect(searchResult[0].name).to.be.eq(project.name);
|
|
74
|
-
}));
|
|
75
|
-
it("show project", () => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const show = yield moduleToTest.show({}, project.id);
|
|
77
|
-
chai_1.expect(show.id).to.be.eq(project.id);
|
|
78
|
-
}));
|
|
79
|
-
it("overwrite project", () => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
const overwritten = yield moduleToTest.overwrite(project.id, {
|
|
81
|
-
contact_id: 1,
|
|
82
|
-
pr_project_type_id: 1,
|
|
83
|
-
pr_state_id: 1,
|
|
84
|
-
user_id: 1,
|
|
85
|
-
name: `overwritten-${Date.now()}`
|
|
86
|
-
});
|
|
87
|
-
chai_1.expect(overwritten.name).include("overwritten-");
|
|
88
|
-
}));
|
|
89
|
-
it("edit project", () => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
const edited = yield moduleToTest.edit(project.id, {
|
|
91
|
-
name: `edited-${Date.now()}`
|
|
92
|
-
});
|
|
93
|
-
chai_1.expect(edited.name).include("edited-");
|
|
94
|
-
}));
|
|
95
|
-
it("delete project", () => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const result = yield moduleToTest.delete(project.id);
|
|
97
|
-
chai_1.expect(result).to.be.true;
|
|
98
|
-
}));
|
|
99
22
|
});
|
|
100
23
|
//# sourceMappingURL=Projects.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Projects.test.js","sourceRoot":"","sources":["../../src/tests/Projects.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Projects.test.js","sourceRoot":"","sources":["../../src/tests/Projects.test.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAC7C,yCAAuC;AACvC,qEAA6C;AAC7C,oDAA4B;AAE5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,kBAAQ,EAAE,IAAI,CAAC,CAAC;AAE1C,MAAM,aAAa,GAAG,IAAI,gBAAM,EAAE,CAAC;AACnC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;AAClC,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,kBAAQ,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,132 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
12
|
-
if (mod && mod.__esModule) return mod;
|
|
13
|
-
var result = {};
|
|
14
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
15
|
-
result["default"] = mod;
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
4
|
};
|
|
21
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const dotenv_1 = __importDefault(require("dotenv"));
|
|
25
|
-
const TimetrackingStatusesStatic_1 = require("../interfaces/TimetrackingStatusesStatic");
|
|
6
|
+
const BaseCrud_1 = __importDefault(require("../resources/BaseCrud"));
|
|
7
|
+
const utils_1 = require("ts-jest/utils");
|
|
26
8
|
const TimetrackingStatuses_1 = __importDefault(require("../resources/TimetrackingStatuses"));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
!BEXIO_USERNAME ||
|
|
40
|
-
!BEXIO_PASSWORD)
|
|
41
|
-
throw new Error("not all necessary variables defined");
|
|
42
|
-
api = new __1.default(BEXIO_CLIENTID, BEXIO_CLIENTSECRET, `http://${HOSTNAME}/callback`, [__1.Scopes.MONITORING_EDIT, __1.Scopes.MONITORING_SHOW]);
|
|
43
|
-
yield api.fakeLogin(BEXIO_USERNAME, BEXIO_PASSWORD);
|
|
44
|
-
}));
|
|
45
|
-
it("init timetracking", () => {
|
|
46
|
-
moduleToTest = new TimetrackingStatuses_1.default(api["bexioAuth"]);
|
|
9
|
+
const chance_1 = __importDefault(require("chance"));
|
|
10
|
+
jest.mock("../resources/BaseCrud");
|
|
11
|
+
const mockedBase = (0, utils_1.mocked)(BaseCrud_1.default, true);
|
|
12
|
+
const seedgenerator = new chance_1.default();
|
|
13
|
+
const seed = seedgenerator.hash();
|
|
14
|
+
console.log(`using chance seed ${seed}`);
|
|
15
|
+
const chance = new chance_1.default(seed);
|
|
16
|
+
describe("TimetrackingStatuses", () => {
|
|
17
|
+
it("Should use init the base correctly", () => {
|
|
18
|
+
const token = chance.string();
|
|
19
|
+
new TimetrackingStatuses_1.default(token);
|
|
20
|
+
expect(mockedBase).toHaveBeenCalledWith(token, `/timesheet_status`);
|
|
47
21
|
});
|
|
48
|
-
it.skip("create new timetracking status (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
timetrackingStatusEntry = yield moduleToTest.create({
|
|
50
|
-
name: "test"
|
|
51
|
-
});
|
|
52
|
-
}));
|
|
53
|
-
it("should return a not implemented error on creation", () => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
timetrackingStatusEntry = {
|
|
55
|
-
id: 1,
|
|
56
|
-
name: "Offen"
|
|
57
|
-
};
|
|
58
|
-
try {
|
|
59
|
-
yield moduleToTest.create({
|
|
60
|
-
name: "test"
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
65
|
-
}
|
|
66
|
-
}));
|
|
67
|
-
it("list timetracking statuses", () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const list = yield moduleToTest.list({});
|
|
69
|
-
chai_1.expect(list.map(el => el.id)).includes(timetrackingStatusEntry.id);
|
|
70
|
-
}));
|
|
71
|
-
// search is currently broken on bexio side
|
|
72
|
-
it.skip("search timetracking statuses", () => __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const searchResult = yield moduleToTest.search({}, [
|
|
74
|
-
{
|
|
75
|
-
field: TimetrackingStatusesStatic_1.TimetrackingStatusesStatic.TimetrackingStatusesSearchparameters.name,
|
|
76
|
-
value: timetrackingStatusEntry.name,
|
|
77
|
-
criteria: "="
|
|
78
|
-
}
|
|
79
|
-
]);
|
|
80
|
-
chai_1.expect(searchResult.length).to.be.greaterThan(0);
|
|
81
|
-
chai_1.expect(searchResult[0].id).to.be.eq(timetrackingStatusEntry.id);
|
|
82
|
-
}));
|
|
83
|
-
it("show timetracking statuses", () => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
const showedEntry = yield moduleToTest.show({}, timetrackingStatusEntry.id);
|
|
85
|
-
chai_1.expect(showedEntry.name).to.be.eq(timetrackingStatusEntry.name);
|
|
86
|
-
}));
|
|
87
|
-
it.skip("overwrite a timetracking status (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
const overwritten = yield moduleToTest.overwrite(timetrackingStatusEntry.id, {
|
|
89
|
-
name: "test"
|
|
90
|
-
});
|
|
91
|
-
chai_1.expect(overwritten.name).to.be.eq("test");
|
|
92
|
-
}));
|
|
93
|
-
it("should return a not implemented error on overwrite", () => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
try {
|
|
95
|
-
yield moduleToTest.overwrite(timetrackingStatusEntry.id, {
|
|
96
|
-
name: "test"
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
catch (err) {
|
|
100
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
101
|
-
}
|
|
102
|
-
}));
|
|
103
|
-
it.skip("edit timetracking status (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
const edited = yield moduleToTest.edit(timetrackingStatusEntry.id, {
|
|
105
|
-
name: "test"
|
|
106
|
-
});
|
|
107
|
-
chai_1.expect(edited.name).to.be.eq("test");
|
|
108
|
-
}));
|
|
109
|
-
it("should return a not implemented error on edit", () => __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
try {
|
|
111
|
-
yield moduleToTest.edit(timetrackingStatusEntry.id, {
|
|
112
|
-
name: "test"
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
117
|
-
}
|
|
118
|
-
}));
|
|
119
|
-
it.skip("delete timetracking status (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
const result = yield moduleToTest.delete(timetrackingStatusEntry.id);
|
|
121
|
-
chai_1.expect(result).to.be.true;
|
|
122
|
-
}));
|
|
123
|
-
it("should return a not implemented error on deletion", () => __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
try {
|
|
125
|
-
yield moduleToTest.delete(timetrackingStatusEntry.id);
|
|
126
|
-
}
|
|
127
|
-
catch (err) {
|
|
128
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
129
|
-
}
|
|
130
|
-
}));
|
|
131
22
|
});
|
|
132
23
|
//# sourceMappingURL=TimetrackingStatuses.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimetrackingStatuses.test.js","sourceRoot":"","sources":["../../src/tests/TimetrackingStatuses.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimetrackingStatuses.test.js","sourceRoot":"","sources":["../../src/tests/TimetrackingStatuses.test.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAC7C,yCAAuC;AACvC,6FAAqE;AACrE,oDAA4B;AAE5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,kBAAQ,EAAE,IAAI,CAAC,CAAC;AAE1C,MAAM,aAAa,GAAG,IAAI,gBAAM,EAAE,CAAC;AACnC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;AAClC,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,8BAAoB,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,111 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
12
|
-
if (mod && mod.__esModule) return mod;
|
|
13
|
-
var result = {};
|
|
14
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
15
|
-
result["default"] = mod;
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
18
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
4
|
};
|
|
21
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const dotenv_1 = __importDefault(require("dotenv"));
|
|
6
|
+
const BaseCrud_1 = __importDefault(require("../resources/BaseCrud"));
|
|
7
|
+
const utils_1 = require("ts-jest/utils");
|
|
25
8
|
const Timetrackings_1 = __importDefault(require("../resources/Timetrackings"));
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
!HOSTNAME ||
|
|
39
|
-
!BEXIO_USERNAME ||
|
|
40
|
-
!BEXIO_PASSWORD)
|
|
41
|
-
throw new Error("not all necessary variables defined");
|
|
42
|
-
api = new __1.default(BEXIO_CLIENTID, BEXIO_CLIENTSECRET, `http://${HOSTNAME}/callback`, [__1.Scopes.MONITORING_EDIT, __1.Scopes.MONITORING_SHOW]);
|
|
43
|
-
yield api.fakeLogin(BEXIO_USERNAME, BEXIO_PASSWORD);
|
|
44
|
-
}));
|
|
45
|
-
it("init timetracking", () => {
|
|
46
|
-
moduleToTest = new Timetrackings_1.default(api["bexioAuth"]);
|
|
9
|
+
const chance_1 = __importDefault(require("chance"));
|
|
10
|
+
jest.mock("../resources/BaseCrud");
|
|
11
|
+
const mockedBase = (0, utils_1.mocked)(BaseCrud_1.default, true);
|
|
12
|
+
const seedgenerator = new chance_1.default();
|
|
13
|
+
const seed = seedgenerator.hash();
|
|
14
|
+
console.log(`using chance seed ${seed}`);
|
|
15
|
+
const chance = new chance_1.default(seed);
|
|
16
|
+
describe("Timetrackings", () => {
|
|
17
|
+
it("Should use init the base correctly", () => {
|
|
18
|
+
const token = chance.string();
|
|
19
|
+
new Timetrackings_1.default(token);
|
|
20
|
+
expect(mockedBase).toHaveBeenCalledWith(token, `/timesheet`);
|
|
47
21
|
});
|
|
48
|
-
it("create new timetracking entry", () => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
timetrackingEntry = yield moduleToTest.create({
|
|
50
|
-
contact_id: 1,
|
|
51
|
-
user_id: 1,
|
|
52
|
-
allowable_bill: true,
|
|
53
|
-
client_service_id: 1,
|
|
54
|
-
tracking: {
|
|
55
|
-
date: "2019-01-01",
|
|
56
|
-
duration: "02:00",
|
|
57
|
-
type: "duration"
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}));
|
|
61
|
-
it("list timetracking entries", () => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const list = yield moduleToTest.list({});
|
|
63
|
-
chai_1.expect(list.map(el => el.id)).includes(timetrackingEntry.id);
|
|
64
|
-
}));
|
|
65
|
-
it("search timetracking entry", () => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const searchResult = yield moduleToTest.search({}, [
|
|
67
|
-
{
|
|
68
|
-
field: TimetrackingsStatic_1.TimetrackingsStatic.TimetrackingsSearchParameters.id,
|
|
69
|
-
value: timetrackingEntry.id,
|
|
70
|
-
criteria: "="
|
|
71
|
-
}
|
|
72
|
-
]);
|
|
73
|
-
chai_1.expect(searchResult.length).to.be.eq(1);
|
|
74
|
-
chai_1.expect(searchResult[0].id).to.be.eq(timetrackingEntry.id);
|
|
75
|
-
}));
|
|
76
|
-
it("show timetracking entry", () => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const showedEntry = yield moduleToTest.show({}, timetrackingEntry.id);
|
|
78
|
-
chai_1.expect(showedEntry.id).to.be.eq(timetrackingEntry.id);
|
|
79
|
-
}));
|
|
80
|
-
it.skip("overwrite a timetracking entry (not implemented by Bexio yet)", () => __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const overwritten = yield moduleToTest.overwrite(timetrackingEntry.id, {
|
|
82
|
-
allowable_bill: false
|
|
83
|
-
});
|
|
84
|
-
chai_1.expect(overwritten.allowable_bill).to.be.false;
|
|
85
|
-
}));
|
|
86
|
-
it("should return a not implemented error on creation", () => __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
try {
|
|
88
|
-
yield moduleToTest.overwrite(timetrackingEntry.id, {
|
|
89
|
-
allowable_bill: false
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
catch (err) {
|
|
93
|
-
chai_1.expect(err.message).to.be.eq("not implemented by Bexio yet");
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
96
|
-
it("edit timetracking entry", () => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
const edited = yield moduleToTest.edit(timetrackingEntry.id, {
|
|
98
|
-
contact_id: 1,
|
|
99
|
-
tracking: {
|
|
100
|
-
date: "2019-01-02",
|
|
101
|
-
duration: "02:00"
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
chai_1.expect(edited.tracking.date).to.be.eq("2019-01-02");
|
|
105
|
-
}));
|
|
106
|
-
it("delete timetracking entry", () => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const result = yield moduleToTest.delete(timetrackingEntry.id);
|
|
108
|
-
chai_1.expect(result).to.be.true;
|
|
109
|
-
}));
|
|
110
22
|
});
|
|
111
23
|
//# sourceMappingURL=Timetrackings.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timetrackings.test.js","sourceRoot":"","sources":["../../src/tests/Timetrackings.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Timetrackings.test.js","sourceRoot":"","sources":["../../src/tests/Timetrackings.test.ts"],"names":[],"mappings":";;;;;AAAA,qEAA6C;AAC7C,yCAAuC;AACvC,+EAAuD;AACvD,oDAA4B;AAE5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,kBAAQ,EAAE,IAAI,CAAC,CAAC;AAE1C,MAAM,aAAa,GAAG,IAAI,gBAAM,EAAE,CAAC;AACnC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;AAClC,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,uBAAa,CAAC,KAAK,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|