@insignia-education/api-sdk-js 0.15.72 → 0.15.74
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/package.json +7 -2
- package/src/api/v1/Courses.js +4 -4
- package/src/api/v1/Employee.js +2 -0
- package/src/api/v1/Users.js +7 -0
- package/.ai/guidelines/research-order.md +0 -29
- package/.claude/agents/product-spec-architect.md +0 -163
- package/.claude/agents/senior-code-reviewer.md +0 -109
- package/.claude/agents/senior-software-developer.md +0 -90
- package/.claude/agents/senior-software-maintainer.md +0 -121
- package/.claude/skills/general/documentation/SKILL.md +0 -49
- package/.claude/skills/general/handoff/SKILL.md +0 -15
- package/.claude/skills/general/investigation/SKILL.md +0 -53
- package/.claude/skills/general/performance/SKILL.md +0 -31
- package/.claude/skills/git/pull-request/SKILL.md +0 -47
- package/.claude/skills/how-to-create-skills/SKILL.md +0 -82
- package/.env +0 -1
- package/.env.test +0 -5
- package/.github/hooks/pre-commit +0 -22
- package/.github/workflows/npm-publish-github-packages.yml +0 -29
- package/.nvmrc +0 -1
- package/AGENTS.md +0 -140
- package/CLAUDE.md +0 -51
- package/babel.config.cjs +0 -1
- package/coverage/clover.xml +0 -380
- package/coverage/coverage-final.json +0 -3
- package/coverage/lcov-report/Client.js.html +0 -463
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Client.js.html +0 -478
- package/coverage/lcov-report/src/api/index.html +0 -116
- package/coverage/lcov-report/src/api/index.js.html +0 -127
- package/coverage/lcov-report/src/api/v1/Accounts.js.html +0 -151
- package/coverage/lcov-report/src/api/v1/Admin.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Auth.js.html +0 -157
- package/coverage/lcov-report/src/api/v1/Categories.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Changelogs.js.html +0 -118
- package/coverage/lcov-report/src/api/v1/Configs.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/ContactForms.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/ConversationalTopics.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Countries.js.html +0 -112
- package/coverage/lcov-report/src/api/v1/Coupons.js.html +0 -175
- package/coverage/lcov-report/src/api/v1/Courses.js.html +0 -460
- package/coverage/lcov-report/src/api/v1/Currencies.js.html +0 -118
- package/coverage/lcov-report/src/api/v1/Dashboard.js.html +0 -115
- package/coverage/lcov-report/src/api/v1/EducationCenter.js.html +0 -115
- package/coverage/lcov-report/src/api/v1/Employee.js.html +0 -169
- package/coverage/lcov-report/src/api/v1/Files.js.html +0 -160
- package/coverage/lcov-report/src/api/v1/Forums.js.html +0 -175
- package/coverage/lcov-report/src/api/v1/Hashes.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Insignias.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Languages.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/MailBlacklist.js.html +0 -118
- package/coverage/lcov-report/src/api/v1/MailingLists.js.html +0 -127
- package/coverage/lcov-report/src/api/v1/Offers.js.html +0 -142
- package/coverage/lcov-report/src/api/v1/Organizations.js.html +0 -199
- package/coverage/lcov-report/src/api/v1/PaymentMethods.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Payments.js.html +0 -310
- package/coverage/lcov-report/src/api/v1/Premiums.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Quizzes.js.html +0 -214
- package/coverage/lcov-report/src/api/v1/Sales.js.html +0 -157
- package/coverage/lcov-report/src/api/v1/Search.js.html +0 -115
- package/coverage/lcov-report/src/api/v1/ShortLinks.js.html +0 -127
- package/coverage/lcov-report/src/api/v1/Surveys.js.html +0 -181
- package/coverage/lcov-report/src/api/v1/Taxes.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Teacher.js.html +0 -322
- package/coverage/lcov-report/src/api/v1/Telegram.js.html +0 -142
- package/coverage/lcov-report/src/api/v1/TwoFactor.js.html +0 -145
- package/coverage/lcov-report/src/api/v1/UserSessionTypes.js.html +0 -112
- package/coverage/lcov-report/src/api/v1/UserTypes.js.html +0 -121
- package/coverage/lcov-report/src/api/v1/Users.js.html +0 -778
- package/coverage/lcov-report/src/api/v1/Utm.js.html +0 -151
- package/coverage/lcov-report/src/api/v1/Webauthn.js.html +0 -190
- package/coverage/lcov-report/src/api/v1/Zoom.js.html +0 -124
- package/coverage/lcov-report/src/api/v1/index.html +0 -116
- package/coverage/lcov-report/src/api/v1/index.js.html +0 -373
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.js.html +0 -109
- package/coverage/lcov-report/tests/helpers.js.html +0 -145
- package/coverage/lcov-report/tests/index.html +0 -116
- package/coverage/lcov.info +0 -553
- package/coverage/test-report.html +0 -277
- package/eslint.config.mjs +0 -29
- package/jest.config.mjs +0 -47
- package/scss/Services/_notification.scss +0 -0
- package/scss/index.scss +0 -2
- package/tests/client.test.js +0 -265
- package/tests/helpers.js +0 -21
- package/tests/integration/api/v1/accounts.test.js +0 -31
- package/tests/integration/api/v1/auth/login.test.js +0 -44
- package/tests/integration/api/v1/changelogs.test.js +0 -21
- package/tests/integration/api/v1/contact-forms.test.js +0 -24
- package/tests/integration/api/v1/conversational-topics.test.js +0 -17
- package/tests/integration/api/v1/countries.test.js +0 -20
- package/tests/integration/api/v1/coupons.test.js +0 -19
- package/tests/integration/api/v1/courses/by-cod.test.js +0 -19
- package/tests/integration/api/v1/courses/index.test.js +0 -46
- package/tests/integration/api/v1/currencies/history.test.js +0 -23
- package/tests/integration/api/v1/currencies/index.test.js +0 -24
- package/tests/integration/api/v1/currencies/values.test.js +0 -24
- package/tests/integration/api/v1/files.test.js +0 -42
- package/tests/integration/api/v1/forums/index.test.js +0 -23
- package/tests/integration/api/v1/hashes.test.js +0 -18
- package/tests/integration/api/v1/insignias.test.js +0 -19
- package/tests/integration/api/v1/languages.test.js +0 -28
- package/tests/integration/api/v1/mail-blacklist.test.js +0 -19
- package/tests/integration/api/v1/offers.test.js +0 -20
- package/tests/integration/api/v1/organizations.test.js +0 -89
- package/tests/integration/api/v1/payment-methods/by-currencies.test.js +0 -51
- package/tests/integration/api/v1/quizzes/index.test.js +0 -37
- package/tests/integration/api/v1/short-links.test.js +0 -20
- package/tests/integration/api/v1/surveys/index.test.js +0 -40
- package/tests/integration/api/v1/taxes.test.js +0 -19
- package/tests/integration/api/v1/teacher/index.test.js +0 -53
- package/tests/integration/api/v1/telegram.test.js +0 -33
- package/tests/integration/api/v1/user-types.test.js +0 -17
- package/tests/integration/api/v1/users/cash-receivers.test.js +0 -19
- package/tests/integration/api/v1/users/index.test.js +0 -32
- package/tests/integration/api/v1/users/telegram.test.js +0 -36
- package/tests/integration/api/v1/zoom.test.js +0 -17
- package/tests/integration/loadEnv.js +0 -16
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
loginAdmin
|
|
5
|
-
} from '../../../../helpers.js';
|
|
6
|
-
describe('api/v1/quizzes', () => {
|
|
7
|
-
test('get | authenticated', async () => {
|
|
8
|
-
await loginAdmin();
|
|
9
|
-
await api.quizzes.get()
|
|
10
|
-
.then(response => {
|
|
11
|
-
response = Object.values(response);
|
|
12
|
-
expect(Array.isArray(response)).toBe(true);
|
|
13
|
-
response.forEach(quiz => {
|
|
14
|
-
expect(quiz["id"]).toBeDefined();
|
|
15
|
-
expect(quiz["created_at"]).toBeDefined();
|
|
16
|
-
expect(quiz["updated_at"]).toBeDefined();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('get questions | authenticated', async () => {
|
|
22
|
-
await loginAdmin();
|
|
23
|
-
const quizzes = await api.quizzes.get().then(r => Object.values(r));
|
|
24
|
-
if (quizzes.length === 0) return;
|
|
25
|
-
const quizId = quizzes[0]["id"];
|
|
26
|
-
await api.quizzes.questions(quizId).get()
|
|
27
|
-
.then(response => {
|
|
28
|
-
response = Object.values(response);
|
|
29
|
-
expect(Array.isArray(response)).toBe(true);
|
|
30
|
-
response.forEach(question => {
|
|
31
|
-
expect(question["id"]).toBeDefined();
|
|
32
|
-
expect(question["quiz_id"]).toBeDefined();
|
|
33
|
-
expect(question["question"]).toBeDefined();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { api, loginAdmin } from '../../../helpers.js';
|
|
2
|
-
|
|
3
|
-
describe('api/v1/short-links', () => {
|
|
4
|
-
test('get | authenticated', async () => {
|
|
5
|
-
await loginAdmin();
|
|
6
|
-
await api.shortLinks.get()
|
|
7
|
-
.then(response => {
|
|
8
|
-
response = Object.values(response);
|
|
9
|
-
expect(Array.isArray(response)).toBe(true);
|
|
10
|
-
response.forEach(link => {
|
|
11
|
-
expect(link["id"]).toBeDefined();
|
|
12
|
-
expect(link["cod"]).toBeDefined();
|
|
13
|
-
expect(link["url"]).toBeDefined();
|
|
14
|
-
expect(link["enabled"]).toBeDefined();
|
|
15
|
-
expect(link["created_at"]).toBeDefined();
|
|
16
|
-
expect(link["updated_at"]).toBeDefined();
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
loginAdmin
|
|
5
|
-
} from '../../../../helpers.js';
|
|
6
|
-
|
|
7
|
-
describe('api/v1/surveys', () => {
|
|
8
|
-
test('get | authenticated', async () => {
|
|
9
|
-
await loginCustomer();
|
|
10
|
-
await api.surveys.get()
|
|
11
|
-
.then(response => {
|
|
12
|
-
response = Object.values(response);
|
|
13
|
-
expect(Array.isArray(response)).toBe(true);
|
|
14
|
-
response.forEach(survey => {
|
|
15
|
-
expect(survey["id"]).toBeDefined();
|
|
16
|
-
expect(survey["cod"]).toBeDefined();
|
|
17
|
-
expect(survey["enabled"]).toBeDefined();
|
|
18
|
-
expect(survey["created_at"]).toBeDefined();
|
|
19
|
-
expect(survey["updated_at"]).toBeDefined();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
test('get questions | authenticated', async () => {
|
|
25
|
-
await loginCustomer();
|
|
26
|
-
const surveys = await api.surveys.get().then(r => Object.values(r));
|
|
27
|
-
if (surveys.length === 0) return;
|
|
28
|
-
const surveyId = surveys[0]["id"];
|
|
29
|
-
await api.surveys.questions(surveyId).get()
|
|
30
|
-
.then(response => {
|
|
31
|
-
response = Object.values(response);
|
|
32
|
-
expect(Array.isArray(response)).toBe(true);
|
|
33
|
-
response.forEach(question => {
|
|
34
|
-
expect(question["id"]).toBeDefined();
|
|
35
|
-
expect(question["survey_id"]).toBeDefined();
|
|
36
|
-
expect(question["question"]).toBeDefined();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { api, loginAdmin } from '../../../helpers.js';
|
|
2
|
-
|
|
3
|
-
describe('api/v1/taxes', () => {
|
|
4
|
-
test('get', async () => {
|
|
5
|
-
await loginAdmin();
|
|
6
|
-
await api.taxes.get()
|
|
7
|
-
.then(response => {
|
|
8
|
-
response = Object.values(response);
|
|
9
|
-
expect(response.length > 0).toBe(true);
|
|
10
|
-
response.forEach(tax => {
|
|
11
|
-
expect(tax["id"]).toBeDefined();
|
|
12
|
-
expect(tax["cod"]).toBeDefined();
|
|
13
|
-
expect(tax["title"]).toBeDefined();
|
|
14
|
-
expect(tax["percentage"]).toBeDefined();
|
|
15
|
-
expect(tax["enabled"]).toBeDefined();
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
loginAdmin
|
|
5
|
-
} from '../../../../helpers.js';
|
|
6
|
-
|
|
7
|
-
describe('api/v1/teacher/absences', () => {
|
|
8
|
-
test('get | authenticated', async () => {
|
|
9
|
-
await loginAdmin();
|
|
10
|
-
await api.teacher.absences().get()
|
|
11
|
-
.then(response => {
|
|
12
|
-
response = Object.values(response);
|
|
13
|
-
expect(Array.isArray(response)).toBe(true);
|
|
14
|
-
response.forEach(absence => {
|
|
15
|
-
expect(absence["id"]).toBeDefined();
|
|
16
|
-
expect(absence["created_at"]).toBeDefined();
|
|
17
|
-
expect(absence["updated_at"]).toBeDefined();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
describe('api/v1/teacher/config-sets', () => {
|
|
24
|
-
test('get | authenticated', async () => {
|
|
25
|
-
await loginAdmin();
|
|
26
|
-
await api.teacher.configSets().get()
|
|
27
|
-
.then(response => {
|
|
28
|
-
response = Object.values(response);
|
|
29
|
-
expect(Array.isArray(response)).toBe(true);
|
|
30
|
-
response.forEach(configSet => {
|
|
31
|
-
expect(configSet["id"]).toBeDefined();
|
|
32
|
-
expect(configSet["created_at"]).toBeDefined();
|
|
33
|
-
expect(configSet["updated_at"]).toBeDefined();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
describe('api/v1/teacher/configs', () => {
|
|
40
|
-
test('get | authenticated', async () => {
|
|
41
|
-
await loginAdmin();
|
|
42
|
-
await api.teacher.configs().get()
|
|
43
|
-
.then(response => {
|
|
44
|
-
response = Object.values(response);
|
|
45
|
-
expect(Array.isArray(response)).toBe(true);
|
|
46
|
-
response.forEach(config => {
|
|
47
|
-
expect(config["id"]).toBeDefined();
|
|
48
|
-
expect(config["created_at"]).toBeDefined();
|
|
49
|
-
expect(config["updated_at"]).toBeDefined();
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginAdmin,
|
|
4
|
-
loginCustomer,
|
|
5
|
-
} from '../../../helpers.js';
|
|
6
|
-
|
|
7
|
-
describe('api/v1/telegram', () => {
|
|
8
|
-
test('webhookStatus | requires authentication', async () => {
|
|
9
|
-
await expect(api.telegram.webhookStatus()).rejects.toMatchObject({ status: 401 });
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
test('webhookStatus | forbidden below admin', async () => {
|
|
13
|
-
await loginCustomer();
|
|
14
|
-
await expect(api.telegram.webhookStatus()).rejects.toMatchObject({ status: 403 });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
test('webhookStatus | reachable by admin', async () => {
|
|
18
|
-
await loginAdmin();
|
|
19
|
-
await api.telegram.webhookStatus()
|
|
20
|
-
.then(response => {
|
|
21
|
-
expect(typeof response).toBe('object');
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
test('setWebhook | requires authentication', async () => {
|
|
26
|
-
await expect(api.telegram.setWebhook()).rejects.toMatchObject({ status: 401 });
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
test('setWebhook | forbidden below admin', async () => {
|
|
30
|
-
await loginCustomer();
|
|
31
|
-
await expect(api.telegram.setWebhook()).rejects.toMatchObject({ status: 403 });
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { api, loginAdmin } from '../../../helpers.js';
|
|
2
|
-
|
|
3
|
-
describe('api/v1/user-types', () => {
|
|
4
|
-
test('get', async () => {
|
|
5
|
-
await loginAdmin();
|
|
6
|
-
await api.userTypes.get()
|
|
7
|
-
.then(response => {
|
|
8
|
-
response = Object.values(response);
|
|
9
|
-
expect(response.length > 0).toBe(true);
|
|
10
|
-
response.forEach(userType => {
|
|
11
|
-
expect(userType["id"]).toBeDefined();
|
|
12
|
-
expect(userType["cod"]).toBeDefined();
|
|
13
|
-
expect(userType["title"]).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
loginAdmin
|
|
5
|
-
} from '../../../../helpers.js';
|
|
6
|
-
|
|
7
|
-
describe('api/v1/users/cash-receivers', () => {
|
|
8
|
-
test('get', async () => {
|
|
9
|
-
await api.users.cashReceivers()
|
|
10
|
-
.then(response => {
|
|
11
|
-
expect(response.length > 0).toBe(true);
|
|
12
|
-
response.forEach(user => {
|
|
13
|
-
expect(user["id"]).toBeDefined();
|
|
14
|
-
expect(user["name"]).toBeDefined();
|
|
15
|
-
})
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
loginAdmin
|
|
5
|
-
} from '../../../../helpers.js';
|
|
6
|
-
|
|
7
|
-
describe('api/v1/users', () => {
|
|
8
|
-
// get(id = null) with no id returns the authenticated user's own
|
|
9
|
-
// profile (UserController::get() -> auth()->user()), not a list.
|
|
10
|
-
test('get | authenticated', async () => {
|
|
11
|
-
await loginAdmin();
|
|
12
|
-
await api.users.get()
|
|
13
|
-
.then(response => {
|
|
14
|
-
expect(response["id"]).toBeDefined();
|
|
15
|
-
expect(response["name"]).toBeDefined();
|
|
16
|
-
expect(response["email"]).toBeDefined();
|
|
17
|
-
expect(response["created_at"]).toBeDefined();
|
|
18
|
-
expect(response["updated_at"]).toBeDefined();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
test('get by id | authenticated', async () => {
|
|
23
|
-
await loginAdmin();
|
|
24
|
-
const me = await api.users.get();
|
|
25
|
-
await api.users.get(me["id"])
|
|
26
|
-
.then(response => {
|
|
27
|
-
expect(response["id"]).toBe(me["id"]);
|
|
28
|
-
expect(response["name"]).toBeDefined();
|
|
29
|
-
expect(response["email"]).toBeDefined();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
api,
|
|
3
|
-
loginCustomer,
|
|
4
|
-
} from '../../../../helpers.js';
|
|
5
|
-
|
|
6
|
-
describe('api/v1/users/{id}/telegram', () => {
|
|
7
|
-
test('linkToken | authenticated owner returns a deep link', async () => {
|
|
8
|
-
await loginCustomer();
|
|
9
|
-
const me = await api.users.get();
|
|
10
|
-
await api.users.telegram(me["id"]).linkToken()
|
|
11
|
-
.then(response => {
|
|
12
|
-
expect(response["hash"]).toBeDefined();
|
|
13
|
-
expect(response["link"]).toContain(response["hash"]);
|
|
14
|
-
expect(response["link"]).toMatch(/^https:\/\/t\.me\//);
|
|
15
|
-
expect(response["expires_at"]).toBeDefined();
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
test('connect | rejects an invalid signature', async () => {
|
|
20
|
-
await loginCustomer();
|
|
21
|
-
const me = await api.users.get();
|
|
22
|
-
await expect(api.users.telegram(me["id"]).connect({
|
|
23
|
-
chat_id: '12345',
|
|
24
|
-
username: 'someuser',
|
|
25
|
-
expires_at: Math.floor(Date.now() / 1000) + 600,
|
|
26
|
-
signature: 'not-a-real-signature',
|
|
27
|
-
})).rejects.toMatchObject({ status: 422 });
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
test('connect | missing params returns a validation error', async () => {
|
|
31
|
-
await loginCustomer();
|
|
32
|
-
const me = await api.users.get();
|
|
33
|
-
await expect(api.users.telegram(me["id"]).connect({}))
|
|
34
|
-
.rejects.toMatchObject({ status: 422 });
|
|
35
|
-
});
|
|
36
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { api, loginAdmin } from '../../../helpers.js';
|
|
2
|
-
|
|
3
|
-
describe('api/v1/zoom/meetings', () => {
|
|
4
|
-
test('get | authenticated', async () => {
|
|
5
|
-
await loginAdmin();
|
|
6
|
-
await api.zoom.meetings().get()
|
|
7
|
-
.then(response => {
|
|
8
|
-
response = Object.values(response);
|
|
9
|
-
expect(Array.isArray(response)).toBe(true);
|
|
10
|
-
response.forEach(meeting => {
|
|
11
|
-
expect(meeting["id"]).toBeDefined();
|
|
12
|
-
expect(meeting["created_at"]).toBeDefined();
|
|
13
|
-
expect(meeting["updated_at"]).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'fs';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
|
-
|
|
4
|
-
try {
|
|
5
|
-
const content = readFileSync(resolve(process.cwd(), '.env.test'), 'utf8');
|
|
6
|
-
for (const line of content.split('\n')) {
|
|
7
|
-
const trimmed = line.trim();
|
|
8
|
-
if (!trimmed || trimmed.startsWith('#')) continue;
|
|
9
|
-
const eq = trimmed.indexOf('=');
|
|
10
|
-
if (eq > 0) {
|
|
11
|
-
process.env[trimmed.slice(0, eq).trim()] = trimmed.slice(eq + 1).trim();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
} catch {
|
|
15
|
-
// .env.test not found — tests will use existing process.env
|
|
16
|
-
}
|