mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-19 21:11:45 +10:00
test(stylesheet): complete system variables at the end of the prefix
The case passed cursor position 5 into "--resume-", which lands mid-token and reads as a selector context, so it received the selector list. Every other case in the file uses source.length.
This commit is contained in:
@@ -67,7 +67,9 @@ describe("Semantic CSS editor extensions", () => {
|
||||
const propertyLabels = await getSemanticCssCompletionLabels("section {\n\tco", 13, metadata);
|
||||
const variableSource = "resume { --brand-accent: #f00; color: var(--br";
|
||||
const variableLabels = await getSemanticCssCompletionLabels(variableSource, variableSource.length, metadata);
|
||||
const systemLabels = await getSemanticCssCompletionLabels("--resume-", 5, metadata);
|
||||
// The cursor has to sit at the end of the typed prefix; mid-token it reads as a selector context.
|
||||
const systemSource = "--resume-";
|
||||
const systemLabels = await getSemanticCssCompletionLabels(systemSource, systemSource.length, metadata);
|
||||
const directiveLabels = await getSemanticCssCompletionLabels("@", 1, metadata);
|
||||
|
||||
expect(selectorLabels).toEqual(
|
||||
|
||||
Reference in New Issue
Block a user