Skip to content

Commit 1392636

Browse files
committed
correct tests after merge of estools#61
1 parent a0a7e49 commit 1392636

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

tests/querySubject.js

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,10 @@ describe("Query subject", function () {
2525

2626
it("* subject", function () {
2727
var matches = esquery(forLoop, '!* > [name="foo"]');
28-
assert.strictEqual(10, matches.length);
28+
assert.strictEqual(2, matches.length);
2929
assert.deepEqual([
30-
forLoop.body[0].test.right.object,
3130
forLoop.body[0].test.right,
32-
forLoop.body[0].test,
33-
forLoop.body[0],
34-
forLoop,
35-
forLoop.body[0].body.body[0].expression.callee.object,
3631
forLoop.body[0].body.body[0].expression.callee,
37-
forLoop.body[0].body.body[0].expression,
38-
forLoop.body[0].body.body[0],
39-
forLoop.body[0].body,
4032
], matches);
4133
});
4234

@@ -45,8 +37,8 @@ describe("Query subject", function () {
4537
assert.strictEqual(3, matches.length);
4638
assert.deepEqual([
4739
simpleFunction.body[0],
48-
simpleFunction.body[0].body.body[0].declarations[0],
4940
simpleFunction.body[0].body.body[0],
41+
simpleFunction.body[0].body.body[0].declarations[0],
5042
], matches);
5143
});
5244

@@ -97,28 +89,18 @@ describe("Query subject", function () {
9789

9890
it(":matches subject", function () {
9991
var matches = esquery(forLoop, '!:matches(*) > [name="foo"]');
100-
assert.strictEqual(10, matches.length);
92+
assert.strictEqual(2, matches.length);
10193
assert.deepEqual([
102-
forLoop.body[0].test.right.object,
10394
forLoop.body[0].test.right,
104-
forLoop.body[0].test,
105-
forLoop.body[0],
106-
forLoop,
107-
forLoop.body[0].body.body[0].expression.callee.object,
10895
forLoop.body[0].body.body[0].expression.callee,
109-
forLoop.body[0].body.body[0].expression,
110-
forLoop.body[0].body.body[0],
111-
forLoop.body[0].body,
11296
], matches);
11397
});
11498

11599
it(":not subject", function () {
116100
var matches = esquery(nestedFunctions, '!:not(BlockStatement) > [name="foo"]');
117-
assert.strictEqual(3, matches.length);
101+
assert.strictEqual(1, matches.length);
118102
assert.deepEqual([
119-
nestedFunctions.body[0].id,
120103
nestedFunctions.body[0],
121-
nestedFunctions,
122104
], matches);
123105
});
124106

0 commit comments

Comments
 (0)