mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 09:47:46 +03:00
Убрана неиспользуемая фича и обновлены тесты.
This commit is contained in:
4289
package-lock.json
generated
4289
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -71,12 +71,12 @@
|
|||||||
"eslint": "9.18.0",
|
"eslint": "9.18.0",
|
||||||
"eslint-plugin-prettier": "5.2.3",
|
"eslint-plugin-prettier": "5.2.3",
|
||||||
"fastify": "^5.2.1",
|
"fastify": "^5.2.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^30.0.0-alpha.7",
|
||||||
"prettier": "3.4.2",
|
"prettier": "3.4.2",
|
||||||
"prisma": "^6.2.1",
|
"prisma": "^6.2.1",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"supertest": "^7.0.0",
|
"supertest": "^7.0.0",
|
||||||
"ts-jest": "^29.2.5",
|
"ts-jest": "^29.3.2",
|
||||||
"ts-loader": "^9.5.2",
|
"ts-loader": "^9.5.2",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"tsconfig-paths": "^4.2.0",
|
"tsconfig-paths": "^4.2.0",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe("ScheduleParser", () => {
|
|||||||
describe("Расписание", () => {
|
describe("Расписание", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await setLink(
|
await setLink(
|
||||||
"https://politehnikum-eng.ru/2024/poltavskaja_15_s_9_po_13.12-1-.xls",
|
"https://politehnikum-eng.ru/2025/poltavskaja_31_s_14_po_20_04-1_.xls",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ describe("ScheduleParser", () => {
|
|||||||
);
|
);
|
||||||
expect(schedule).toBeDefined();
|
expect(schedule).toBeDefined();
|
||||||
|
|
||||||
const group: Group | undefined = schedule.groups.get("ИС-114/23");
|
const group: Group | undefined = schedule.groups.get("ИС-112/24");
|
||||||
expect(group).toBeDefined();
|
expect(group).toBeDefined();
|
||||||
|
|
||||||
const day = group.days[0];
|
const day = group.days[0];
|
||||||
|
|||||||
@@ -563,11 +563,6 @@ export class ScheduleParser {
|
|||||||
groups.set(group.name, group);
|
groups.set(group.name, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
const updatedGroups = ScheduleParser.getUpdatedGroups(
|
|
||||||
this.lastResult?.groups,
|
|
||||||
groups,
|
|
||||||
);
|
|
||||||
|
|
||||||
const teachers = ScheduleParser.convertGroupsToTeachers(groups);
|
const teachers = ScheduleParser.convertGroupsToTeachers(groups);
|
||||||
|
|
||||||
return (this.lastResult = {
|
return (this.lastResult = {
|
||||||
@@ -580,11 +575,7 @@ export class ScheduleParser {
|
|||||||
groups: groups,
|
groups: groups,
|
||||||
teachers: teachers,
|
teachers: teachers,
|
||||||
|
|
||||||
updatedGroups:
|
updatedGroups: [],
|
||||||
updatedGroups.length === 0
|
|
||||||
? (this.lastResult?.updatedGroups ?? [])
|
|
||||||
: updatedGroups,
|
|
||||||
|
|
||||||
updatedTeachers: [], // TODO: Вернуть эту фичу
|
updatedTeachers: [], // TODO: Вернуть эту фичу
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ describe("BasicXlsDownloader", () => {
|
|||||||
|
|
||||||
it("Должен вернуть скачанный файл", async () => {
|
it("Должен вернуть скачанный файл", async () => {
|
||||||
await downloader.setDownloadUrl(
|
await downloader.setDownloadUrl(
|
||||||
"https://politehnikum-eng.ru/2024/poltavskaja_15_s_9_po_13.12-1-.xls",
|
"https://politehnikum-eng.ru/2025/poltavskaja_31_s_14_po_20_04-1_.xls",
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(() => {
|
expect(() => {
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import { Test, TestingModule } from "@nestjs/testing";
|
|
||||||
import { VKIDController } from "./vkid.controller";
|
|
||||||
|
|
||||||
describe("VkidController", () => {
|
|
||||||
let controller: VKIDController;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
|
||||||
controllers: [VKIDController],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
controller = module.get<VKIDController>(VKIDController);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should be defined", () => {
|
|
||||||
expect(controller).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Body,
|
Body,
|
||||||
Controller,
|
Controller,
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import { Test, TestingModule } from "@nestjs/testing";
|
|
||||||
import { VKIDService } from "./vkid.service";
|
|
||||||
|
|
||||||
describe("VkidService", () => {
|
|
||||||
let service: VKIDService;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
|
||||||
providers: [VKIDService],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
service = module.get<VKIDService>(VKIDService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should be defined", () => {
|
|
||||||
expect(service).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"builder": "swc",
|
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user