Skip to content

Commit

Permalink
fix: use single quote in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jul 19, 2022
1 parent b1f33c1 commit 960fab5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/vue-language-service/tests/complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ for (const dirName of testDirs) {
expect(result.replace(/\r\n/g, '\n')).toBe(expectedFileText.replace(/\r\n/g, '\n'));
});
}

}
});
}
Expand Down
31 changes: 30 additions & 1 deletion packages/vue-language-service/tests/utils/createTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,36 @@ function createTester(root: string) {
getScriptSnapshot,
getVueCompilationSettings: () => ({}),
};
const languageService = createLanguageService({ typescript: ts }, host, undefined, undefined, undefined, []);
const vscodeSettings: any = {
typescript: {
preferences: {
quoteStyle: 'single',
},
},
javascript: {
preferences: {
quoteStyle: 'single',
},
},
};
const languageService = createLanguageService({ typescript: ts }, host, undefined, undefined, {
async getConfiguration<T>(section: string) {
const keys = section.split('.');
let settings = vscodeSettings;
for (const key of keys) {
if (key in settings) {
settings = settings[key];
}
else {
settings = undefined;
break;
}
}
return settings;
},
onDidChangeConfiguration() { },
rootUris: [],
}, []);

return {
host,
Expand Down

0 comments on commit 960fab5

Please sign in to comment.