{"size": 1250, "ext": "js", "max_stars_repo_path": "test/doc.js", "max_stars_repo_name": "gatecrasher777/htflow", "max_stars_repo_stars_event_min_datetime": "2021-02-11T10:12:23.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-11T10:12:23.000Z", "max_issues_repo_path": "test/doc.js", "max_issues_repo_name": "gatecrasher777/htflow", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/doc.js", "max_forks_repo_name": "gatecrasher777/htflow", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 46.2962962963, "max_line_length": 92, "alphanum_fraction": 0.6104}
'use strict'

const ht = require('../htflow.js')();
const assert = require('assert');

describe('Test doc function',function(){
    
    it('Should return html5 doc string, optional input and ignore invalid input',function(){
        assert.strictEqual(ht.doc(),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(undefined),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(undefined,undefined),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(undefined,undefined,undefined),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(null),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(null,null),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(null,null,null),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc([]),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc([],[]),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc([],[],[]),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc({}),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc({},{}),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc({},{},{}),'<!DOCTYPE html>');
        assert.strictEqual(ht.doc(ht.html()),'<!DOCTYPE html><html></html>');
        assert.strictEqual(ht.doc(()=>{return ht.html()}),'<!DOCTYPE html><html></html>');
    });

});
