Skip to content

Commit 601fd9f

Browse files
committed
--fix : eslint error & variable declaration
1 parent 0e1038b commit 601fd9f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/_DataStructures_/Trees/Trie/total-words-in-trie/total-words-in-trie.test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const totalWordsInTrie = require('./index')
2-
const Trie = require('../index');
31
const assert = require('assert');
2+
const totalWordsInTrie = require('./index');
3+
const Trie = require('../index');
44

55
describe('Data Structure : Trie', () => {
66
it('Should be class of type Trie', () => {
@@ -11,24 +11,24 @@ describe('Data Structure : Trie', () => {
1111
describe('Trie', () => {
1212

1313
it('Should return 6.', () => {
14-
let newTrie = new Trie();
14+
const newTrie = new Trie();
1515
const words = ['bed', 'ball', 'apple', 'java', 'javascript', 'bed'];
1616
words.forEach(word => newTrie.insert(word));
17-
result = totalWordsInTrie(newTrie.root);
17+
const result = totalWordsInTrie(newTrie.root);
1818
assert.equal(result, 6);
1919
});
2020

2121
it('Should return 0.', () => {
22-
let newTrie = new Trie();
23-
result = totalWordsInTrie(newTrie.root);
22+
const newTrie = new Trie();
23+
const result = totalWordsInTrie(newTrie.root);
2424
assert.equal(result, 0);
2525
});
2626

2727
it('Should return 6.', () => {
28-
let newTrie = new Trie();
28+
const newTrie = new Trie();
2929
const words = ['bed', 'ball','', 'apple', 'java', 'javascript', 'bed'];
3030
words.forEach(word => newTrie.insert(word));
31-
result = totalWordsInTrie(newTrie.root);
31+
const result = totalWordsInTrie(newTrie.root);
3232
assert.equal(result, 6);
3333
});
3434
});

0 commit comments

Comments
 (0)