Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 11, 2025
1 parent 0d82405 commit 067a0c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/development-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ describe('test/development-ts.test.ts', () => {
it('should reload when change service', async () => {
const filepath = getFilepath('development-ts/app/service/a.ts');
await fs.writeFile(filepath, '');
await scheduler.wait(DELAY);

await scheduler.wait(1000);
await fs.unlink(filepath);
await scheduler.wait(5000);
app.expect('stdout', new RegExp(escape(`reload worker because ${filepath}`)));
});

it('should not reload when change assets', async () => {
const filepath = getFilepath('development-ts/app/assets/b.js');
await fs.writeFile(filepath, '');
await scheduler.wait(DELAY);

await scheduler.wait(1000);
await fs.unlink(filepath);
await scheduler.wait(5000);
app.notExpect('stdout', new RegExp(escape(`reload worker because ${filepath}`)));
});

Expand Down
8 changes: 4 additions & 4 deletions test/development.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ describe('test/development.test.ts', () => {
it('should reload when change service', async () => {
const filepath = getFilepath('development/app/service/a.js');
await fs.writeFile(filepath, '');
await scheduler.wait(DELAY);

await scheduler.wait(1000);
await fs.unlink(filepath);
await scheduler.wait(5000);
app.expect('stdout', new RegExp(escape(`reload worker because ${filepath}`)));
});

it('should not reload when change assets', async () => {
const filepath = getFilepath('development/app/assets/b.js');
await fs.writeFile(filepath, '');
await scheduler.wait(DELAY);

await scheduler.wait(1000);
await fs.unlink(filepath);
await scheduler.wait(5000);
app.notExpect('stdout', new RegExp(escape(`reload worker because ${filepath}`)));
});

Expand Down

0 comments on commit 067a0c5

Please sign in to comment.