Skip to content

Commit b0b553b

Browse files
test
1 parent 63bb63f commit b0b553b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/web/tests/stream.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export async function generateConnectedDatabase(
9191
};
9292
}
9393

94-
describe('Streaming', () => {
94+
describe('Streaming', {
95+
sequential: true
96+
}, () => {
9597
/**
9698
* Declares a test to be executed with different generated db functions
9799
*/
@@ -111,7 +113,7 @@ describe('Streaming', () => {
111113
});
112114

113115
it(`${name} - with web worker`, () => test(funcWithWebWorker));
114-
it(`${name} - without web worker`, () => test(funcWithoutWebWorker));
116+
it(`${name} - without web worker`,() => test(funcWithoutWebWorker));
115117
};
116118

117119
beforeAll(() => Logger.useDefaults());

packages/web/tests/uploads.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ConnectedDatabaseUtils, generateConnectedDatabase } from './stream.test
66
// Don't want to actually export the warning string from the package
77
const PARTIAL_WARNING = 'Potentially previously uploaded CRUD entries are still present';
88

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

@@ -15,6 +15,7 @@ describe('CRUD Uploads', () => {
1515
beforeEach(async () => {
1616
connectedUtils = await generateConnectedDatabase({
1717
powerSyncOptions: {
18+
dbFilename: 'crud-uploads-test.db',
1819
logger,
1920
retryDelayMs: 100,
2021
crudUploadThrottleMs: 1_000,
@@ -55,7 +56,8 @@ describe('CRUD Uploads', () => {
5556
expect(loggerSpy.mock.calls.find((logArgs) => logArgs[0].includes(PARTIAL_WARNING))).exist;
5657
},
5758
{
58-
timeout: 500
59+
timeout: 500,
60+
interval: 100
5961
}
6062
);
6163
});
@@ -104,7 +106,8 @@ describe('CRUD Uploads', () => {
104106
expect(uploadSpy.mock.calls.length).eq(3);
105107
},
106108
{
107-
timeout: 5_000
109+
timeout: 5_000,
110+
interval: 300
108111
}
109112
);
110113

0 commit comments

Comments
 (0)