Skip to content

Commit 2d358db

Browse files
committed
modify test cases
1 parent fdcfc27 commit 2d358db

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

packages/core/test/analyzer.spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ describe('Performance Analysis', () => {
3333
await collect('waitOneSec');
3434
expect(PerformanceAnalysis.count()).toBeTruthy();
3535
});
36-
// expect performanceRecord.txt exists when getStatistics() is called
3736
it('should write performance data to file', async () => {
3837
await collect('waitOneSec');
3938
await collect('waitAnotherSec');

packages/extension-driver-duckdb/tests/duckdbDataSource.spec.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,12 @@ it('Should work with persistent database', async () => {
130130
});
131131
const columns = getColumns();
132132
const data = await streamToArray(getData());
133-
const db = new duckdb.Database(testFile);
134-
const result = await getQueryResults(
135-
db,
136-
'select * from "users" where age < 200 order by id desc'
137-
);
138133
// Assert
139134
expect(columns.length).toBe(4);
140135
expect(columns).toContainEqual({ name: 'id', type: 'number' });
141136
expect(columns).toContainEqual({ name: 'name', type: 'string' });
142137
expect(columns).toContainEqual({ name: 'age', type: 'number' });
143138
expect(columns).toContainEqual({ name: 'enabled', type: 'boolean' });
144-
expect(data.length).toEqual(result.length);
145-
for (let i = 0; i < data.length; i++) {
146-
expect(data[i]).toEqual(result[i]);
147-
}
148-
expect(data).toEqual(result);
149139
expect(data.length).toBe(2);
150140
expect(data[0]).toEqual({
151141
id: 2,
@@ -156,7 +146,7 @@ it('Should work with persistent database', async () => {
156146
expect(data[1]).toEqual({ id: 1, name: 'freda', age: 18, enabled: true });
157147
});
158148

159-
it('Should return correct data chunk', async () => {
149+
it('Should return the same data when using c.all and datasource.execute', async () => {
160150
// Arrange
161151
const dataSource = new DuckDBDataSource(null, 'duckdb', [
162152
{

0 commit comments

Comments
 (0)