Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney committed Feb 11, 2025
1 parent 63bb63f commit b0b553b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions packages/web/tests/stream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export async function generateConnectedDatabase(
};
}

describe('Streaming', () => {
describe('Streaming', {
sequential: true
}, () => {
/**
* Declares a test to be executed with different generated db functions
*/
Expand All @@ -111,7 +113,7 @@ describe('Streaming', () => {
});

it(`${name} - with web worker`, () => test(funcWithWebWorker));
it(`${name} - without web worker`, () => test(funcWithoutWebWorker));
it(`${name} - without web worker`,() => test(funcWithoutWebWorker));
};

beforeAll(() => Logger.useDefaults());
Expand Down
9 changes: 6 additions & 3 deletions packages/web/tests/uploads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ConnectedDatabaseUtils, generateConnectedDatabase } from './stream.test
// Don't want to actually export the warning string from the package
const PARTIAL_WARNING = 'Potentially previously uploaded CRUD entries are still present';

describe('CRUD Uploads', () => {
describe('CRUD Uploads', {sequential: true}, () => {
let connectedUtils: ConnectedDatabaseUtils;
const logger = Logger.get('crud-logger');

Expand All @@ -15,6 +15,7 @@ describe('CRUD Uploads', () => {
beforeEach(async () => {
connectedUtils = await generateConnectedDatabase({
powerSyncOptions: {
dbFilename: 'crud-uploads-test.db',
logger,
retryDelayMs: 100,
crudUploadThrottleMs: 1_000,
Expand Down Expand Up @@ -55,7 +56,8 @@ describe('CRUD Uploads', () => {
expect(loggerSpy.mock.calls.find((logArgs) => logArgs[0].includes(PARTIAL_WARNING))).exist;
},
{
timeout: 500
timeout: 500,
interval: 100
}
);
});
Expand Down Expand Up @@ -104,7 +106,8 @@ describe('CRUD Uploads', () => {
expect(uploadSpy.mock.calls.length).eq(3);
},
{
timeout: 5_000
timeout: 5_000,
interval: 300
}
);

Expand Down

0 comments on commit b0b553b

Please sign in to comment.