1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Transcribe: #12883: Disable JobProcessor tests by default (#12955)

This commit is contained in:
pedr
2025-08-18 05:34:26 -03:00
committed by GitHub
parent ff8848d138
commit 97b0ffc263
3 changed files with 11 additions and 4 deletions

View File

@@ -29,7 +29,13 @@ For further customization look at `.env-sample-transcribe`
## Testing
The integration tests that require the full model to run **don't run on the CI**. It is necessary to be extra careful when changing the model or the prompt because of that. The specific test that has been disabled is at `workers/JobProcessor.test.ts`
The integration tests that require the full model to run **don't run by default, including on CI**. It is necessary to be extra careful when changing the model or the prompt because of that. The specific test that has been disabled is at `workers/JobProcessor.test.ts`
To run all tests, use the command:
```
yarn test-all
```
## Setup up the database

View File

@@ -8,6 +8,7 @@
"start": "node dist/src/api/app.js",
"tsc": "tsc --project tsconfig.json",
"test": "jest --verbose=false",
"test-all": "TRANSCRIBE_RUN_ALL=1 jest --verbose=false",
"test-ci": "yarn test",
"clean": "gulp clean",
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json"

View File

@@ -12,7 +12,7 @@ const cleanUpResult = (result: string) => {
return result.replace('“', '"').replace('”', '"');
};
const skipIfCI = process.env.IS_CONTINUOUS_INTEGRATION ? it.skip : it;
const skipByDefault = (process.env.IS_CONTINUOUS_INTEGRATION || process.env.TRANSCRIBE_RUN_ALL !== '1') ? it.skip : it;
describe('JobProcessor', () => {
let queue: BaseQueue;
@@ -31,7 +31,7 @@ describe('JobProcessor', () => {
await cleanUpDb('./JobProcessor.test.sqlite3');
});
skipIfCI('should execute work on job in the queue', async () => {
skipByDefault('should execute work on job in the queue', async () => {
jest.useRealTimers();
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', 'images'), 1000);
await tw.init();
@@ -53,7 +53,7 @@ describe('JobProcessor', () => {
}
}, 6 * Minute);
skipIfCI('should execute work on job in the queue even if one fails', async () => {
skipByDefault('should execute work on job in the queue even if one fails', async () => {
jest.useRealTimers();
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', 'images'), 1000);
await tw.init();