@@ -5,21 +5,21 @@ const temp = require('temp');
5
5
const TreeSitterProvider = require ( '../lib/tree-sitter-provider' ) ;
6
6
7
7
// Just for syntax highlighting.
8
- function scm ( strings ) {
8
+ function scm ( strings ) {
9
9
return strings . join ( '' ) ;
10
10
}
11
11
12
- function getEditor ( ) {
12
+ function getEditor ( ) {
13
13
return atom . workspace . getActiveTextEditor ( ) ;
14
14
}
15
15
16
- async function wait ( ms ) {
16
+ async function wait ( ms ) {
17
17
return new Promise ( r => setTimeout ( r , ms ) ) ;
18
18
}
19
19
20
20
let provider ;
21
21
22
- async function getSymbols ( editor , type = 'file' ) {
22
+ async function getSymbols ( editor , type = 'file' ) {
23
23
let controller = new AbortController ( ) ;
24
24
let symbols = await provider . getSymbols ( {
25
25
type,
@@ -72,7 +72,7 @@ describe('TreeSitterProvider', () => {
72
72
73
73
it ( 'is willing to provide symbols for the current file' , ( ) => {
74
74
let meta = { type : 'file' , editor } ;
75
- expect ( provider . canProvideSymbols ( meta ) ) . toBe ( true ) ;
75
+ expect ( provider . canProvideSymbols ( meta ) ) . toBe ( 0.999 ) ;
76
76
} ) ;
77
77
78
78
it ( 'is not willing to provide symbols for an entire project' , ( ) => {
@@ -121,7 +121,7 @@ describe('TreeSitterProvider', () => {
121
121
122
122
it ( 'is willing to provide symbols' , ( ) => {
123
123
let meta = { type : 'file' , editor } ;
124
- expect ( provider . canProvideSymbols ( meta ) ) . toBe ( true ) ;
124
+ expect ( provider . canProvideSymbols ( meta ) ) . toBe ( 0.999 ) ;
125
125
} ) ;
126
126
127
127
describe ( 'and has content' , ( ) => {
0 commit comments