Skip to content

Commit 9d63861

Browse files
Copilotmathiasrw
andauthored
Test coverage of UNION, INTERSECT, EXCEPT to close #2361 (#2374)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mathiasrw <[email protected]>
1 parent 4c77bec commit 9d63861

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

test/test316.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (typeof exports === 'object') {
66
}
77

88
describe('Test 316 UNION ALL', function () {
9-
it.skip('1. SEARCH DISTINCT', function (done) {
9+
it('1. SEARCH DISTINCT', function (done) {
1010
var data = [{a: 10}, {a: 100}, {a: 10}, {a: 100}, {a: 10}];
1111

1212
var res = alasql('SEARCH DISTINCT(/ a) FROM ?', [data]);
@@ -15,7 +15,7 @@ describe('Test 316 UNION ALL', function () {
1515
done();
1616
});
1717

18-
it.skip('2. Simple UNION ALL', function (done) {
18+
it('2. Simple UNION ALL', function (done) {
1919
var data = [{a: 10}, {b: 100}, {a: 5}];
2020

2121
var res = alasql('SEARCH UNION ALL(/a,/b) ORDER BY() FROM ?', [data]);

test/test322.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ if (typeof exports === 'object') {
66
}
77

88
describe('Test 322 UNION TEST', function () {
9-
it.skip('1. CREATE DATABASE', function (done) {
9+
it('1. CREATE DATABASE', function (done) {
1010
alasql('CREATE DATABASE test322; USE test322');
1111
done();
1212
});
1313

14-
it.skip('2. UNION ALL', function (done) {
14+
it('2. UNION ALL', function (done) {
1515
alasql.options.modifier = undefined;
1616

1717
var data = [{a: 1}, {a: 2}, {a: 2}, {b: 2}];
@@ -42,15 +42,15 @@ describe('Test 322 UNION TEST', function () {
4242
done();
4343
});
4444

45-
it.skip('3. SEARCH UNION', function (done) {
45+
it('3. SEARCH UNION', function (done) {
4646
var data = [{a: 1}, {a: 2}, {a: 2}, {b: 2}];
4747

4848
var res = alasql('SEARCH UNION(/a,/b) FROM ?', [data]);
4949
assert.deepEqual(res, [1, 2]);
5050
done();
5151
});
5252

53-
it.skip('99. DROP DATABASE', function (done) {
53+
it('99. DROP DATABASE', function (done) {
5454
alasql('DROP DATABASE test322');
5555
done();
5656
});

test/test338.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ if (typeof exports === 'object') {
1111
//
1212

1313
describe('Test 338 EXTRACT', function () {
14-
it.skip('1. CREATE DATABASE', function (done) {
14+
it('1. CREATE DATABASE', function (done) {
1515
alasql('CREATE DATABASE test338;USE test338');
1616
done();
1717
});
1818

19-
it.skip('2. SAMPLE', function (done) {
19+
it('2. SAMPLE', function (done) {
2020
var res = alasql(function () {
2121
/*
2222
@@ -36,7 +36,7 @@ select * from b;
3636
done();
3737
});
3838

39-
it.skip('2. EXCEPT', function (done) {
39+
it('2. EXCEPT', function (done) {
4040
var res = alasql(function () {
4141
/*
4242
@@ -53,7 +53,7 @@ select top 3 b.col from b order by b.col desc;
5353
done();
5454
});
5555

56-
it.skip('3. EXCEPT', function (done) {
56+
it('3. EXCEPT', function (done) {
5757
var res = alasql(function () {
5858
/*
5959
@@ -72,7 +72,7 @@ select col from cte_for_b;
7272
done();
7373
});
7474

75-
it.skip('3. DROP TABLES', function (done) {
75+
it('3. DROP TABLES', function (done) {
7676
var res = alasql(function () {
7777
/*
7878
@@ -87,7 +87,7 @@ drop table b;
8787
done();
8888
});
8989

90-
it.skip('99. DROP DATABASE', function (done) {
90+
it('99. DROP DATABASE', function (done) {
9191
alasql('DROP DATABASE test338');
9292
done();
9393
});

test/test339.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ if (typeof exports === 'object') {
66
}
77

88
describe('Test 339 UNION EXTRACT INTERSECT', function () {
9-
it.skip('1. CREATE DATABASE', function (done) {
9+
it('1. CREATE DATABASE', function (done) {
1010
alasql('CREATE DATABASE test339;USE test339');
1111
alasql.options.modifier = 'COLUMN';
1212
done();
1313
});
1414

15-
it.skip('2. CREATE TABLE', function (done) {
15+
it('2. CREATE TABLE', function (done) {
1616
var res = alasql(function () {
1717
/*
1818
@@ -32,7 +32,7 @@ insert into c (col) values (1), (2), (5);
3232
done();
3333
});
3434

35-
it.skip('3. UNION', function (done) {
35+
it('3. UNION', function (done) {
3636
var res = alasql(function () {
3737
/*
3838
select col from a
@@ -45,7 +45,7 @@ insert into c (col) values (1), (2), (5);
4545
done();
4646
});
4747

48-
it.skip('4. UNION ALL', function (done) {
48+
it('4. UNION ALL', function (done) {
4949
var res = alasql(function () {
5050
/*
5151
select col from a
@@ -58,7 +58,7 @@ insert into c (col) values (1), (2), (5);
5858
done();
5959
});
6060

61-
it.skip('5. EXCEPT', function (done) {
61+
it('5. EXCEPT', function (done) {
6262
var res = alasql(function () {
6363
/*
6464
select col from a
@@ -70,7 +70,7 @@ insert into c (col) values (1), (2), (5);
7070
assert.deepEqual(res.sort(), [3]);
7171
done();
7272
});
73-
it.skip('6. INTERSECT', function (done) {
73+
it('6. INTERSECT', function (done) {
7474
var res = alasql(function () {
7575
/*
7676
select col from a
@@ -83,7 +83,7 @@ insert into c (col) values (1), (2), (5);
8383
done();
8484
});
8585

86-
it.skip('7. INTERSECT', function (done) {
86+
it('7. INTERSECT', function (done) {
8787
var res = alasql(function () {
8888
/*
8989
select col from a
@@ -96,7 +96,7 @@ insert into c (col) values (1), (2), (5);
9696
done();
9797
});
9898

99-
it.skip('8. UNION UNION', function (done) {
99+
it('8. UNION UNION', function (done) {
100100
var res = alasql(function () {
101101
/*
102102
select col from a
@@ -111,7 +111,7 @@ insert into c (col) values (1), (2), (5);
111111
done();
112112
});
113113

114-
it.skip('9. UNION EXCEPT', function (done) {
114+
it('9. UNION EXCEPT', function (done) {
115115
var res = alasql(function () {
116116
/*
117117
select col from a
@@ -122,11 +122,11 @@ insert into c (col) values (1), (2), (5);
122122
*/
123123
});
124124
console.log(res);
125-
assert.deepEqual(res.sort(), [3]);
125+
assert.deepEqual(res.sort(), [1, 2, 3, 4]);
126126
done();
127127
});
128128

129-
it.skip('10. UNION EXCEPT', function (done) {
129+
it('10. UNION EXCEPT', function (done) {
130130
var res = alasql(function () {
131131
/*
132132
select col from a
@@ -137,11 +137,11 @@ insert into c (col) values (1), (2), (5);
137137
*/
138138
});
139139
console.log(res);
140-
assert.deepEqual(res.sort(), [1, 2, 3, 5]);
140+
assert.deepEqual(res.sort(), [3]);
141141
done();
142142
});
143143

144-
it.skip('11. UNION INTERSECT', function (done) {
144+
it('11. UNION INTERSECT', function (done) {
145145
var res = alasql(function () {
146146
/*
147147
select col from a
@@ -156,7 +156,7 @@ insert into c (col) values (1), (2), (5);
156156
done();
157157
});
158158

159-
it.skip('12. INTERSECT UNION', function (done) {
159+
it('12. INTERSECT UNION', function (done) {
160160
var res = alasql(function () {
161161
/*
162162
select col from a
@@ -167,11 +167,11 @@ insert into c (col) values (1), (2), (5);
167167
*/
168168
});
169169
console.log(res);
170-
assert.deepEqual(res.sort(), [1, 2, 3]);
170+
assert.deepEqual(res.sort(), [1, 2]);
171171
done();
172172
});
173173

174-
it.skip('13. UNION INTERSECT', function (done) {
174+
it('13. UNION INTERSECT', function (done) {
175175
var res = alasql(function () {
176176
/*
177177
select col from a
@@ -186,7 +186,7 @@ insert into c (col) values (1), (2), (5);
186186
done();
187187
});
188188

189-
it.skip('14. INTERSECT UNION', function (done) {
189+
it('14. INTERSECT UNION', function (done) {
190190
var res = alasql(function () {
191191
/*
192192
select col from a
@@ -201,7 +201,7 @@ insert into c (col) values (1), (2), (5);
201201
done();
202202
});
203203

204-
it.skip('99. DROP DATABASE', function (done) {
204+
it('99. DROP DATABASE', function (done) {
205205
alasql.options.modifier = undefined;
206206
alasql('DROP DATABASE test339');
207207
done();

0 commit comments

Comments
 (0)