{"size": 2274, "ext": "js", "max_stars_repo_path": "test/dsFactory.spec.js", "max_stars_repo_name": "profnandaa/datastructures-js", "max_stars_repo_stars_event_min_datetime": "2020-02-04T21:13:07.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-04T21:13:07.000Z", "max_issues_repo_path": "test/dsFactory.spec.js", "max_issues_repo_name": "profnandaa/datastructures-js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/dsFactory.spec.js", "max_forks_repo_name": "profnandaa/datastructures-js", "max_forks_repo_forks_event_min_datetime": "2019-06-24T11:05:47.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-04T21:14:08.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 31.5833333333, "max_line_length": 81, "alphanum_fraction": 0.609058927}
'use strict';

const expect    = require('chai').expect;
const ds        = require('../lib');
const DsFactory = require('../lib/dsFactory');

describe('dsFactory tests', () => {

  let dsFactory = new DsFactory();

  describe('.stack()', () => {
    it('should get a stack object', function() {
      expect(dsFactory.stack()).to.be.instanceof(ds.Stack);
    });
  });

  describe('.set()', () => {
    it('should get a set object', function() {
      expect(dsFactory.set()).to.be.instanceof(ds.Set);
    });
  });

  describe('.queue() / .q()', () => {
    it('should get a queue object', function() {
      expect(dsFactory.queue()).to.be.instanceof(ds.Queue);
      expect(dsFactory.q()).to.be.instanceof(ds.Queue);
    });
  });

  describe('.priorityQueue() / .pq()', () => {
    it('should get a priorityQueue object', function() {
      expect(dsFactory.priorityQueue()).to.be.instanceof(ds.PriorityQueue);
      expect(dsFactory.pq()).to.be.instanceof(ds.PriorityQueue);
    });
  });

  describe('.linkedList() / .ll()', () => {
    it('should get a linkedList object', function() {
      expect(dsFactory.linkedList()).to.be.instanceof(ds.LinkedList);
      expect(dsFactory.ll()).to.be.instanceof(ds.LinkedList);
    });
  });

  describe('.doublyLinkedList() / dll()', () => {
    it('should get a doublyLinkedList object', function() {
      expect(dsFactory.doublyLinkedList()).to.be.instanceof(ds.DoublyLinkedList);
      expect(dsFactory.dll()).to.be.instanceof(ds.DoublyLinkedList);
    });
  });

  describe('.binarySearchTree() / .bst()', () => {
    it('should get a binarySearchTree object', function() {
      expect(dsFactory.binarySearchTree()).to.be.instanceof(ds.BinarySearchTree);
      expect(dsFactory.bst()).to.be.instanceof(ds.BinarySearchTree);
    });
  });

  describe('.graph() / .g()', () => {
    it('should get a graph object', function() {
      expect(dsFactory.graph()).to.be.instanceof(ds.Graph);
      expect(dsFactory.g()).to.be.instanceof(ds.Graph);
    });
  });

  describe('.directedGraph() / .dg()', () => {
    it('should get a directedGraph object', function() {
      expect(dsFactory.directedGraph()).to.be.instanceof(ds.DirectedGraph);
      expect(dsFactory.dg()).to.be.instanceof(ds.DirectedGraph);
    });
  });

});