-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathfailingTd.js
More file actions
31 lines (28 loc) · 997 Bytes
/
failingTd.js
File metadata and controls
31 lines (28 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the W3C Software Notice and
* Document License (2015-05-13) which is available at
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document.
*
* SPDX-License-Identifier: EPL-2.0 OR W3C-20150513
*/
// Test utility to test index.js
const tdValidator = require("../../index").tdValidator;
const fs = require("fs");
const failTD = fs.readFileSync("../tds/invalid/noHref.json", "utf-8");
tdValidator(failTD, console.log, {}).then(
(result) => {
console.log("OKAY");
console.log(result);
},
(err) => {
console.log("ERROR");
console.error(err);
}
);