{"size": 705, "ext": "js", "max_stars_repo_path": "packages/node-opcua-types/test/test_issue688.js", "max_stars_repo_name": "goldim/node-opcua", "max_stars_repo_stars_event_min_datetime": "2020-09-23T23:29:06.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-26T18:17:32.000Z", "max_issues_repo_path": "packages/node-opcua-types/test/test_issue688.js", "max_issues_repo_name": "goldim/node-opcua", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/node-opcua-types/test/test_issue688.js", "max_forks_repo_name": "goldim/node-opcua", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.5714285714, "max_line_length": 89, "alphanum_fraction": 0.514893617}

const should =require("should");
const { ReadValueId } = require("..");// node-opcua-types"

describe("Issue 688", ()=> {

    it("should throw an exception when arguement of ReadValueId are invalid", () => {
        should(()=>{
            const r = new ReadValueId({
                nodeId: "someError" // << this invalid node id should cause a exception !
            });    
        }).throw("String cannot be coerced to a nodeId : someError");
    });
    it("should coerce a ReadValueId", () => {
        should(() =>{
            const r = new ReadValueId({
                nodeId: "ns=1;s=OK" // << this  node id should cause a exception !
            });    
        }).not.throw();
    });
});