mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
Complying with JavaScript Standard Style (npx standard --fix).
This commit is contained in:
@@ -4,7 +4,7 @@ describe('MinPriorityQueue', () => {
|
||||
const values = [5, 2, 4, 1, 7, 6, 3, 8]
|
||||
const capacity = values.length
|
||||
|
||||
const Queue = new MinPriorityQueue(capacity);
|
||||
const Queue = new MinPriorityQueue(capacity)
|
||||
|
||||
values.forEach(v => Queue.insert(v))
|
||||
|
||||
@@ -12,7 +12,7 @@ describe('MinPriorityQueue', () => {
|
||||
const mockFn = jest.fn()
|
||||
Queue.print(mockFn)
|
||||
|
||||
expect(mockFn.mock.calls.length).toBe(1) // Expect one call
|
||||
expect(mockFn.mock.calls.length).toBe(1) // Expect one call
|
||||
expect(mockFn.mock.calls[0].length).toBe(1) // Expect one argument
|
||||
|
||||
const heap = mockFn.mock.calls[0][0]
|
||||
|
||||
@@ -54,5 +54,4 @@ const Stack = (function () {
|
||||
return Stack
|
||||
}())
|
||||
|
||||
|
||||
export { Stack }
|
||||
|
||||
@@ -229,7 +229,7 @@ const AVLTree = (function () {
|
||||
return true
|
||||
}
|
||||
return _avl
|
||||
}());
|
||||
}())
|
||||
|
||||
/**
|
||||
* A Code for Testing the AVLTree
|
||||
|
||||
@@ -116,6 +116,6 @@ Trie.prototype.findOccurences = function (word) {
|
||||
// No such word exists
|
||||
if (node === null) return 0
|
||||
return node.count
|
||||
};
|
||||
}
|
||||
|
||||
export { Trie }
|
||||
|
||||
Reference in New Issue
Block a user