Skip to content

Commit

Permalink
Add (failing) test case for variable value containing a semicolon.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Jan 31, 2018
1 parent 1027ba3 commit 7693b1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/fixtures/variableWithSemicolon.test.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$name: 'separated;value';
12 changes: 11 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('scss-comment-parser', function () {
})
})

it('should work for a variable that is build of of variabels', function () {
it('should work for a variable that is built of variables', function () {
var context = parser.contextParser(getContent('variableAsListOfVariables.test.scss'))
assert.deepEqual(context, {
type: 'variable',
Expand All @@ -135,6 +135,16 @@ describe('scss-comment-parser', function () {
scope: 'private'
})
})

it('should work for a variable that contains a semicolon', function () {
var context = parser.contextParser(getContent('variableWithSemicolon.test.scss'))
assert.deepEqual(context, {
type: 'variable',
name: 'name',
value: '\'separated;value\'',
scope: 'private'
})
})
})

describe('css rule', function () {
Expand Down

0 comments on commit 7693b1c

Please sign in to comment.