Skip to content

Commit

Permalink
Merge pull request #66 from tony-xia/use-const
Browse files Browse the repository at this point in the history
Use 'const' rather than 'var'
  • Loading branch information
aeschli committed Aug 21, 2019
2 parents 38fcfa9 + b77e453 commit e18be26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/symbols.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ suite('HTML Symbols', () => {
});

test('Id and classes', function () {
var content = '<html id=\'root\'><body id="Foo" class="bar"><div class="a b"></div></body></html>';
const content = '<html id=\'root\'><body id="Foo" class="bar"><div class="a b"></div></body></html>';

var expected = [
const expected = [
{ name: 'html#root', kind: SymbolKind.Field, containerName: '', location: Location.create(TEST_URI, Range.create(0, 0, 0, 80)) },
{ name: 'body#Foo.bar', kind: SymbolKind.Field, containerName: 'html#root', location: Location.create(TEST_URI, Range.create(0, 16, 0, 73)) },
{ name: 'div.a.b', kind: SymbolKind.Field, containerName: 'body#Foo.bar', location: Location.create(TEST_URI, Range.create(0, 43, 0, 66)) },
Expand All @@ -47,9 +47,9 @@ suite('HTML Symbols', () => {
});

test('Self closing', function () {
var content = '<html><br id="Foo"><br id=Bar></html>';
const content = '<html><br id="Foo"><br id=Bar></html>';

var expected = [
const expected = [
{ name: 'html', kind: SymbolKind.Field, containerName: '', location: Location.create(TEST_URI, Range.create(0, 0, 0, 37)) },
{ name: 'br#Foo', kind: SymbolKind.Field, containerName: 'html', location: Location.create(TEST_URI, Range.create(0, 6, 0, 19)) },
{ name: 'br#Bar', kind: SymbolKind.Field, containerName: 'html', location: Location.create(TEST_URI, Range.create(0, 19, 0, 30)) },
Expand All @@ -59,9 +59,9 @@ suite('HTML Symbols', () => {
});

test('No attrib', function () {
var content = '<html><body><div></div></body></html>';
const content = '<html><body><div></div></body></html>';

var expected = [
const expected = [
{ name: 'html', kind: SymbolKind.Field, containerName: '', location: Location.create(TEST_URI, Range.create(0, 0, 0, 37)) },
{ name: 'body', kind: SymbolKind.Field, containerName: 'html', location: Location.create(TEST_URI, Range.create(0, 6, 0, 30)) },
{ name: 'div', kind: SymbolKind.Field, containerName: 'body', location: Location.create(TEST_URI, Range.create(0, 12, 0, 23)) }
Expand Down

0 comments on commit e18be26

Please sign in to comment.