const { TreeNode, printTreeDirectory, printTreePretty } = require('../helpers')

const { insert } = require('../operations')

describe('printTree', () => {
  const rootNode = new TreeNode(9)
  const nodes = [4, 17, 3, 6, 5, 7, 22, 20, 10]
  nodes.forEach((node) => {
    insert(rootNode, node)
  })

  test('1 - My Own Implementation', () => {
    console.log(printTreeDirectory(rootNode))
  })

  test('2 - 3rd Party Implementation', () => {
    console.log(printTreePretty(rootNode))
  })
})
