Skip to content

Commit cfb9d34

Browse files
committed
test: fix context assertion
1 parent 660386d commit cfb9d34

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/linter/tests/index.test.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ describe('createLinter', () => {
3232
assert.strictEqual(rule1.mock.callCount(), 1);
3333
assert.strictEqual(rule2.mock.callCount(), 1);
3434

35-
// assert.deepEqual(rule1.mock.calls[0].arguments, [context]);
36-
// assert.deepEqual(rule2.mock.calls[0].arguments, [context]);
35+
const rule1Context = rule1.mock.calls[0].arguments[0];
36+
const rule2Context = rule2.mock.calls[0].arguments[0];
37+
38+
assert.strictEqual(rule1Context.tree, emptyTree);
39+
assert.strictEqual(rule2Context.tree, emptyTree);
3740
});
3841

3942
it('should return the aggregated issues from all rules', () => {

0 commit comments

Comments
 (0)