Compare commits

..

2 Commits

Author SHA1 Message Date
Gitea Actions
cbb16a8d52 ci: Bump version to 0.2.36 [skip ci] 2025-12-30 09:27:29 +05:00
70e94a6ce0 fix unit tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m5s
2025-12-29 20:27:00 -08:00
3 changed files with 10 additions and 17 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "flyer-crawler",
"version": "0.2.35",
"version": "0.2.36",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "flyer-crawler",
"version": "0.2.35",
"version": "0.2.36",
"dependencies": {
"@bull-board/api": "^6.14.2",
"@bull-board/express": "^6.14.2",

View File

@@ -1,7 +1,7 @@
{
"name": "flyer-crawler",
"private": true,
"version": "0.2.35",
"version": "0.2.36",
"type": "module",
"scripts": {
"dev": "concurrently \"npm:start:dev\" \"vite\"",

View File

@@ -29,13 +29,10 @@ describe('SystemService', () => {
describe('getPm2Status', () => {
it('should return success: true when process is online', async () => {
const stdout = `
┌────┬──────────────────────┬──────────┐
│ id │ name │ status
├────┼──────────────────────┼──────────┤
│ 0 │ flyer-crawler-api │ online │
└────┴──────────────────────┴──────────┘
`;
// This stdout mimics the output of `pm2 describe <app_name>`
const stdout = `Describing process with id 0 - name flyer-crawler-api
│ status │ online
│ name │ flyer-crawler-api │`;
mockExecAsync.mockResolvedValue({ stdout, stderr: '' });
const result = await systemService.getPm2Status();
@@ -47,13 +44,9 @@ describe('SystemService', () => {
});
it('should return success: false when process is stopped', async () => {
const stdout = `
┌────┬──────────────────────┬──────────┐
│ id │ name │ status │
├────┼──────────────────────┼──────────┤
│ 0 │ flyer-crawler-api │ stopped │
└────┴──────────────────────┴──────────┘
`;
const stdout = `Describing process with id 0 - name flyer-crawler-api
│ status │ stopped │
│ name │ flyer-crawler-api │`;
mockExecAsync.mockResolvedValue({ stdout, stderr: '' });
const result = await systemService.getPm2Status();